Merge branch 'master' of github.com:xmartlabs/XLPagerTabStrip
This commit is contained in:
commit
a691ba2010
|
|
@ -1,7 +1,7 @@
|
|||
language: objective-c
|
||||
osx_image: xcode9
|
||||
osx_image: xcode10
|
||||
env:
|
||||
- DESTINATION="OS=11.0,name=iPhone 7" SCHEME="XLPagerTabStrip" SDK=iphonesimulator
|
||||
- DESTINATION="OS=12,name=iPhone 8" SCHEME="XLPagerTabStrip" SDK=iphonesimulator
|
||||
before_install:
|
||||
- brew update
|
||||
#- brew outdated carthage || brew upgrade carthage
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
# Change Log
|
||||
All notable changes to XLPagerTabStrip will be documented in this file.
|
||||
|
||||
### [8.0.1](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/8.0.1)
|
||||
|
||||
* Bug fixes and stability improvements.
|
||||
* Support for iPhone X.
|
||||
|
||||
### [8.0.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/8.0.0)
|
||||
|
||||
* Xcode 9 support. (Swift 4)
|
||||
|
|
@ -8,7 +13,7 @@ All notable changes to XLPagerTabStrip will be documented in this file.
|
|||
|
||||
### [7.0.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/7.0.0)
|
||||
|
||||
* Bug fixes and stability improvements.
|
||||
* Bug fixes and stability improvements.
|
||||
|
||||
### [6.0.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/6.0.0)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1F081A9E1FDABD1400B881EB /* YoutubeIconWithLabelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F081A9B1FDABD1400B881EB /* YoutubeIconWithLabelCell.swift */; };
|
||||
1F081A9F1FDABD1400B881EB /* YoutubeIconWithLabelCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1F081A9C1FDABD1400B881EB /* YoutubeIconWithLabelCell.xib */; };
|
||||
1F081AA01FDABD1400B881EB /* YoutubeWithLabelExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F081A9D1FDABD1400B881EB /* YoutubeWithLabelExampleViewController.swift */; };
|
||||
285718181C568336004D7E7B /* DataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285718171C568336004D7E7B /* DataProvider.swift */; };
|
||||
285DA2881C569AA2000908CA /* ChildExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285DA2861C569AA2000908CA /* ChildExampleViewController.swift */; };
|
||||
285DA2891C569AA2000908CA /* TableChildExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285DA2871C569AA2000908CA /* TableChildExampleViewController.swift */; };
|
||||
|
|
@ -78,6 +81,9 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1F081A9B1FDABD1400B881EB /* YoutubeIconWithLabelCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YoutubeIconWithLabelCell.swift; sourceTree = "<group>"; };
|
||||
1F081A9C1FDABD1400B881EB /* YoutubeIconWithLabelCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YoutubeIconWithLabelCell.xib; sourceTree = "<group>"; };
|
||||
1F081A9D1FDABD1400B881EB /* YoutubeWithLabelExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YoutubeWithLabelExampleViewController.swift; sourceTree = "<group>"; };
|
||||
285718171C568336004D7E7B /* DataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DataProvider.swift; path = Example/Helpers/DataProvider.swift; sourceTree = "<group>"; };
|
||||
285DA2861C569AA2000908CA /* ChildExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChildExampleViewController.swift; path = Example/ChildControllers/ChildExampleViewController.swift; sourceTree = "<group>"; };
|
||||
285DA2871C569AA2000908CA /* TableChildExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TableChildExampleViewController.swift; path = Example/ChildControllers/TableChildExampleViewController.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -125,6 +131,17 @@
|
|||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1F081A9A1FDABD1400B881EB /* YoutubeWithLabel */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F081A9B1FDABD1400B881EB /* YoutubeIconWithLabelCell.swift */,
|
||||
1F081A9C1FDABD1400B881EB /* YoutubeIconWithLabelCell.xib */,
|
||||
1F081A9D1FDABD1400B881EB /* YoutubeWithLabelExampleViewController.swift */,
|
||||
);
|
||||
name = YoutubeWithLabel;
|
||||
path = Example/YoutubeWithLabel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
285718151C568285004D7E7B /* Helpers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -221,6 +238,7 @@
|
|||
CB86ED6C1C4D6ED400DA463B /* Demo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1F081A9A1FDABD1400B881EB /* YoutubeWithLabel */,
|
||||
285DA2911C5A5945000908CA /* Youtube */,
|
||||
285DA28E1C59C587000908CA /* Spotify */,
|
||||
285DA28A1C59210F000908CA /* Instagram */,
|
||||
|
|
@ -358,6 +376,7 @@
|
|||
CB86ED801C4D6F0D00DA463B /* Assets.xcassets in Resources */,
|
||||
CB86ED941C4E89DD00DA463B /* PostCell.xib in Resources */,
|
||||
CBA0A2021C5032E100C5748C /* Storyboard.storyboard in Resources */,
|
||||
1F081A9F1FDABD1400B881EB /* YoutubeIconWithLabelCell.xib in Resources */,
|
||||
CB86ED811C4D6F0D00DA463B /* LaunchScreen.storyboard in Resources */,
|
||||
285DA2971C5A6A36000908CA /* YoutubeIconCell.xib in Resources */,
|
||||
);
|
||||
|
|
@ -388,10 +407,12 @@
|
|||
285718181C568336004D7E7B /* DataProvider.swift in Sources */,
|
||||
CB2125DE1C52A80E002DAF42 /* TwitterExampleViewController.swift in Sources */,
|
||||
285DA2891C569AA2000908CA /* TableChildExampleViewController.swift in Sources */,
|
||||
1F081A9E1FDABD1400B881EB /* YoutubeIconWithLabelCell.swift in Sources */,
|
||||
CBBD435F1C5274AE001A748E /* NavButtonBarExampleViewController.swift in Sources */,
|
||||
CB71C6F31C4FDDCE008EC806 /* PostCell.swift in Sources */,
|
||||
285DA2931C5A596B000908CA /* YoutubeExampleViewController.swift in Sources */,
|
||||
285DA2951C5A6A00000908CA /* YoutubeIconCell.swift in Sources */,
|
||||
1F081AA01FDABD1400B881EB /* YoutubeWithLabelExampleViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="SCa-L8-uTr">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="SCa-L8-uTr">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="HdL-Q7-Anl"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="BPt-hn-p4R">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="554"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="554"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D5t-1q-KDh">
|
||||
|
|
@ -201,14 +201,14 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="srh-qY-UAa" customClass="BarView" customModule="XLPagerTabStrip">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="5"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="5"/>
|
||||
<color key="backgroundColor" red="0.029917803763441025" green="0.92659837372448983" blue="0.78518703254703159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="5" id="EuL-ap-Nyh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" alwaysBounceHorizontal="YES" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gaM-gk-dVJ">
|
||||
<rect key="frame" x="0.0" y="5" width="375" height="492"/>
|
||||
<rect key="frame" x="0.0" y="25" width="375" height="472"/>
|
||||
<color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95686274509803926" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
|
|
@ -248,11 +248,11 @@
|
|||
<rect key="frame" x="0.0" y="35" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oTF-WE-AbG" id="6M8-2g-4Tv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="PageTabController Types" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Wj6-fs-BjA">
|
||||
<rect key="frame" x="15" y="0.0" width="345" height="43"/>
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -272,11 +272,11 @@
|
|||
<rect key="frame" x="0.0" y="115" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lqx-q4-U6Y" id="6Oi-8U-mzD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Instagram Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GIb-gr-QYX">
|
||||
<rect key="frame" x="15" y="0.0" width="345" height="43"/>
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -292,11 +292,11 @@
|
|||
<rect key="frame" x="0.0" y="159" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5tn-pD-005" id="U8A-o0-QLd">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Youtube Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="68O-MH-NQl">
|
||||
<rect key="frame" x="15" y="0.0" width="345" height="43"/>
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -308,15 +308,35 @@
|
|||
<segue destination="Pux-pd-JeW" kind="presentation" id="QIG-fU-qdz"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="bPv-uB-GeS" style="IBUITableViewCellStyleDefault" id="WB2-oq-b4x">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="yT9-cg-ta8" style="IBUITableViewCellStyleDefault" id="Vv0-op-FMh">
|
||||
<rect key="frame" x="0.0" y="203" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Vv0-op-FMh" id="gmz-RN-PgI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Youtube with Label Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yT9-cg-ta8">
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<segue destination="wtp-ZI-nBV" kind="presentation" id="D5b-rl-ZDt"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="bPv-uB-GeS" style="IBUITableViewCellStyleDefault" id="WB2-oq-b4x">
|
||||
<rect key="frame" x="0.0" y="247" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WB2-oq-b4x" id="2mV-U6-6pj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Spotify Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bPv-uB-GeS">
|
||||
<rect key="frame" x="15" y="0.0" width="345" height="43"/>
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -375,7 +395,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="MRO-1B-lmT"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="sAq-sJ-Hyx">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="mzt-Sj-o9z" customClass="ButtonBarView" customModule="XLPagerTabStrip">
|
||||
|
|
@ -440,7 +460,7 @@
|
|||
</tabBarItem>
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" opaque="NO" contentMode="scaleToFill" translucent="NO" id="TRx-vY-PeE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.027450980390000001" green="0.72549019609999998" blue="0.60784313729999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</navigationBar>
|
||||
|
|
@ -462,7 +482,7 @@
|
|||
</tabBarItem>
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="2I8-g6-D4S">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.027450980390000001" green="0.72549019609999998" blue="0.60784313729999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
|
|
@ -492,10 +512,10 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zn6-8Q-9P3">
|
||||
<rect key="frame" x="0.0" y="43" width="375" height="510"/>
|
||||
<rect key="frame" x="0.0" y="63" width="375" height="490"/>
|
||||
</scrollView>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="FH0-FX-IMd" customClass="ButtonBarView" customModule="XLPagerTabStrip">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="43"/>
|
||||
<color key="backgroundColor" red="0.027450980390000001" green="0.72549019609999998" blue="0.60784313729999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="43" id="5Gm-jk-c1U"/>
|
||||
|
|
@ -539,7 +559,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="64r-dM-ghd"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Eak-dg-otx">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="554"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="554"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A96-PT-Aon">
|
||||
|
|
@ -582,7 +602,7 @@
|
|||
</tabBarItem>
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" opaque="NO" contentMode="scaleToFill" translucent="NO" id="iMm-hr-oOU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.027450980390000001" green="0.72549019609999998" blue="0.60784313729999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</navigationBar>
|
||||
|
|
@ -604,7 +624,7 @@
|
|||
</tabBarItem>
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="PUj-LI-AQ6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.027450980390000001" green="0.72549019609999998" blue="0.60784313729999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
|
|
@ -630,7 +650,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="blo-XS-xG2"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Z8p-ri-ydp">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="554"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="554"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QoM-XF-R9X">
|
||||
|
|
@ -666,7 +686,7 @@
|
|||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="nn8-x2-liB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="barTintColor" red="0.086274509803921567" green="0.2627450980392157" blue="0.45490196078431372" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
|
|
@ -676,7 +696,6 @@
|
|||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="4QH-2O-KOp">
|
||||
<rect key="frame" x="0.0" y="556" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
|
|
@ -695,7 +714,7 @@
|
|||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" id="jNK-DV-g6h">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="barTintColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.078431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -707,7 +726,6 @@
|
|||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="iuN-MC-o9b">
|
||||
<rect key="frame" x="0.0" y="556" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
|
|
@ -727,7 +745,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="pHS-02-a6v"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="iXz-9N-5eX">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G0A-Qi-hkf">
|
||||
|
|
@ -793,7 +811,7 @@
|
|||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="eWp-ed-SXr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="barTintColor" red="0.8666666666666667" green="0.0" blue="0.074509803921568626" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
@ -805,7 +823,6 @@
|
|||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="WZf-Dl-jiU">
|
||||
<rect key="frame" x="0.0" y="556" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
|
|
@ -825,7 +842,7 @@
|
|||
<viewControllerLayoutGuide type="bottom" id="AoG-Am-Q4c"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="yGV-Lf-LC4">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KX5-0N-ToU">
|
||||
|
|
@ -893,6 +910,113 @@
|
|||
</objects>
|
||||
<point key="canvasLocation" x="518" y="-2380"/>
|
||||
</scene>
|
||||
<!--Nav Controller-->
|
||||
<scene sceneID="f4u-mf-lkq">
|
||||
<objects>
|
||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="wtp-ZI-nBV" customClass="NavController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<toolbarItems/>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="vc1-jF-ATl">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="barTintColor" red="0.86666666670000003" green="0.0" blue="0.074509803920000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<textAttributes key="titleTextAttributes">
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="textShadowColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</textAttributes>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="ZXR-L3-Qqf">
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
<segue destination="dFD-gP-LEB" kind="relationship" relationship="rootViewController" id="6KU-Mn-bfq"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="3ZF-Tp-4GF" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-230" y="-3067"/>
|
||||
</scene>
|
||||
<!--Youtube With Label Example View Controller-->
|
||||
<scene sceneID="Q1j-np-84R">
|
||||
<objects>
|
||||
<viewController id="dFD-gP-LEB" customClass="YoutubeWithLabelExampleViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="nAm-L7-0C5"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="h18-Xb-G4o"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="srq-xV-ncW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OdC-5s-g0E">
|
||||
<rect key="frame" x="0.0" y="70" width="375" height="533"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</scrollView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ye3-ds-RRe">
|
||||
<rect key="frame" x="28" y="558" width="84" height="33"/>
|
||||
<color key="backgroundColor" red="1" green="0.99997437" blue="0.99999129769999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="84" id="gxr-hQ-rJo"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="17"/>
|
||||
<state key="normal" title="CLOSE"/>
|
||||
<connections>
|
||||
<action selector="closeAction:" destination="dFD-gP-LEB" eventType="touchUpInside" id="tGE-Hd-oiU"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="NF8-r2-llj" customClass="ButtonBarView" customModule="XLPagerTabStrip">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="70"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="70" id="eHr-qr-UnQ"/>
|
||||
</constraints>
|
||||
<inset key="scrollIndicatorInsets" minX="15" minY="0.0" maxX="15" maxY="0.0"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="NcL-oD-vkg">
|
||||
<size key="itemSize" width="40" height="40"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.058823529409999999" green="0.062745098040000002" blue="0.062745098040000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="h18-Xb-G4o" firstAttribute="top" secondItem="Ye3-ds-RRe" secondAttribute="bottom" constant="12" id="8Vn-VD-e3K"/>
|
||||
<constraint firstItem="Ye3-ds-RRe" firstAttribute="leading" secondItem="srq-xV-ncW" secondAttribute="leadingMargin" constant="12" id="PI1-vN-tQn"/>
|
||||
<constraint firstItem="OdC-5s-g0E" firstAttribute="leading" secondItem="srq-xV-ncW" secondAttribute="leading" id="Yhg-Df-lY8"/>
|
||||
<constraint firstItem="NF8-r2-llj" firstAttribute="top" secondItem="nAm-L7-0C5" secondAttribute="bottom" id="cGp-RS-hTW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="NF8-r2-llj" secondAttribute="trailing" id="diI-XY-ee6"/>
|
||||
<constraint firstItem="h18-Xb-G4o" firstAttribute="top" secondItem="OdC-5s-g0E" secondAttribute="bottom" id="iOV-H7-dW1"/>
|
||||
<constraint firstItem="NF8-r2-llj" firstAttribute="leading" secondItem="srq-xV-ncW" secondAttribute="leading" id="rDI-Ht-8Px"/>
|
||||
<constraint firstItem="OdC-5s-g0E" firstAttribute="top" secondItem="NF8-r2-llj" secondAttribute="bottom" id="vlA-DF-8l2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OdC-5s-g0E" secondAttribute="trailing" id="xNh-E4-YQz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" id="Ogr-CI-ZbI">
|
||||
<barButtonItem key="leftBarButtonItem" title=" Home" id="2RO-X1-xjA"/>
|
||||
<rightBarButtonItems>
|
||||
<barButtonItem image="more_options" id="c1i-ZN-Neo">
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</barButtonItem>
|
||||
<barButtonItem image="search" id="nYs-bs-onl">
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</barButtonItem>
|
||||
</rightBarButtonItems>
|
||||
</navigationItem>
|
||||
<connections>
|
||||
<outlet property="buttonBarView" destination="NF8-r2-llj" id="mQR-fl-D9w"/>
|
||||
<outlet property="containerView" destination="OdC-5s-g0E" id="4MA-bD-Sxw"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Loe-25-w2Z" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="518" y="-3067"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="icon_bar" width="30" height="30"/>
|
||||
|
|
|
|||
|
|
@ -1,57 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="PostCell" customModule="Example" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="326" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3cF-Pb-bhF">
|
||||
<rect key="frame" x="12" y="12" width="60" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="Pny-Yy-5g4"/>
|
||||
<constraint firstAttribute="height" constant="60" id="xre-y3-QCa"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XpS-ev-AZK">
|
||||
<rect key="frame" x="80" y="12" width="229" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M84-ZZ-G5B">
|
||||
<rect key="frame" x="80" y="38" width="229" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="M84-ZZ-G5B" secondAttribute="trailing" constant="17" id="ERc-X0-bm6"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="M84-ZZ-G5B" secondAttribute="bottom" priority="999" constant="20" id="I1d-nA-bLK"/>
|
||||
<constraint firstItem="XpS-ev-AZK" firstAttribute="leading" secondItem="3cF-Pb-bhF" secondAttribute="trailing" constant="8" id="MCp-qr-s7q"/>
|
||||
<constraint firstItem="M84-ZZ-G5B" firstAttribute="top" secondItem="XpS-ev-AZK" secondAttribute="bottom" constant="8" id="PxD-gM-hbj"/>
|
||||
<constraint firstItem="M84-ZZ-G5B" firstAttribute="leading" secondItem="3cF-Pb-bhF" secondAttribute="trailing" constant="8" id="VmA-J2-6Ur"/>
|
||||
<constraint firstItem="3cF-Pb-bhF" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="Vqu-xf-y9G"/>
|
||||
<constraint firstItem="XpS-ev-AZK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="XP8-3C-YTa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="XpS-ev-AZK" secondAttribute="trailing" constant="17" id="dh0-1d-SBr"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="3cF-Pb-bhF" secondAttribute="bottom" priority="999" constant="12" id="f9x-qu-WpO"/>
|
||||
<constraint firstItem="3cF-Pb-bhF" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="12" id="rjQ-uH-Euv"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="84" id="b8n-8Y-pxb" customClass="PostCell" customModule="Example" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="b8n-8Y-pxb" id="K88-rd-6gZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="83.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wQ5-jv-KcD">
|
||||
<rect key="frame" x="12" y="12" width="60" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="60" id="a22-Yz-B14"/>
|
||||
<constraint firstAttribute="width" constant="60" id="h3B-3k-YAV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xt9-VS-IpY">
|
||||
<rect key="frame" x="80" y="12" width="278" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fIC-u4-GzA">
|
||||
<rect key="frame" x="80" y="38" width="278" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="wQ5-jv-KcD" firstAttribute="top" secondItem="K88-rd-6gZ" secondAttribute="top" constant="12" id="0nA-Ff-0jE"/>
|
||||
<constraint firstItem="Xt9-VS-IpY" firstAttribute="leading" secondItem="wQ5-jv-KcD" secondAttribute="trailing" constant="8" id="CJD-v3-ZI5"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="fIC-u4-GzA" secondAttribute="bottom" priority="999" constant="20" id="Dsa-9n-hAy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fIC-u4-GzA" secondAttribute="trailing" constant="17" id="NGB-u3-BwT"/>
|
||||
<constraint firstItem="Xt9-VS-IpY" firstAttribute="top" secondItem="K88-rd-6gZ" secondAttribute="top" constant="12" id="aeT-ml-Joy"/>
|
||||
<constraint firstItem="fIC-u4-GzA" firstAttribute="leading" secondItem="wQ5-jv-KcD" secondAttribute="trailing" constant="8" id="cdd-j8-SOs"/>
|
||||
<constraint firstItem="wQ5-jv-KcD" firstAttribute="leading" secondItem="K88-rd-6gZ" secondAttribute="leading" constant="12" id="hyC-j1-1ur"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wQ5-jv-KcD" secondAttribute="bottom" priority="999" constant="12" id="igs-Iw-meI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Xt9-VS-IpY" secondAttribute="trailing" constant="17" id="xNw-iC-WEv"/>
|
||||
<constraint firstItem="fIC-u4-GzA" firstAttribute="top" secondItem="Xt9-VS-IpY" secondAttribute="bottom" constant="8" id="ypP-AG-hch"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="postName" destination="XpS-ev-AZK" id="sua-hr-KD7"/>
|
||||
<outlet property="postText" destination="M84-ZZ-G5B" id="981-BE-BOc"/>
|
||||
<outlet property="userImage" destination="3cF-Pb-bhF" id="rkH-iK-qN8"/>
|
||||
<outlet property="postName" destination="Xt9-VS-IpY" id="VYd-5D-WAS"/>
|
||||
<outlet property="postText" destination="fIC-u4-GzA" id="GvN-fW-jWH"/>
|
||||
<outlet property="userImage" destination="wQ5-jv-KcD" id="T64-Nd-dc9"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="362" y="495"/>
|
||||
</view>
|
||||
<point key="canvasLocation" x="348" y="692"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
// YoutubeIconWithLabelCell.swift
|
||||
// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip )
|
||||
//
|
||||
// Copyright (c) 2017 Xmartlabs ( http://xmartlabs.com )
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class YoutubeIconWithLabelCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet weak var iconImage: UIImageView!
|
||||
@IBOutlet weak var iconLabel: UILabel!
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="2CI-9N-dP3" customClass="YoutubeIconWithLabelCell" customModule="Example" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="74" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="74" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Tkn-VR-o25">
|
||||
<rect key="frame" x="20" y="10" width="35" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="35" id="EUF-rI-9Y8"/>
|
||||
<constraint firstAttribute="height" constant="35" id="RoA-LT-AHV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rwk-fy-4KB">
|
||||
<rect key="frame" x="0.0" y="45" width="74" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="kWi-HY-P6M"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="rwk-fy-4KB" firstAttribute="top" secondItem="Tkn-VR-o25" secondAttribute="bottom" id="A8G-Sk-d4C"/>
|
||||
<constraint firstItem="Tkn-VR-o25" firstAttribute="top" secondItem="2CI-9N-dP3" secondAttribute="top" constant="10" id="DaW-j3-w2g"/>
|
||||
<constraint firstItem="rwk-fy-4KB" firstAttribute="leading" secondItem="2CI-9N-dP3" secondAttribute="leading" id="HFm-qh-fCk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="rwk-fy-4KB" secondAttribute="bottom" constant="5" id="Q0g-pb-bbf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rwk-fy-4KB" secondAttribute="trailing" id="YuE-x9-9EY"/>
|
||||
<constraint firstItem="Tkn-VR-o25" firstAttribute="centerX" secondItem="2CI-9N-dP3" secondAttribute="centerX" id="wav-eA-a2N"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="74" height="50"/>
|
||||
<connections>
|
||||
<outlet property="iconImage" destination="Tkn-VR-o25" id="7DO-mm-BJX"/>
|
||||
<outlet property="iconLabel" destination="rwk-fy-4KB" id="76s-nG-weE"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="317" y="376"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
// YoutubeWithLabelExampleViewController.swift
|
||||
// XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip )
|
||||
//
|
||||
// Copyright (c) 2017 Xmartlabs ( http://xmartlabs.com )
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import XLPagerTabStrip
|
||||
|
||||
class YoutubeWithLabelExampleViewController: BaseButtonBarPagerTabStripViewController<YoutubeIconWithLabelCell> {
|
||||
|
||||
let redColor = UIColor(red: 221/255.0, green: 0/255.0, blue: 19/255.0, alpha: 1.0)
|
||||
let unselectedIconColor = UIColor(red: 73/255.0, green: 8/255.0, blue: 10/255.0, alpha: 1.0)
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
buttonBarItemSpec = ButtonBarItemSpec.nibFile(nibName: "YoutubeIconWithLabelCell", bundle: Bundle(for: YoutubeIconWithLabelCell.self), width: { _ in
|
||||
return 70.0
|
||||
})
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
// change selected bar color
|
||||
settings.style.buttonBarBackgroundColor = redColor
|
||||
settings.style.buttonBarItemBackgroundColor = .clear
|
||||
settings.style.selectedBarBackgroundColor = UIColor(red: 234/255.0, green: 234/255.0, blue: 234/255.0, alpha: 1.0)
|
||||
settings.style.selectedBarHeight = 4.0
|
||||
settings.style.buttonBarMinimumLineSpacing = 0
|
||||
settings.style.buttonBarItemTitleColor = .black
|
||||
settings.style.buttonBarItemsShouldFillAvailableWidth = true
|
||||
settings.style.buttonBarLeftContentInset = 0
|
||||
settings.style.buttonBarRightContentInset = 0
|
||||
|
||||
changeCurrentIndexProgressive = { [weak self] (oldCell: YoutubeIconWithLabelCell?, newCell: YoutubeIconWithLabelCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
|
||||
guard changeCurrentIndex == true else { return }
|
||||
oldCell?.iconImage.tintColor = self?.unselectedIconColor
|
||||
oldCell?.iconLabel.textColor = self?.unselectedIconColor
|
||||
newCell?.iconImage.tintColor = .white
|
||||
newCell?.iconLabel.textColor = .white
|
||||
}
|
||||
super.viewDidLoad()
|
||||
navigationController?.navigationBar.shadowImage = UIImage()
|
||||
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
|
||||
}
|
||||
|
||||
// MARK: - PagerTabStripDataSource
|
||||
|
||||
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
|
||||
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " HOME", image: UIImage(named: "home")))
|
||||
let child_2 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " TRENDING", image: UIImage(named: "trending")))
|
||||
let child_3 = ChildExampleViewController(itemInfo: IndicatorInfo(title: " ACCOUNT", image: UIImage(named: "profile")))
|
||||
return [child_1, child_2, child_3]
|
||||
}
|
||||
|
||||
override func configure(cell: YoutubeIconWithLabelCell, for indicatorInfo: IndicatorInfo) {
|
||||
cell.iconImage.image = indicatorInfo.image?.withRenderingMode(.alwaysTemplate)
|
||||
cell.iconLabel.text = indicatorInfo.title?.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
}
|
||||
|
||||
override func updateIndicator(for viewController: PagerTabStripViewController, fromIndex: Int, toIndex: Int, withProgressPercentage progressPercentage: CGFloat, indexWasChanged: Bool) {
|
||||
super.updateIndicator(for: viewController, fromIndex: fromIndex, toIndex: toIndex, withProgressPercentage: progressPercentage, indexWasChanged: indexWasChanged)
|
||||
if indexWasChanged && toIndex > -1 && toIndex < viewControllers.count {
|
||||
let child = viewControllers[toIndex] as! IndicatorInfoProvider // swiftlint:disable:this force_cast
|
||||
UIView.performWithoutAnimation({ [weak self] () -> Void in
|
||||
guard let me = self else { return }
|
||||
me.navigationItem.leftBarButtonItem?.title = child.indicatorInfo(for: me).title
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@IBAction func closeAction(_ sender: UIButton) {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
44
README.md
44
README.md
|
|
@ -145,26 +145,26 @@ public var pagerBehaviour: PagerTabStripBehaviour
|
|||
|
||||
```swift
|
||||
public enum PagerTabStripBehaviour {
|
||||
case Common(skipIntermediteViewControllers: Bool)
|
||||
case Progressive(skipIntermediteViewControllers: Bool, elasticIndicatorLimit: Bool)
|
||||
case common(skipIntermediteViewControllers: Bool)
|
||||
case progressive(skipIntermediteViewControllers: Bool, elasticIndicatorLimit: Bool)
|
||||
}
|
||||
```
|
||||
|
||||
Default Values:
|
||||
```swift
|
||||
// Twitter Type
|
||||
PagerTabStripBehaviour.Common(skipIntermediteViewControllers: true)
|
||||
PagerTabStripBehaviour.common(skipIntermediateViewControllers: true)
|
||||
// Segmented Type
|
||||
PagerTabStripBehaviour.Common(skipIntermediteViewControllers: true)
|
||||
PagerTabStripBehaviour.common(skipIntermediateViewControllers: true)
|
||||
// Bar Type
|
||||
PagerTabStripBehaviour.Progressive(skipIntermediteViewControllers: true, elasticIndicatorLimit: true)
|
||||
PagerTabStripBehaviour.progressive(skipIntermediateViewControllers: true, elasticIndicatorLimit: true)
|
||||
// ButtonBar Type
|
||||
PagerTabStripBehaviour.Progressive(skipIntermediteViewControllers: true, elasticIndicatorLimit: true)`
|
||||
PagerTabStripBehaviour.progressive(skipIntermediateViewControllers: true, elasticIndicatorLimit: true)
|
||||
```
|
||||
|
||||
As you might have noticed `Common` and `Progressive` enumeration cases has `skipIntermediteViewControllers` and `elasticIndicatorLimit` associated values.
|
||||
As you might have noticed `common` and `progressive` enumeration cases has `skipIntermediateViewControllers` and `elasticIndicatorLimit` associated values.
|
||||
|
||||
`skipIntermediteViewControllers` allows us to skip intermediate view controllers when a tab indicator is tapped.
|
||||
`skipIntermediateViewControllers` allows us to skip intermediate view controllers when a tab indicator is tapped.
|
||||
|
||||
`elasticIndicatorLimit` allows us to tension the indicator when we reach a limit, I mean when we try to move forward from last indicator or move back from first indicator.
|
||||
|
||||
|
|
@ -204,12 +204,12 @@ settings.style.buttonBarLeftContentInset: CGFloat?
|
|||
settings.style.buttonBarRightContentInset: CGFloat?
|
||||
|
||||
// selected bar view is created programmatically so it's important to set up the following 2 properties properly
|
||||
settings.style.selectedBarBackgroundColor = UIColor.blackColor()
|
||||
settings.style.selectedBarBackgroundColor = UIColor.black
|
||||
settings.style.selectedBarHeight: CGFloat = 5
|
||||
|
||||
// each buttonBar item is a UICollectionView cell of type ButtonBarViewCell
|
||||
settings.style.buttonBarItemBackgroundColor: UIColor?
|
||||
settings.style.buttonBarItemFont = UIFont.systemFontOfSize(18)
|
||||
settings.style.buttonBarItemFont = UIFont.systemFont(ofSize: 18)
|
||||
// helps to determine the cell width, it represent the space before and after the title label
|
||||
settings.style.buttonBarItemLeftRightMargin: CGFloat = 8
|
||||
settings.style.buttonBarItemTitleColor: UIColor?
|
||||
|
|
@ -223,7 +223,7 @@ public var buttonBarHeight: CGFloat?
|
|||
```swift
|
||||
override func viewDidLoad() {
|
||||
self.settings.style.selectedBarHeight = 2
|
||||
self.settings.style.selectedBarBackgroundColor = UIColor.whiteColor()
|
||||
self.settings.style.selectedBarBackgroundColor = UIColor.white
|
||||
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
|
@ -245,17 +245,17 @@ changeCurrentIndexProgressive = { (oldCell: ButtonBarViewCell?, newCell: ButtonB
|
|||
guard changeCurrentIndex == true else { return }
|
||||
|
||||
oldCell?.label.textColor = UIColor(white: 1, alpha: 0.6)
|
||||
newCell?.label.textColor = .whiteColor()
|
||||
newCell?.label.textColor = UIColor.white
|
||||
|
||||
if animated {
|
||||
UIView.animateWithDuration(0.1, animations: { () -> Void in
|
||||
newCell?.transform = CGAffineTransformMakeScale(1.0, 1.0)
|
||||
oldCell?.transform = CGAffineTransformMakeScale(0.8, 0.8)
|
||||
UIView.animate(withDuration: 0.1, animations: { () -> Void in
|
||||
newCell?.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
|
||||
oldCell?.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
|
||||
})
|
||||
}
|
||||
else {
|
||||
newCell?.transform = CGAffineTransformMakeScale(1.0, 1.0)
|
||||
oldCell?.transform = CGAffineTransformMakeScale(0.8, 0.8)
|
||||
newCell?.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
|
||||
oldCell?.transform = CGAffineTransform(scaleX: 0.8, y: 0.8)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -273,10 +273,10 @@ settings.style.barHeight: CGFloat = 5
|
|||
|
||||
```swift
|
||||
settings.style.dotColor = UIColor(white: 1, alpha: 0.4)
|
||||
settings.style.selectedDotColor = UIColor.whiteColor()
|
||||
settings.style.portraitTitleFont = UIFont.systemFontOfSize(18)
|
||||
settings.style.landscapeTitleFont = UIFont.systemFontOfSize(15)
|
||||
settings.style.titleColor = UIColor.whiteColor()
|
||||
settings.style.selectedDotColor = UIColor.white
|
||||
settings.style.portraitTitleFont = UIFont.systemFont(ofSize: 18)
|
||||
settings.style.landscapeTitleFont = UIFont.systemFont(ofSize: 15)
|
||||
settings.style.titleColor = UIColor.white
|
||||
```
|
||||
|
||||
### Segmented Type Customization
|
||||
|
|
@ -290,7 +290,7 @@ settings.style.segmentedControlColor: UIColor?
|
|||
## Requirements
|
||||
|
||||
* iOS 8.0+
|
||||
* Xcode 8.0+
|
||||
* Xcode 9.3+
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType: UICollect
|
|||
// selectedBar is resized and its contentOffset/scroll is set correctly (the selected
|
||||
// tab/cell may end up either skewed or off screen after a rotation otherwise)
|
||||
buttonBarView.moveTo(index: currentIndex, animated: false, swipeDirection: .none, pagerScroll: .scrollOnlyIfOutOfScreen)
|
||||
buttonBarView.selectItem(at: IndexPath(item: currentIndex, section: 0), animated: false, scrollPosition: [])
|
||||
}
|
||||
|
||||
// MARK: - View Rotation
|
||||
|
|
@ -340,6 +341,7 @@ open class ExampleBaseButtonBarPagerTabStripViewController: BaseButtonBarPagerTa
|
|||
|
||||
open override func configure(cell: ButtonBarViewCell, for indicatorInfo: IndicatorInfo) {
|
||||
cell.label.text = indicatorInfo.title
|
||||
cell.accessibilityLabel = indicatorInfo.accessibilityLabel
|
||||
if let image = indicatorInfo.image {
|
||||
cell.imageView.image = image
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
|
|||
// selectedBar is resized and its contentOffset/scroll is set correctly (the selected
|
||||
// tab/cell may end up either skewed or off screen after a rotation otherwise)
|
||||
buttonBarView.moveTo(index: currentIndex, animated: false, swipeDirection: .none, pagerScroll: .scrollOnlyIfOutOfScreen)
|
||||
buttonBarView.selectItem(at: IndexPath(item: currentIndex, section: 0), animated: false, scrollPosition: [])
|
||||
}
|
||||
|
||||
// MARK: - Public Methods
|
||||
|
|
@ -258,11 +259,11 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
|
|||
|
||||
if reload {
|
||||
let indexPathsToReload = cells.enumerated()
|
||||
.flatMap { (arg) -> IndexPath? in
|
||||
.compactMap { (arg) -> IndexPath? in
|
||||
let (index, cell) = arg
|
||||
return cell == nil ? indexPaths[index] : nil
|
||||
}
|
||||
.flatMap { (indexPath: IndexPath) -> IndexPath? in
|
||||
.compactMap { (indexPath: IndexPath) -> IndexPath? in
|
||||
return (indexPath.item >= 0 && indexPath.item < buttonBarView.numberOfItems(inSection: indexPath.section)) ? indexPath : nil
|
||||
}
|
||||
|
||||
|
|
@ -323,6 +324,7 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
|
|||
let indicatorInfo = childController.indicatorInfo(for: self)
|
||||
|
||||
cell.label.text = indicatorInfo.title
|
||||
cell.accessibilityLabel = indicatorInfo.accessibilityLabel
|
||||
cell.label.font = settings.style.buttonBarItemFont
|
||||
cell.label.textColor = settings.style.buttonBarItemTitleColor ?? cell.label.textColor
|
||||
cell.contentView.backgroundColor = settings.style.buttonBarItemBackgroundColor ?? cell.contentView.backgroundColor
|
||||
|
|
@ -345,6 +347,9 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
|
|||
changeCurrentIndex(currentIndex == indexPath.item ? nil : cell, currentIndex == indexPath.item ? cell : nil, false)
|
||||
}
|
||||
}
|
||||
cell.isAccessibilityElement = true
|
||||
cell.accessibilityLabel = cell.label.text
|
||||
cell.accessibilityTraits.insert([.button, .header])
|
||||
return cell
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,4 +29,24 @@ open class ButtonBarViewCell: UICollectionViewCell {
|
|||
@IBOutlet open var imageView: UIImageView!
|
||||
@IBOutlet open var label: UILabel!
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
isAccessibilityElement = true
|
||||
accessibilityTraits.insert([.button, .header])
|
||||
}
|
||||
|
||||
open override var isSelected: Bool {
|
||||
get {
|
||||
return super.isSelected
|
||||
}
|
||||
set {
|
||||
super.isSelected = newValue
|
||||
if (newValue) {
|
||||
accessibilityTraits.insert(.selected)
|
||||
} else {
|
||||
accessibilityTraits.remove(.selected)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,21 +29,34 @@ public struct IndicatorInfo {
|
|||
public var title: String?
|
||||
public var image: UIImage?
|
||||
public var highlightedImage: UIImage?
|
||||
public var accessibilityLabel: String?
|
||||
public var userInfo: Any?
|
||||
|
||||
public init(title: String?) {
|
||||
self.title = title
|
||||
self.accessibilityLabel = title
|
||||
}
|
||||
|
||||
public init(image: UIImage?, highlightedImage: UIImage? = nil, userInfo: Any? = nil) {
|
||||
self.image = image
|
||||
self.highlightedImage = highlightedImage
|
||||
self.userInfo = userInfo
|
||||
}
|
||||
|
||||
public init(title: String?, image: UIImage?, highlightedImage: UIImage? = nil, userInfo: Any? = nil) {
|
||||
self.title = title
|
||||
self.accessibilityLabel = title
|
||||
self.image = image
|
||||
self.highlightedImage = highlightedImage
|
||||
self.userInfo = userInfo
|
||||
}
|
||||
|
||||
public init(title: String?, accessibilityLabel:String?, image: UIImage?, highlightedImage: UIImage? = nil, userInfo: Any? = nil) {
|
||||
self.title = title
|
||||
self.accessibilityLabel = accessibilityLabel
|
||||
self.image = image
|
||||
self.highlightedImage = highlightedImage
|
||||
self.userInfo = userInfo
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -52,13 +65,16 @@ extension IndicatorInfo : ExpressibleByStringLiteral {
|
|||
|
||||
public init(stringLiteral value: String) {
|
||||
title = value
|
||||
accessibilityLabel = value
|
||||
}
|
||||
|
||||
public init(extendedGraphemeClusterLiteral value: String) {
|
||||
title = value
|
||||
accessibilityLabel = value
|
||||
}
|
||||
|
||||
public init(unicodeScalarLiteral value: String) {
|
||||
title = value
|
||||
accessibilityLabel = value
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,16 +105,16 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
reloadViewControllers()
|
||||
|
||||
let childController = viewControllers[currentIndex]
|
||||
addChildViewController(childController)
|
||||
addChild(childController)
|
||||
childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]
|
||||
containerView.addSubview(childController.view)
|
||||
childController.didMove(toParentViewController: self)
|
||||
childController.didMove(toParent: self)
|
||||
}
|
||||
|
||||
open override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
isViewAppearing = true
|
||||
childViewControllers.forEach { $0.beginAppearanceTransition(true, animated: animated) }
|
||||
children.forEach { $0.beginAppearanceTransition(true, animated: animated) }
|
||||
}
|
||||
|
||||
override open func viewDidAppear(_ animated: Bool) {
|
||||
|
|
@ -126,17 +126,17 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
moveToViewController(at: preCurrentIndex)
|
||||
}
|
||||
isViewAppearing = false
|
||||
childViewControllers.forEach { $0.endAppearanceTransition() }
|
||||
children.forEach { $0.endAppearanceTransition() }
|
||||
}
|
||||
|
||||
open override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
childViewControllers.forEach { $0.beginAppearanceTransition(false, animated: animated) }
|
||||
children.forEach { $0.beginAppearanceTransition(false, animated: animated) }
|
||||
}
|
||||
|
||||
open override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
childViewControllers.forEach { $0.endAppearanceTransition() }
|
||||
children.forEach { $0.endAppearanceTransition() }
|
||||
}
|
||||
|
||||
override open func viewDidLayoutSubviews() {
|
||||
|
|
@ -240,25 +240,25 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
|
||||
for (index, childController) in pagerViewControllers.enumerated() {
|
||||
let pageOffsetForChild = self.pageOffsetForChild(at: index)
|
||||
if fabs(containerView.contentOffset.x - pageOffsetForChild) < containerView.bounds.width {
|
||||
if abs(containerView.contentOffset.x - pageOffsetForChild) < containerView.bounds.width {
|
||||
if childController.parent != nil {
|
||||
childController.view.frame = CGRect(x: offsetForChild(at: index), y: 0, width: view.bounds.width, height: containerView.bounds.height)
|
||||
childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]
|
||||
} else {
|
||||
childController.beginAppearanceTransition(true, animated: false)
|
||||
addChildViewController(childController)
|
||||
addChild(childController)
|
||||
childController.view.frame = CGRect(x: offsetForChild(at: index), y: 0, width: view.bounds.width, height: containerView.bounds.height)
|
||||
childController.view.autoresizingMask = [.flexibleHeight, .flexibleWidth]
|
||||
containerView.addSubview(childController.view)
|
||||
childController.didMove(toParentViewController: self)
|
||||
childController.didMove(toParent: self)
|
||||
childController.endAppearanceTransition()
|
||||
}
|
||||
} else {
|
||||
if childController.parent != nil {
|
||||
childController.beginAppearanceTransition(false, animated: false)
|
||||
childController.willMove(toParentViewController: nil)
|
||||
childController.willMove(toParent: nil)
|
||||
childController.view.removeFromSuperview()
|
||||
childController.removeFromParentViewController()
|
||||
childController.removeFromParent()
|
||||
childController.endAppearanceTransition()
|
||||
}
|
||||
}
|
||||
|
|
@ -284,9 +284,9 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
guard isViewLoaded else { return }
|
||||
for childController in viewControllers where childController.parent != nil {
|
||||
childController.beginAppearanceTransition(false, animated: false)
|
||||
childController.willMove(toParentViewController: nil)
|
||||
childController.willMove(toParent: nil)
|
||||
childController.view.removeFromSuperview()
|
||||
childController.removeFromParentViewController()
|
||||
childController.removeFromParent()
|
||||
childController.endAppearanceTransition()
|
||||
}
|
||||
reloadViewControllers()
|
||||
|
|
@ -299,7 +299,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
updateContent()
|
||||
}
|
||||
|
||||
// MARK: - UIScrollDelegate
|
||||
// MARK: - UIScrollViewDelegate
|
||||
|
||||
open func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
if containerView == scrollView {
|
||||
|
|
@ -381,7 +381,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
|
|||
guard !viewControllers.isEmpty else {
|
||||
fatalError("viewControllers(for:) should provide at least one child view controller")
|
||||
}
|
||||
viewControllers.forEach { if !($0 is IndicatorInfoProvider) { fatalError("Every view controller provided by PagerTabStripDataSource's viewControllers(for:) method must conform to InfoProvider") }}
|
||||
viewControllers.forEach { if !($0 is IndicatorInfoProvider) { fatalError("Every view controller provided by PagerTabStripDataSource's viewControllers(for:) method must conform to IndicatorInfoProvider") }}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ open class SegmentedPagerTabStripViewController: PagerTabStripViewController, Pa
|
|||
|
||||
open override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
segmentedControl = segmentedControl ?? UISegmentedControl()
|
||||
let auxSegmentedControl = segmentedControl ?? UISegmentedControl()
|
||||
segmentedControl = auxSegmentedControl
|
||||
if segmentedControl.superview == nil {
|
||||
navigationItem.titleView = segmentedControl
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "XLPagerTabStrip"
|
||||
s.version = "8.0.0"
|
||||
s.version = "8.0.1"
|
||||
s.summary = "Android PagerTabStrip for iOS and much more."
|
||||
s.homepage = "https://github.com/xmartlabs/XLPagerTabStrip"
|
||||
s.license = { type: 'MIT', file: 'LICENSE' }
|
||||
|
|
@ -9,7 +9,8 @@ Pod::Spec.new do |s|
|
|||
s.social_media_url = 'https://twitter.com/xmartlabs'
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.requires_arc = true
|
||||
s.ios.source_files = 'Sources/**/*'
|
||||
s.ios.source_files = 'Sources/**/*.{h,m,swift}'
|
||||
s.ios.frameworks = 'UIKit', 'Foundation'
|
||||
s.resource_bundles = { 'XLPagerTabStrip' => ['Sources/ButtonCell.xib'] }
|
||||
s.swift_version = "4.2"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
|
@ -430,7 +430,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
|
|
@ -458,7 +458,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
|
@ -479,7 +479,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
@ -492,7 +492,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLPagerTabStripTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
|
@ -504,7 +504,7 @@
|
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLPagerTabStripTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Loading…
Reference in New Issue