First commit.

This commit is contained in:
WenchaoD 2017-02-10 22:27:00 +08:00
commit 5f4d536044
71 changed files with 6347 additions and 0 deletions

View File

@ -0,0 +1,555 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F9C6941D1E40C543007084B6 /* FSPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694171E40C543007084B6 /* FSPageControl.swift */; };
F9C6941E1E40C543007084B6 /* FSPagerCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694181E40C543007084B6 /* FSPagerCollectionView.swift */; };
F9C6941F1E40C543007084B6 /* FSPagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694191E40C543007084B6 /* FSPagerView.swift */; };
F9C694201E40C543007084B6 /* FSPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6941A1E40C543007084B6 /* FSPagerViewCell.swift */; };
F9C694211E40C543007084B6 /* FSPageViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6941B1E40C543007084B6 /* FSPageViewLayout.swift */; };
F9C694221E40C543007084B6 /* FSPageViewTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6941C1E40C543007084B6 /* FSPageViewTransformer.swift */; };
F9C6942F1E40C583007084B6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694241E40C583007084B6 /* AppDelegate.swift */; };
F9C694301E40C583007084B6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F9C694251E40C583007084B6 /* Assets.xcassets */; };
F9C694311E40C583007084B6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9C694261E40C583007084B6 /* LaunchScreen.storyboard */; };
F9C694321E40C583007084B6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9C694281E40C583007084B6 /* Main.storyboard */; };
F9C694331E40C583007084B6 /* BasicExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6942A1E40C583007084B6 /* BasicExampleViewController.swift */; };
F9C694341E40C583007084B6 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F9C6942B1E40C583007084B6 /* Info.plist */; };
F9C694351E40C583007084B6 /* PageControlExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6942C1E40C583007084B6 /* PageControlExampleViewController.swift */; };
F9C694361E40C583007084B6 /* TransformerExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6942E1E40C583007084B6 /* TransformerExampleViewController.swift */; };
F9C6945A1E40C720007084B6 /* FSPagerViewExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694591E40C720007084B6 /* FSPagerViewExampleUITests.swift */; };
F9C694711E40C8DA007084B6 /* 1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694621E40C8DA007084B6 /* 1.jpg */; };
F9C694721E40C8DA007084B6 /* 1_1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694631E40C8DA007084B6 /* 1_1.jpg */; };
F9C694731E40C8DA007084B6 /* 1_2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694641E40C8DA007084B6 /* 1_2.jpg */; };
F9C694741E40C8DA007084B6 /* 1_3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694651E40C8DA007084B6 /* 1_3.jpg */; };
F9C694751E40C8DA007084B6 /* 1_4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694661E40C8DA007084B6 /* 1_4.jpg */; };
F9C694761E40C8DA007084B6 /* 1_5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694671E40C8DA007084B6 /* 1_5.jpg */; };
F9C694771E40C8DA007084B6 /* 1_6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694681E40C8DA007084B6 /* 1_6.jpg */; };
F9C694781E40C8DA007084B6 /* 1_7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694691E40C8DA007084B6 /* 1_7.jpg */; };
F9C694791E40C8DA007084B6 /* 2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946A1E40C8DA007084B6 /* 2.jpg */; };
F9C6947A1E40C8DA007084B6 /* 3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946B1E40C8DA007084B6 /* 3.jpg */; };
F9C6947B1E40C8DA007084B6 /* 4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946C1E40C8DA007084B6 /* 4.jpg */; };
F9C6947C1E40C8DA007084B6 /* 5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946D1E40C8DA007084B6 /* 5.jpg */; };
F9C6947D1E40C8DA007084B6 /* 6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946E1E40C8DA007084B6 /* 6.jpg */; };
F9C6947E1E40C8DA007084B6 /* 7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C6946F1E40C8DA007084B6 /* 7.jpg */; };
F9C6947F1E40C8DA007084B6 /* background.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F9C694701E40C8DA007084B6 /* background.jpg */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F9C6945C1E40C720007084B6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F97C966F1E1FDE25002D9E7E /* Project object */;
proxyType = 1;
remoteGlobalIDString = F97C96761E1FDE25002D9E7E;
remoteInfo = FSPagerViewExample;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
F97C96771E1FDE25002D9E7E /* FSPagerViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSPagerViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
F9C694171E40C543007084B6 /* FSPageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageControl.swift; sourceTree = "<group>"; };
F9C694181E40C543007084B6 /* FSPagerCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerCollectionView.swift; sourceTree = "<group>"; };
F9C694191E40C543007084B6 /* FSPagerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerView.swift; sourceTree = "<group>"; };
F9C6941A1E40C543007084B6 /* FSPagerViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerViewCell.swift; sourceTree = "<group>"; };
F9C6941B1E40C543007084B6 /* FSPageViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageViewLayout.swift; sourceTree = "<group>"; };
F9C6941C1E40C543007084B6 /* FSPageViewTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageViewTransformer.swift; sourceTree = "<group>"; };
F9C694241E40C583007084B6 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F9C694251E40C583007084B6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F9C694271E40C583007084B6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F9C694291E40C583007084B6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F9C6942A1E40C583007084B6 /* BasicExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicExampleViewController.swift; sourceTree = "<group>"; };
F9C6942B1E40C583007084B6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9C6942C1E40C583007084B6 /* PageControlExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageControlExampleViewController.swift; sourceTree = "<group>"; };
F9C6942E1E40C583007084B6 /* TransformerExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransformerExampleViewController.swift; sourceTree = "<group>"; };
F9C694571E40C720007084B6 /* FSPagerViewExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FSPagerViewExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F9C694591E40C720007084B6 /* FSPagerViewExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FSPagerViewExampleUITests.swift; sourceTree = "<group>"; };
F9C6945B1E40C720007084B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9C694621E40C8DA007084B6 /* 1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1.jpg; sourceTree = "<group>"; };
F9C694631E40C8DA007084B6 /* 1_1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_1.jpg; sourceTree = "<group>"; };
F9C694641E40C8DA007084B6 /* 1_2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_2.jpg; sourceTree = "<group>"; };
F9C694651E40C8DA007084B6 /* 1_3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_3.jpg; sourceTree = "<group>"; };
F9C694661E40C8DA007084B6 /* 1_4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_4.jpg; sourceTree = "<group>"; };
F9C694671E40C8DA007084B6 /* 1_5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_5.jpg; sourceTree = "<group>"; };
F9C694681E40C8DA007084B6 /* 1_6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_6.jpg; sourceTree = "<group>"; };
F9C694691E40C8DA007084B6 /* 1_7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_7.jpg; sourceTree = "<group>"; };
F9C6946A1E40C8DA007084B6 /* 2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 2.jpg; sourceTree = "<group>"; };
F9C6946B1E40C8DA007084B6 /* 3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 3.jpg; sourceTree = "<group>"; };
F9C6946C1E40C8DA007084B6 /* 4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 4.jpg; sourceTree = "<group>"; };
F9C6946D1E40C8DA007084B6 /* 5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 5.jpg; sourceTree = "<group>"; };
F9C6946E1E40C8DA007084B6 /* 6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 6.jpg; sourceTree = "<group>"; };
F9C6946F1E40C8DA007084B6 /* 7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 7.jpg; sourceTree = "<group>"; };
F9C694701E40C8DA007084B6 /* background.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = background.jpg; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F97C96741E1FDE25002D9E7E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F9C694541E40C720007084B6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F97C966E1E1FDE25002D9E7E = {
isa = PBXGroup;
children = (
F9C694161E40C543007084B6 /* FSPagerView */,
F9C694231E40C583007084B6 /* FSPagerViewExample */,
F9C694581E40C720007084B6 /* FSPagerViewExampleUITests */,
F97C96781E1FDE25002D9E7E /* Products */,
);
sourceTree = "<group>";
};
F97C96781E1FDE25002D9E7E /* Products */ = {
isa = PBXGroup;
children = (
F97C96771E1FDE25002D9E7E /* FSPagerViewExample.app */,
F9C694571E40C720007084B6 /* FSPagerViewExampleUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
F9C694161E40C543007084B6 /* FSPagerView */ = {
isa = PBXGroup;
children = (
F9C694191E40C543007084B6 /* FSPagerView.swift */,
F9C694171E40C543007084B6 /* FSPageControl.swift */,
F9C694181E40C543007084B6 /* FSPagerCollectionView.swift */,
F9C6941A1E40C543007084B6 /* FSPagerViewCell.swift */,
F9C6941B1E40C543007084B6 /* FSPageViewLayout.swift */,
F9C6941C1E40C543007084B6 /* FSPageViewTransformer.swift */,
);
name = FSPagerView;
path = ../FSPagerView;
sourceTree = "<group>";
};
F9C694231E40C583007084B6 /* FSPagerViewExample */ = {
isa = PBXGroup;
children = (
F9C694241E40C583007084B6 /* AppDelegate.swift */,
F9C6942A1E40C583007084B6 /* BasicExampleViewController.swift */,
F9C6942E1E40C583007084B6 /* TransformerExampleViewController.swift */,
F9C6942C1E40C583007084B6 /* PageControlExampleViewController.swift */,
F9C694251E40C583007084B6 /* Assets.xcassets */,
F9C694261E40C583007084B6 /* LaunchScreen.storyboard */,
F9C694281E40C583007084B6 /* Main.storyboard */,
F9C694611E40C8DA007084B6 /* Resources */,
F9C694371E40C59E007084B6 /* Supporting Files */,
F9C6942D1E40C583007084B6 /* Resources */,
);
path = FSPagerViewExample;
sourceTree = "<group>";
};
F9C6942D1E40C583007084B6 /* Resources */ = {
isa = PBXGroup;
children = (
);
path = Resources;
sourceTree = "<group>";
};
F9C694371E40C59E007084B6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
F9C6942B1E40C583007084B6 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
F9C694581E40C720007084B6 /* FSPagerViewExampleUITests */ = {
isa = PBXGroup;
children = (
F9C694591E40C720007084B6 /* FSPagerViewExampleUITests.swift */,
F9C6945B1E40C720007084B6 /* Info.plist */,
);
path = FSPagerViewExampleUITests;
sourceTree = "<group>";
};
F9C694611E40C8DA007084B6 /* Resources */ = {
isa = PBXGroup;
children = (
F9C694621E40C8DA007084B6 /* 1.jpg */,
F9C694631E40C8DA007084B6 /* 1_1.jpg */,
F9C694641E40C8DA007084B6 /* 1_2.jpg */,
F9C694651E40C8DA007084B6 /* 1_3.jpg */,
F9C694661E40C8DA007084B6 /* 1_4.jpg */,
F9C694671E40C8DA007084B6 /* 1_5.jpg */,
F9C694681E40C8DA007084B6 /* 1_6.jpg */,
F9C694691E40C8DA007084B6 /* 1_7.jpg */,
F9C6946A1E40C8DA007084B6 /* 2.jpg */,
F9C6946B1E40C8DA007084B6 /* 3.jpg */,
F9C6946C1E40C8DA007084B6 /* 4.jpg */,
F9C6946D1E40C8DA007084B6 /* 5.jpg */,
F9C6946E1E40C8DA007084B6 /* 6.jpg */,
F9C6946F1E40C8DA007084B6 /* 7.jpg */,
F9C694701E40C8DA007084B6 /* background.jpg */,
);
name = Resources;
path = ../../Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F97C96761E1FDE25002D9E7E /* FSPagerViewExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = F97C969F1E1FDE25002D9E7E /* Build configuration list for PBXNativeTarget "FSPagerViewExample" */;
buildPhases = (
F97C96731E1FDE25002D9E7E /* Sources */,
F97C96741E1FDE25002D9E7E /* Frameworks */,
F97C96751E1FDE25002D9E7E /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = FSPagerViewExample;
productName = FSPageSliderExample;
productReference = F97C96771E1FDE25002D9E7E /* FSPagerViewExample.app */;
productType = "com.apple.product-type.application";
};
F9C694561E40C720007084B6 /* FSPagerViewExampleUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = F9C6945E1E40C720007084B6 /* Build configuration list for PBXNativeTarget "FSPagerViewExampleUITests" */;
buildPhases = (
F9C694531E40C720007084B6 /* Sources */,
F9C694541E40C720007084B6 /* Frameworks */,
F9C694551E40C720007084B6 /* Resources */,
);
buildRules = (
);
dependencies = (
F9C6945D1E40C720007084B6 /* PBXTargetDependency */,
);
name = FSPagerViewExampleUITests;
productName = FSPagerViewExampleUITests;
productReference = F9C694571E40C720007084B6 /* FSPagerViewExampleUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F97C966F1E1FDE25002D9E7E /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = "Wenchao Ding";
TargetAttributes = {
F97C96761E1FDE25002D9E7E = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HZF422TY46;
ProvisioningStyle = Automatic;
};
F9C694561E40C720007084B6 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HZF422TY46;
ProvisioningStyle = Automatic;
TestTargetID = F97C96761E1FDE25002D9E7E;
};
};
};
buildConfigurationList = F97C96721E1FDE25002D9E7E /* Build configuration list for PBXProject "FSPagerViewExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F97C966E1E1FDE25002D9E7E;
productRefGroup = F97C96781E1FDE25002D9E7E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F97C96761E1FDE25002D9E7E /* FSPagerViewExample */,
F9C694561E40C720007084B6 /* FSPagerViewExampleUITests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F97C96751E1FDE25002D9E7E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F9C694751E40C8DA007084B6 /* 1_4.jpg in Resources */,
F9C694321E40C583007084B6 /* Main.storyboard in Resources */,
F9C694741E40C8DA007084B6 /* 1_3.jpg in Resources */,
F9C6947B1E40C8DA007084B6 /* 4.jpg in Resources */,
F9C694731E40C8DA007084B6 /* 1_2.jpg in Resources */,
F9C694301E40C583007084B6 /* Assets.xcassets in Resources */,
F9C6947A1E40C8DA007084B6 /* 3.jpg in Resources */,
F9C694341E40C583007084B6 /* Info.plist in Resources */,
F9C694721E40C8DA007084B6 /* 1_1.jpg in Resources */,
F9C6947D1E40C8DA007084B6 /* 6.jpg in Resources */,
F9C6947C1E40C8DA007084B6 /* 5.jpg in Resources */,
F9C694761E40C8DA007084B6 /* 1_5.jpg in Resources */,
F9C694311E40C583007084B6 /* LaunchScreen.storyboard in Resources */,
F9C694791E40C8DA007084B6 /* 2.jpg in Resources */,
F9C694781E40C8DA007084B6 /* 1_7.jpg in Resources */,
F9C6947E1E40C8DA007084B6 /* 7.jpg in Resources */,
F9C694711E40C8DA007084B6 /* 1.jpg in Resources */,
F9C6947F1E40C8DA007084B6 /* background.jpg in Resources */,
F9C694771E40C8DA007084B6 /* 1_6.jpg in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F9C694551E40C720007084B6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F97C96731E1FDE25002D9E7E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F9C6942F1E40C583007084B6 /* AppDelegate.swift in Sources */,
F9C6941D1E40C543007084B6 /* FSPageControl.swift in Sources */,
F9C6941E1E40C543007084B6 /* FSPagerCollectionView.swift in Sources */,
F9C6941F1E40C543007084B6 /* FSPagerView.swift in Sources */,
F9C694351E40C583007084B6 /* PageControlExampleViewController.swift in Sources */,
F9C694221E40C543007084B6 /* FSPageViewTransformer.swift in Sources */,
F9C694361E40C583007084B6 /* TransformerExampleViewController.swift in Sources */,
F9C694331E40C583007084B6 /* BasicExampleViewController.swift in Sources */,
F9C694201E40C543007084B6 /* FSPagerViewCell.swift in Sources */,
F9C694211E40C543007084B6 /* FSPageViewLayout.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F9C694531E40C720007084B6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F9C6945A1E40C720007084B6 /* FSPagerViewExampleUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
F9C6945D1E40C720007084B6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F97C96761E1FDE25002D9E7E /* FSPagerViewExample */;
targetProxy = F9C6945C1E40C720007084B6 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
F9C694261E40C583007084B6 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
F9C694271E40C583007084B6 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
F9C694281E40C583007084B6 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
F9C694291E40C583007084B6 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F97C969D1E1FDE25002D9E7E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
F97C969E1E1FDE25002D9E7E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F97C96A01E1FDE25002D9E7E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "$(SRCROOT)/FSPagerViewExample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerViewExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
F97C96A11E1FDE25002D9E7E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "$(SRCROOT)/FSPagerViewExample/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerViewExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
F9C6945F1E40C720007084B6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = FSPagerViewExampleUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerViewExampleUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = FSPagerViewExample;
};
name = Debug;
};
F9C694601E40C720007084B6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = FSPagerViewExampleUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerViewExampleUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = FSPagerViewExample;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F97C96721E1FDE25002D9E7E /* Build configuration list for PBXProject "FSPagerViewExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F97C969D1E1FDE25002D9E7E /* Debug */,
F97C969E1E1FDE25002D9E7E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F97C969F1E1FDE25002D9E7E /* Build configuration list for PBXNativeTarget "FSPagerViewExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F97C96A01E1FDE25002D9E7E /* Debug */,
F97C96A11E1FDE25002D9E7E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F9C6945E1E40C720007084B6 /* Build configuration list for PBXNativeTarget "FSPagerViewExampleUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F9C6945F1E40C720007084B6 /* Debug */,
F9C694601E40C720007084B6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F97C966F1E1FDE25002D9E7E /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/wenchaoding/Developer/Xcode/FSPageSlider/FSPageSliderExample-Swift/FSPagerViewExample.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C96761E1FDE25002D9E7E"
BuildableName = "FSPagerViewExample.app"
BlueprintName = "FSPagerViewExample"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C968A1E1FDE25002D9E7E"
BuildableName = "FSPagerViewExampleTests.xctest"
BlueprintName = "FSPagerViewExampleTests"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C96951E1FDE25002D9E7E"
BuildableName = "FSPagerViewExampleUITests.xctest"
BlueprintName = "FSPagerViewExampleUITests"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C96761E1FDE25002D9E7E"
BuildableName = "FSPagerViewExample.app"
BlueprintName = "FSPagerViewExample"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C96761E1FDE25002D9E7E"
BuildableName = "FSPagerViewExample.app"
BlueprintName = "FSPagerViewExample"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F97C96761E1FDE25002D9E7E"
BuildableName = "FSPagerViewExample.app"
BlueprintName = "FSPagerViewExample"
ReferencedContainer = "container:FSPagerViewExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,37 @@
<?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>SchemeUserState</key>
<dict>
<key>FSPagerViewExample.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>F97C96761E1FDE25002D9E7E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F97C968A1E1FDE25002D9E7E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F97C96951E1FDE25002D9E7E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F9C694561E40C720007084B6</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,46 @@
//
// AppDelegate.swift
// FSPagerViewExample
//
// Created by Wenchao Ding on 06/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View File

@ -0,0 +1,93 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_cat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_footprint@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,403 @@
<?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="65m-zG-Zjb">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="1gZ-cN-8UU">
<objects>
<navigationController id="65m-zG-Zjb" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="sdq-d2-T0f">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="QFv-CW-07W" kind="relationship" relationship="rootViewController" id="LEb-Q1-2GK"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XrD-t8-fKf" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1302" y="58"/>
</scene>
<!--FSPagerView-->
<scene sceneID="BUU-qk-sys">
<objects>
<tableViewController id="QFv-CW-07W" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="5YA-MX-aYX">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections>
<tableViewSection id="dcb-AR-Y6o">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="xbh-ag-gwU" style="IBUITableViewCellStyleDefault" id="c8R-jz-NC9">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="c8R-jz-NC9" id="Xt2-E6-SSP">
<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="Banner Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xbh-ag-gwU">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="8S4-ui-raa" kind="show" id="CA7-wi-OYv"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="tbD-GK-bJ9" style="IBUITableViewCellStyleDefault" id="FxB-ZA-C8d">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="FxB-ZA-C8d" id="3kH-YG-RlN">
<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="Transformer Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tbD-GK-bJ9">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="UOf-Wx-Dm5" kind="show" id="u1f-IZ-XjV"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="kw1-Wq-GDF" style="IBUITableViewCellStyleDefault" id="Z9U-TY-wA5">
<rect key="frame" x="0.0" y="88" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z9U-TY-wA5" id="ebB-1o-WJk">
<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="PageControl Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kw1-Wq-GDF">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="lma-uy-r7Q" kind="show" id="Ywb-QZ-BEV"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="QFv-CW-07W" id="BKi-in-Tr5"/>
<outlet property="delegate" destination="QFv-CW-07W" id="z5U-b1-65X"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="FSPagerView" id="Lpl-eu-Fmc"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="odI-aG-hCn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-540" y="57"/>
</scene>
<!--Data Source-->
<scene sceneID="Dj3-5U-Hsj">
<objects>
<viewController id="8S4-ui-raa" customClass="BasicExampleViewController" customModule="FSPagerViewExample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="ZIn-7Z-O0c"/>
<viewControllerLayoutGuide type="bottom" id="FEf-c6-LBu"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="JGI-7R-hPw">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CTG-eH-B7s" customClass="FSPagerView" customModule="FSPagerViewExample" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="CTG-eH-B7s" secondAttribute="height" multiplier="375:193" id="rZx-r3-VSz"/>
</constraints>
<connections>
<outlet property="dataSource" destination="8S4-ui-raa" id="LYI-MJ-msM"/>
<outlet property="delegate" destination="8S4-ui-raa" id="ZXc-ha-CLU"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mWZ-ul-B44" customClass="FSPageControl" customModule="FSPagerViewExample" customModuleProvider="target">
<rect key="frame" x="0.0" y="232" width="375" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="wm0-Qk-cZE"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="yIp-0M-Jf9">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="pAf-pQ-W1L"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="tk3-eI-HIS" style="IBUITableViewCellStyleDefault" id="VNC-TS-zto">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VNC-TS-zto" id="zR3-db-xZl">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tk3-eI-HIS">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="slider_cell" id="RaL-gg-XJm">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="RaL-gg-XJm" id="i4q-nX-6cD">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<slider opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="bXH-0y-EZe">
<rect key="frame" x="20" y="6" width="334" height="31"/>
<connections>
<action selector="sliderValueChanged:" destination="8S4-ui-raa" eventType="valueChanged" id="lXk-Xg-9ua"/>
</connections>
</slider>
</subviews>
<constraints>
<constraint firstItem="bXH-0y-EZe" firstAttribute="centerX" secondItem="i4q-nX-6cD" secondAttribute="centerX" id="2aO-8D-W4m"/>
<constraint firstItem="bXH-0y-EZe" firstAttribute="leading" secondItem="i4q-nX-6cD" secondAttribute="leadingMargin" constant="14" id="9h3-N9-Ckw"/>
<constraint firstItem="bXH-0y-EZe" firstAttribute="centerY" secondItem="i4q-nX-6cD" secondAttribute="centerY" id="Sgl-uA-Ho2"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="8S4-ui-raa" id="d1m-77-6gI"/>
<outlet property="delegate" destination="8S4-ui-raa" id="T6X-el-WWo"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="mWZ-ul-B44" secondAttribute="trailing" id="1CQ-or-Rzw"/>
<constraint firstItem="mWZ-ul-B44" firstAttribute="bottom" secondItem="CTG-eH-B7s" secondAttribute="bottom" id="7eO-T3-IeH"/>
<constraint firstItem="yIp-0M-Jf9" firstAttribute="trailing" secondItem="CTG-eH-B7s" secondAttribute="trailing" id="DlN-Cq-Dge"/>
<constraint firstItem="mWZ-ul-B44" firstAttribute="leading" secondItem="JGI-7R-hPw" secondAttribute="leading" id="LiP-jF-2wi"/>
<constraint firstItem="CTG-eH-B7s" firstAttribute="leading" secondItem="JGI-7R-hPw" secondAttribute="leading" id="NcO-li-Ntq"/>
<constraint firstItem="yIp-0M-Jf9" firstAttribute="top" secondItem="CTG-eH-B7s" secondAttribute="bottom" id="RZU-tW-lUH"/>
<constraint firstItem="FEf-c6-LBu" firstAttribute="top" secondItem="yIp-0M-Jf9" secondAttribute="bottom" id="WdD-ac-p9r"/>
<constraint firstAttribute="trailing" secondItem="CTG-eH-B7s" secondAttribute="trailing" id="bf6-lY-6M7"/>
<constraint firstItem="CTG-eH-B7s" firstAttribute="top" secondItem="ZIn-7Z-O0c" secondAttribute="bottom" id="egB-9j-VUH"/>
<constraint firstItem="yIp-0M-Jf9" firstAttribute="leading" secondItem="CTG-eH-B7s" secondAttribute="leading" id="gAk-gv-dNu"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="FSPagerView" id="mmk-5e-Dbw"/>
<connections>
<outlet property="pageControl" destination="mWZ-ul-B44" id="Rgw-YS-NtE"/>
<outlet property="pagerView" destination="CTG-eH-B7s" id="wL1-ea-IwW"/>
<outlet property="tableView" destination="yIp-0M-Jf9" id="yBP-Gq-WRT"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GVQ-ty-CGK" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="269.60000000000002" y="-634.632683658171"/>
</scene>
<!--Data Source-->
<scene sceneID="YvR-xA-dZd">
<objects>
<viewController id="UOf-Wx-Dm5" customClass="TransformerExampleViewController" customModule="FSPagerViewExample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="YqO-fo-CV0"/>
<viewControllerLayoutGuide type="bottom" id="SYq-Ou-9Hm"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="gyH-Fj-vjS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tSq-4e-Jil" customClass="FSPagerView" customModule="FSPagerViewExample" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="tSq-4e-Jil" secondAttribute="height" multiplier="375:193" id="8cc-kO-s6Y"/>
</constraints>
<connections>
<outlet property="dataSource" destination="UOf-Wx-Dm5" id="Xcy-kf-B7Y"/>
<outlet property="delegate" destination="UOf-Wx-Dm5" id="cQD-fS-FFJ"/>
</connections>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="TEB-Em-38e">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="NRZ-QP-i1t"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="zyL-iX-55x" style="IBUITableViewCellStyleDefault" id="5d8-B4-K8u">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5d8-B4-K8u" id="uyz-07-btn">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="zyL-iX-55x">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="UOf-Wx-Dm5" id="OyG-Zv-zse"/>
<outlet property="delegate" destination="UOf-Wx-Dm5" id="M6x-pe-ONn"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="tSq-4e-Jil" firstAttribute="leading" secondItem="gyH-Fj-vjS" secondAttribute="leading" id="4JR-wM-Hj6"/>
<constraint firstAttribute="trailing" secondItem="TEB-Em-38e" secondAttribute="trailing" id="9aI-K5-eVK"/>
<constraint firstItem="TEB-Em-38e" firstAttribute="leading" secondItem="gyH-Fj-vjS" secondAttribute="leading" id="Nzy-x1-I37"/>
<constraint firstAttribute="trailing" secondItem="tSq-4e-Jil" secondAttribute="trailing" id="RgI-TS-XNy"/>
<constraint firstItem="SYq-Ou-9Hm" firstAttribute="top" secondItem="TEB-Em-38e" secondAttribute="bottom" priority="900" id="SvE-DZ-QZZ"/>
<constraint firstItem="TEB-Em-38e" firstAttribute="top" secondItem="tSq-4e-Jil" secondAttribute="bottom" id="Y6P-xg-PBD"/>
<constraint firstItem="tSq-4e-Jil" firstAttribute="top" secondItem="YqO-fo-CV0" secondAttribute="bottom" id="aLW-5l-Ysv"/>
</constraints>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="FSPagerView" id="TLb-uP-T5p"/>
<connections>
<outlet property="pagerView" destination="tSq-4e-Jil" id="gIC-GK-Dy2"/>
<outlet property="tableView" destination="TEB-Em-38e" id="IVC-J2-DaD"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="umh-fh-emi" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="270" y="78"/>
</scene>
<!--Data Source-->
<scene sceneID="ubH-x9-Tsd">
<objects>
<viewController id="lma-uy-r7Q" customClass="PageControlExampleViewController" customModule="FSPagerViewExample" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="g8E-NI-6cy"/>
<viewControllerLayoutGuide type="bottom" id="LRp-ZY-5aK"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="te4-kA-aq3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dn3-eb-Xp7" customClass="FSPagerView" customModule="FSPagerViewExample" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="Dn3-eb-Xp7" secondAttribute="height" multiplier="375:193" id="i9F-Jy-ACA"/>
</constraints>
<connections>
<outlet property="dataSource" destination="lma-uy-r7Q" id="dcA-uJ-zPd"/>
<outlet property="delegate" destination="lma-uy-r7Q" id="Rhm-2g-4ZW"/>
</connections>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="1nD-dr-afd">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="DJv-Gh-cqi"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="BsM-5g-055" style="IBUITableViewCellStyleDefault" id="xKM-zP-mhA">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xKM-zP-mhA" id="e6f-eC-LPJ">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BsM-5g-055">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="slider_cell" id="5vo-WJ-LAV">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5vo-WJ-LAV" id="4El-3j-sQo">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<slider opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="po6-ni-APz">
<rect key="frame" x="20" y="6" width="334" height="31"/>
<connections>
<action selector="sliderValueChanged:" destination="lma-uy-r7Q" eventType="valueChanged" id="gFi-4y-tQy"/>
</connections>
</slider>
</subviews>
<constraints>
<constraint firstItem="po6-ni-APz" firstAttribute="centerX" secondItem="4El-3j-sQo" secondAttribute="centerX" id="foX-sD-T7e"/>
<constraint firstItem="po6-ni-APz" firstAttribute="leading" secondItem="4El-3j-sQo" secondAttribute="leadingMargin" constant="14" id="mq9-Ba-kWP"/>
<constraint firstItem="po6-ni-APz" firstAttribute="centerY" secondItem="4El-3j-sQo" secondAttribute="centerY" id="vUz-88-Rc7"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="lma-uy-r7Q" id="lKf-ae-tE0"/>
<outlet property="delegate" destination="lma-uy-r7Q" id="c3M-CG-U6P"/>
</connections>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6XD-Hd-JIV" customClass="FSPageControl" customModule="FSPagerViewExample" customModuleProvider="target">
<rect key="frame" x="0.0" y="227" width="375" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.5" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="T3E-mc-eGj"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="LRp-ZY-5aK" firstAttribute="top" secondItem="1nD-dr-afd" secondAttribute="bottom" id="CPh-jp-Uyb"/>
<constraint firstAttribute="trailing" secondItem="1nD-dr-afd" secondAttribute="trailing" id="ClN-uY-lET"/>
<constraint firstItem="1nD-dr-afd" firstAttribute="top" secondItem="Dn3-eb-Xp7" secondAttribute="bottom" id="G58-E2-cgd"/>
<constraint firstAttribute="trailing" secondItem="Dn3-eb-Xp7" secondAttribute="trailing" id="e9e-i7-ujY"/>
<constraint firstAttribute="trailing" secondItem="6XD-Hd-JIV" secondAttribute="trailing" id="iKX-Nj-2S8"/>
<constraint firstItem="1nD-dr-afd" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="jWs-RY-JCp"/>
<constraint firstItem="Dn3-eb-Xp7" firstAttribute="top" secondItem="g8E-NI-6cy" secondAttribute="bottom" id="kns-bN-gzL"/>
<constraint firstItem="Dn3-eb-Xp7" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="mbX-uc-m8F"/>
<constraint firstItem="6XD-Hd-JIV" firstAttribute="bottom" secondItem="Dn3-eb-Xp7" secondAttribute="bottom" id="p91-lV-jBL"/>
<constraint firstItem="6XD-Hd-JIV" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="qsg-zG-lYB"/>
</constraints>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="FSPagerView" id="OcE-VL-TYq"/>
<connections>
<outlet property="pageControl" destination="6XD-Hd-JIV" id="Obv-i1-0Gv"/>
<outlet property="pagerView" destination="Dn3-eb-Xp7" id="8jk-Ur-q3d"/>
<outlet property="tableView" destination="1nD-dr-afd" id="uO4-v0-qCU"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pdp-h1-Udb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="270" y="818"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,162 @@
//
// ViewController.swift
// FSPagerViewExample
//
// Created by Wenchao Ding on 17/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
import UIKit
class BasicExampleViewController: UIViewController,UITableViewDataSource,UITableViewDelegate,FSPagerViewDataSource,FSPagerViewDelegate {
fileprivate let sectionTitles = ["Configurations", "Item Size", "Interitem Spacing"]
fileprivate let configurationTitles = ["Automatic sliding","Infinite"]
fileprivate let imageNames = ["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg"]
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var pagerView: FSPagerView! {
didSet {
self.pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
self.pagerView.itemSize = .zero
}
}
@IBOutlet weak var pageControl: FSPageControl! {
didSet {
self.pageControl.numberOfPages = self.imageNames.count
self.pageControl.contentHorizontalAlignment = .right
self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
}
}
@IBAction func sliderValueChanged(_ sender: UISlider) {
switch sender.tag {
case 1:
let newScale = 0.5+CGFloat(sender.value)*0.5 // [0.5 - 1.0]
self.pagerView.itemSize = self.pagerView.frame.size.applying(CGAffineTransform(scaleX: newScale, y: newScale))
case 2:
self.pagerView.interitemSpacing = CGFloat(sender.value) * 20 // [0 - 20]
default:
break
}
}
// MARK:- UITableViewDataSource
func numberOfSections(in tableView: UITableView) -> Int {
return self.sectionTitles.count
}
@available(iOS 2.0, *)
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:
return self.configurationTitles.count
case 1,2:
return 1
default:
break
}
return 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch indexPath.section {
case 0:
// Configurations
let cell = tableView.dequeueReusableCell(withIdentifier: "cell")!
cell.textLabel?.text = self.configurationTitles[indexPath.row]
if indexPath.row == 0 {
// Automatic Sliding
cell.accessoryType = self.pagerView.automaticSlidingInterval > 0 ? .checkmark : .none
} else if indexPath.row == 1 {
// IsInfinite
cell.accessoryType = self.pagerView.isInfinite ? .checkmark : .none
}
return cell
case 1:
// Item Spacing
let cell = tableView.dequeueReusableCell(withIdentifier: "slider_cell")!
let slider = cell.contentView.subviews.first as! UISlider
slider.tag = indexPath.section
slider.value = {
let scale: CGFloat = self.pagerView.itemSize.width/self.pagerView.frame.width
let value: CGFloat = (0.5-scale)*2
return Float(value)
}()
return cell
case 2:
// Interitem Spacing
let cell = tableView.dequeueReusableCell(withIdentifier: "slider_cell")!
let slider = cell.contentView.subviews.first as! UISlider
slider.tag = indexPath.section
slider.value = Float(self.pagerView.interitemSpacing.divided(by: 20.0))
return cell
default:
break
}
return tableView.dequeueReusableCell(withIdentifier: "cell")!
}
// MARK:- UITableViewDelegate
func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
return indexPath.section == 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
switch indexPath.section {
case 0:
if indexPath.row == 0 { // Automatic Sliding
self.pagerView.automaticSlidingInterval = 3.0 - self.pagerView.automaticSlidingInterval
} else if indexPath.row == 1 { // IsInfinite
self.pagerView.isInfinite = !self.pagerView.isInfinite
}
tableView.reloadSections([indexPath.section], with: .automatic)
default:
break
}
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
let collectionView: UICollectionView!
return self.sectionTitles[section]
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return section == 0 ? 40 : 20
}
// MARK:- FSPagerView DataSource
public func numberOfItems(in pagerView: FSPagerView) -> Int {
return self.imageNames.count
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
cell.imageView?.image = UIImage(named: self.imageNames[index])
cell.textLabel?.text = index.description+index.description
return cell
}
// MARK:- FSPagerView Delegate
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
pagerView.deselectItem(at: index, animated: true)
pagerView.scrollToItem(at: index, animated: true)
self.pageControl.currentPage = index
}
func pagerViewDidScroll(_ pagerView: FSPagerView) {
guard self.pageControl.currentPage != pagerView.currentIndex else {
return
}
self.pageControl.currentPage = pagerView.currentIndex // Or Use KVO with property "currentIndex"
}
}

View File

@ -0,0 +1,45 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,255 @@
//
// PageControlExampleViewController.swift
// FSPagerViewExample
//
// Created by Wenchao Ding on 17/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import UIKit
class PageControlExampleViewController: UIViewController,UITableViewDataSource,UITableViewDelegate,FSPagerViewDataSource,FSPagerViewDelegate {
fileprivate let imageNames = ["1_1.jpg","1_2.jpg","1_3.jpg","1_4.jpg","1_5.jpg","1_6.jpg","1_7.jpg"]
fileprivate let pageControlStyles = ["Default", "Ring", "UIImage", "UIBezierPath - Star", "UIBezierPath - Heart"]
fileprivate let pageControlAlignments = ["Right", "Center", "Left"]
fileprivate let sectionTitles = ["Style", "Item Spacing", "Interitem Spacing", "Horizontal Alignment"]
fileprivate var styleIndex = 0 {
didSet {
// Clean up
self.pageControl.setStrokeColor(nil, for: .normal)
self.pageControl.setStrokeColor(nil, for: .selected)
self.pageControl.setFillColor(nil, for: .normal)
self.pageControl.setFillColor(nil, for: .selected)
self.pageControl.setImage(nil, for: .normal)
self.pageControl.setImage(nil, for: .selected)
self.pageControl.setPath(nil, for: .normal)
self.pageControl.setPath(nil, for: .selected)
switch self.styleIndex {
case 0:
// Default
break
case 1:
// Ring
self.pageControl.setStrokeColor(.green, for: .normal)
self.pageControl.setStrokeColor(.green, for: .selected)
self.pageControl.setFillColor(.green, for: .selected)
case 2:
// Image
self.pageControl.setImage(UIImage(named:"icon_footprint"), for: .normal)
self.pageControl.setImage(UIImage(named:"icon_cat"), for: .selected)
case 3:
// UIBezierPath - Star
self.pageControl.setStrokeColor(.yellow, for: .normal)
self.pageControl.setStrokeColor(.yellow, for: .selected)
self.pageControl.setFillColor(.yellow, for: .selected)
self.pageControl.setPath(self.starPath, for: .normal)
self.pageControl.setPath(self.starPath, for: .selected)
case 4:
// UIBezierPath - Heart
let color = UIColor(red: 255/255.0, green: 102/255.0, blue: 255/255.0, alpha: 1.0)
self.pageControl.setStrokeColor(color, for: .normal)
self.pageControl.setStrokeColor(color, for: .selected)
self.pageControl.setFillColor(color, for: .selected)
self.pageControl.setPath(self.heartPath, for: .normal)
self.pageControl.setPath(self.heartPath, for: .selected)
default:
break
}
}
}
fileprivate var alignmentIndex = 0 {
didSet {
self.pageControl.contentHorizontalAlignment = [.right,.center,.left][self.alignmentIndex]
}
}
//
fileprivate var starPath: UIBezierPath {
let width = self.pageControl.itemSpacing
let height = self.pageControl.itemSpacing
let starPath = UIBezierPath()
starPath.move(to: CGPoint(x: width*0.5, y: 0))
starPath.addLine(to: CGPoint(x: width*0.677, y: height*0.257))
starPath.addLine(to: CGPoint(x: width*0.975, y: height*0.345))
starPath.addLine(to: CGPoint(x: width*0.785, y: height*0.593))
starPath.addLine(to: CGPoint(x: width*0.794, y: height*0.905))
starPath.addLine(to: CGPoint(x: width*0.5, y: height*0.8))
starPath.addLine(to: CGPoint(x: width*0.206, y: height*0.905))
starPath.addLine(to: CGPoint(x: width*0.215, y: height*0.593))
starPath.addLine(to: CGPoint(x: width*0.025, y: height*0.345))
starPath.addLine(to: CGPoint(x: width*0.323, y: height*0.257))
starPath.close()
return starPath
}
//
fileprivate var heartPath: UIBezierPath {
let width = self.pageControl.itemSpacing
let height = self.pageControl.itemSpacing
let heartPath = UIBezierPath()
heartPath.move(to: CGPoint(x: width*0.5, y: height))
heartPath.addCurve(
to: CGPoint(x: 0, y: height*0.25),
controlPoint1: CGPoint(x: width*0.5, y: height*0.75) ,
controlPoint2: CGPoint(x: 0, y: height*0.5)
)
heartPath.addArc(
withCenter: CGPoint(x: width*0.25,y: height*0.25),
radius: width * 0.25,
startAngle: CGFloat(M_PI),
endAngle: 0,
clockwise: true
)
heartPath.addArc(
withCenter: CGPoint(x: width*0.75, y: height*0.25),
radius: width * 0.25,
startAngle: CGFloat(M_PI),
endAngle: 0,
clockwise: true
)
heartPath.addCurve(
to: CGPoint(x: width*0.5, y: height),
controlPoint1: CGPoint(x: width, y: height*0.5),
controlPoint2: CGPoint(x: width*0.5, y: height*0.75)
)
heartPath.close()
return heartPath
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var pagerView: FSPagerView! {
didSet {
self.pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
}
}
@IBOutlet weak var pageControl: FSPageControl! {
didSet {
self.pageControl.numberOfPages = self.imageNames.count
self.pageControl.contentHorizontalAlignment = .right
self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
}
}
// MARK:- UITableViewDataSource
func numberOfSections(in tableView: UITableView) -> Int {
return self.sectionTitles.count
}
@available(iOS 2.0, *)
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:
return self.pageControlStyles.count
case 1,2:
return 1
case 3:
return self.pageControlAlignments.count
default:
break
}
return 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch indexPath.section {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "cell")!
cell.textLabel?.text = self.pageControlStyles[indexPath.row]
cell.accessoryType = self.styleIndex==indexPath.row ? .checkmark : .none
return cell
case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: "slider_cell")!
let slider = cell.contentView.subviews.first as! UISlider
slider.tag = indexPath.section
slider.value = Float((self.pageControl.itemSpacing-6.0).divided(by: 10.0))
return cell
case 2:
let cell = tableView.dequeueReusableCell(withIdentifier: "slider_cell")!
let slider = cell.contentView.subviews.first as! UISlider
slider.tag = indexPath.section
slider.value = Float((self.pageControl.interitemSpacing-6.0).divided(by: 10.0))
return cell
case 3:
let cell = tableView.dequeueReusableCell(withIdentifier: "cell")!
cell.textLabel?.text = self.pageControlAlignments[indexPath.row]
cell.accessoryType = self.alignmentIndex==indexPath.row ? .checkmark : .none
return cell
default:
break
}
return tableView.dequeueReusableCell(withIdentifier: "cell")!
}
// MARK:- UITableViewDelegate
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return self.sectionTitles[section]
}
func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
return [0,3].contains(indexPath.section) // 0 or 3
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
switch indexPath.section {
case 0:
self.styleIndex = indexPath.row
tableView.reloadSections([indexPath.section], with: .automatic)
case 3:
self.alignmentIndex = indexPath.row
tableView.reloadSections([indexPath.section], with: .automatic)
default:
break
}
}
// MARK:- FSPagerViewDataSource
func numberOfItems(in pagerView: FSPagerView) -> Int {
return self.imageNames.count
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
cell.imageView?.image = UIImage(named: self.imageNames[index])
return cell
}
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
pagerView.deselectItem(at: index, animated: true)
}
// MARK:- FSPagerViewDelegate
func pagerViewDidScroll(_ pagerView: FSPagerView) {
guard self.pageControl.currentPage != pagerView.currentIndex else {
return
}
self.pageControl.currentPage = pagerView.currentIndex // Or Use KVO with property "currentIndex"
}
// MARK:- Target Actions
@IBAction func sliderValueChanged(_ sender: UISlider) {
switch sender.tag {
case 1:
self.pageControl.itemSpacing = 6.0 + CGFloat(sender.value*10.0) // [6 - 16]
// Redraw UIBezierPath
if [3,4].contains(self.styleIndex) {
let index = self.styleIndex
self.styleIndex = index
}
case 2:
self.pageControl.interitemSpacing = 6.0 + CGFloat(sender.value*10.0) // [6 - 16]
default:
break
}
}
}

View File

@ -0,0 +1,109 @@
//
// TransformerExampleViewController.swift
// FSPagerViewExample
//
// Created by Wenchao Ding on 09/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import UIKit
class TransformerExampleViewController: UIViewController,FSPagerViewDataSource,FSPagerViewDelegate, UITableViewDataSource,UITableViewDelegate {
fileprivate let imageNames = ["1_1.jpg","1_2.jpg","1_3.jpg","1_4.jpg","1_5.jpg","1_6.jpg","1_7.jpg"]
fileprivate let transformerNames = ["cross fading", "zoom out", "depth", "linear", "overlap", "ferris wheel", "inverted ferris wheel", "coverflow"]
fileprivate let transformerTypes: [FSPagerViewTransformerType] = [.crossFading,
.zoomOut,
.depth,
.linear,
.overlap,
.ferrisWheel,
.invertedFerrisWheel,
.coverFlow]
fileprivate var typeIndex = 0 {
didSet {
let type = self.transformerTypes[typeIndex]
self.pagerView.transformer = FSPagerViewTransformer(type:type)
switch type {
case .none, .crossFading, .zoomOut, .depth:
self.pagerView.itemSize = .zero // 'Zero' means fill the size of parent
case .linear, .overlap:
let transform = CGAffineTransform(scaleX: 0.6, y: 0.75)
self.pagerView.itemSize = self.pagerView.frame.size.applying(transform)
case .ferrisWheel, .invertedFerrisWheel:
self.pagerView.itemSize = CGSize(width: 180, height: 140)
case .coverFlow:
self.pagerView.itemSize = CGSize(width: 220, height: 170)
}
}
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var pagerView: FSPagerView! {
didSet {
self.pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
self.typeIndex = 0
}
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let index = self.typeIndex
self.typeIndex = index // Manually trigger didSet
}
// MARK:- UITableViewDataSource
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
@available(iOS 2.0, *)
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.transformerNames.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell")!
cell.textLabel?.text = self.transformerNames[indexPath.row]
cell.accessoryType = indexPath.row == self.typeIndex ? .checkmark : .none
return cell
}
// MARK:- UITableViewDelegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
self.typeIndex = indexPath.row
if let visibleRows = tableView.indexPathsForVisibleRows {
tableView.reloadRows(at: visibleRows, with: .automatic)
}
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return "Transformers"
}
// MARK:- FSPagerViewDataSource
public func numberOfItems(in pagerView: FSPagerView) -> Int {
return imageNames.count
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
cell.imageView?.image = UIImage(named: self.imageNames[index])
cell.imageView?.contentMode = .scaleAspectFill
cell.imageView?.clipsToBounds = true
return cell
}
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
pagerView.deselectItem(at: index, animated: true)
pagerView.scrollToItem(at: index, animated: true)
}
}

View File

@ -0,0 +1,36 @@
//
// FSPagerViewExampleUITests.swift
// FSPagerViewExampleUITests
//
// Created by Wenchao Ding on 31/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import XCTest
class FSPagerViewExampleUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
XCUIApplication().launch()
// In UI tests its important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
}

View File

@ -0,0 +1,22 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

18
FSPagerView.podspec Normal file
View File

@ -0,0 +1,18 @@
Pod::Spec.new do |s|
s.name = "FSPagerView"
s.version = "0.1.0"
s.summary = "FSPagerView is an elegant Screen Slide Library implemented primarily with UICollectionView. It is extremely helpful for making Banner、Product Show、Welcome Pages、Screen/ViewController Sliders."
s.homepage = "https://github.com/WenchaoD/FSPagerView"
s.license = 'MIT'
s.author = { "Wenchao Ding" => "f33chobits@gmail.com" }
s.source = { :git => "https://github.com/WenchaoD/FSPagerView.git", :tag => s.version.to_s }
s.platform = :ios
s.ios.deployment_target = '8.0'
s.requires_arc = true
s.framework = 'UIKit'
s.source_files = 'FSPagerView/*.{h,m}'
end

View File

@ -0,0 +1,287 @@
//
// FSPageControl.swift
// FSPagerView
//
// Created by Wenchao Ding on 17/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
import UIKit
@IBDesignable
open class FSPageControl: UIControl {
/// The number of page indicators of the page control. Default is 0.
@IBInspectable
open var numberOfPages: Int = 0 {
didSet {
self.setNeedsCreateIndicators()
}
}
/// The current page, highlighted by the page control. Default is 0.
@IBInspectable
open var currentPage: Int = 0 {
didSet {
self.setNeedsUpdateIndicators()
}
}
/// The spacing to use of page indicators in the page control.
@IBInspectable
open var itemSpacing: CGFloat = 6 {
didSet {
self.setNeedsUpdateIndicators()
}
}
/// The spacing to use between page indicators in the page control.
@IBInspectable
open var interitemSpacing: CGFloat = 6 {
didSet {
self.setNeedsLayout()
}
}
/// The distance that the page indicators is inset from the enclosing page control.
@IBInspectable
open var contentInsets: UIEdgeInsets = .zero {
didSet {
self.setNeedsLayout()
}
}
open override var contentHorizontalAlignment: UIControlContentHorizontalAlignment {
didSet {
self.setNeedsLayout()
}
}
internal var strokeColors: [UIControlState: UIColor] = [:]
internal var fillColors: [UIControlState: UIColor] = [:]
internal var paths: [UIControlState: UIBezierPath] = [:]
internal var images: [UIControlState: UIImage] = [:]
internal var alphas: [UIControlState: CGFloat] = [:]
internal var transforms: [UIControlState: CGAffineTransform] = [:]
fileprivate weak var contentView: UIView!
fileprivate var needsUpdateIndicators = false
fileprivate var needsCreateIndicators = false
fileprivate var indicatorLayers = [CAShapeLayer]()
fileprivate var runLoopObserver: CFRunLoopObserver?
fileprivate var runLoopCallback: CFRunLoopObserverCallBack = {
(observer: CFRunLoopObserver?, activity: CFRunLoopActivity, info: UnsafeMutableRawPointer?) -> Void in
guard let info = info else {
return
}
let pageControl = Unmanaged<FSPageControl>.fromOpaque(info).takeUnretainedValue()
if pageControl.needsCreateIndicators {
pageControl.createIndicatorsIfNecessary()
}
if pageControl.needsUpdateIndicators {
pageControl.updateIndicatorsIfNecessary()
}
}
public override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
deinit {
CFRunLoopRemoveObserver(CFRunLoopGetCurrent(), self.runLoopObserver, .commonModes);
}
open override func layoutSubviews() {
super.layoutSubviews()
self.contentView.frame = {
let x = self.contentInsets.left
let y = self.contentInsets.top
let width = self.frame.width - self.contentInsets.left - self.contentInsets.right
let height = self.frame.height - self.contentInsets.top - self.contentInsets.bottom
let frame = CGRect(x: x, y: y, width: width, height: height)
return frame
}()
}
open override func layoutSublayers(of layer: CALayer) {
super.layoutSublayers(of: layer)
let diameter = self.itemSpacing
let spacing = self.interitemSpacing
var x: CGFloat = {
switch self.contentHorizontalAlignment {
case .left:
return 0
case .center, .fill:
let midX = self.contentView.bounds.midX
let amplitude = CGFloat(self.numberOfPages/2) * diameter + spacing*CGFloat((self.numberOfPages-1)/2)
return midX - amplitude
case .right:
let contentWidth = diameter*CGFloat(self.numberOfPages) + CGFloat(self.numberOfPages-1)*spacing
return contentView.frame.width - contentWidth
}
}()
for (index,value) in self.indicatorLayers.enumerated() {
let state: UIControlState = (index == self.currentPage) ? .selected : .normal
let image = self.images[state]
let size = image?.size ?? CGSize(width: diameter, height: diameter)
let origin = CGPoint(x: x - (size.width-diameter)*0.5, y: self.contentView.bounds.midY-size.height*0.5)
value.frame = CGRect(origin: origin, size: size)
x = x + spacing + diameter
}
}
/// Sets the stroke color for page indicators to use for the specified state. (selected/normal).
@objc(setStrokeColor:forState:)
open func setStrokeColor(_ strokeColor: UIColor?, for state: UIControlState) {
guard self.strokeColors[state] != strokeColor else {
return
}
self.strokeColors[state] = strokeColor
self.setNeedsUpdateIndicators()
}
/// Sets the fill color for page indicators to use for the specified state. (selected/normal).
@objc(setFillColor:forState:)
open func setFillColor(_ fillColor: UIColor?, for state: UIControlState) {
guard self.fillColors[state] != fillColor else {
return
}
self.fillColors[state] = fillColor
self.setNeedsUpdateIndicators()
}
/// Sets the image for page indicators to use for the specified state. (selected/normal).
@objc(setImage:forState:)
open func setImage(_ image: UIImage?, for state: UIControlState) {
guard self.images[state] != image else {
return
}
self.images[state] = image
self.setNeedsUpdateIndicators()
}
/// Sets the alpha value for page indicators to use for the specified state. (selected/normal).
@objc(setAlpha:forState:)
open func setAlpha(_ alpha: CGFloat, for state: UIControlState) {
guard self.alphas[state] != alpha else {
return
}
self.alphas[state] = alpha
self.setNeedsUpdateIndicators()
}
/// Sets the path for page indicators to use for the specified state. (selected/normal).
@objc(setPath:forState:)
open func setPath(_ path: UIBezierPath?, for state: UIControlState) {
guard self.paths[state] != path else {
return
}
self.paths[state] = path
self.setNeedsUpdateIndicators()
}
// MARK: - Private functions
fileprivate func commonInit() {
// Content View
let view = UIView(frame: .zero)
view.backgroundColor = UIColor.clear
self.addSubview(view)
self.contentView = view
// RunLoop
let runLoop = CFRunLoopGetCurrent()
let activities: CFRunLoopActivity = [.entry,.afterWaiting]
var context = CFRunLoopObserverContext(version: 0, info: Unmanaged.passUnretained(self).toOpaque(), retain: nil, release: nil, copyDescription: nil)
self.runLoopObserver = CFRunLoopObserverCreate(nil, activities.rawValue, true, Int.max, self.runLoopCallback, &context)
CFRunLoopAddObserver(runLoop, self.runLoopObserver, .commonModes)
}
fileprivate func setNeedsUpdateIndicators() {
self.needsUpdateIndicators = true
self.setNeedsLayout()
}
fileprivate func updateIndicatorsIfNecessary() {
guard self.needsUpdateIndicators else {
return
}
guard self.indicatorLayers.count > 0 else {
return
}
self.needsUpdateIndicators = false
self.indicatorLayers.forEach { (layer) in
self.updateIndicatorAttributes(for: layer)
}
}
fileprivate func updateIndicatorAttributes(for layer: CAShapeLayer) {
let index = self.indicatorLayers.index(of: layer)
let state: UIControlState = index == self.currentPage ? .selected : .normal
if let image = self.images[state] {
layer.strokeColor = nil
layer.fillColor = nil
layer.path = nil
layer.contents = image.cgImage
} else {
layer.contents = nil
let strokeColor = self.strokeColors[state]
let fillColor = self.fillColors[state]
if strokeColor == nil && fillColor == nil {
layer.fillColor = (state == .selected ? UIColor.white : UIColor.gray).cgColor
layer.strokeColor = nil
} else {
layer.strokeColor = strokeColor?.cgColor
layer.fillColor = fillColor?.cgColor
}
layer.path = self.paths[state]?.cgPath ?? UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: self.itemSpacing, height: self.itemSpacing)).cgPath
}
if let transform = self.transforms[state] {
layer.transform = CATransform3DMakeAffineTransform(transform)
}
layer.opacity = Float(self.alphas[state] ?? 1.0)
}
fileprivate func setNeedsCreateIndicators() {
self.needsCreateIndicators = true
}
fileprivate func createIndicatorsIfNecessary() {
guard self.needsCreateIndicators else {
return
}
self.needsCreateIndicators = false
self.indicatorLayers.forEach { (layer) in
layer.removeFromSuperlayer()
}
self.indicatorLayers.removeAll()
for _ in 0..<self.numberOfPages {
let layer = CAShapeLayer()
layer.actions = ["bounds": NSNull()]
self.contentView.layer.addSublayer(layer)
self.indicatorLayers.append(layer)
}
self.setNeedsUpdateIndicators()
self.updateIndicatorsIfNecessary()
}
}
extension UIControlState: Hashable {
public var hashValue: Int {
return Int((6777*self.rawValue+3777)%UInt(UInt16.max))
}
}

View File

@ -0,0 +1,245 @@
//
// FSPagerViewLayout.swift
// FSPagerView
//
// Created by Wenchao Ding on 20/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
import UIKit
class FSPagerViewLayout: UICollectionViewLayout {
internal var contentSize: CGSize = .zero
internal var leadingSpacing: CGFloat = 0
internal var itemSpan: CGFloat = 0
internal var needsReprepare = true
fileprivate var pagerView: FSPagerView? {
return self.collectionView?.superview?.superview as? FSPagerView
}
fileprivate var layoutAttributes: [IndexPath:UICollectionViewLayoutAttributes] = [:]
fileprivate var isInfinite: Bool = true
fileprivate var collectionViewSize: CGSize = .zero
fileprivate var numberOfSections = 1
fileprivate var numberOfItems = 0
fileprivate var actualInteritemSpacing: CGFloat = 0
fileprivate var actualItemSize: CGSize = .zero
override init() {
super.init()
self.commonInit()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
deinit {
NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
override open func prepare() {
guard let collectionView = self.collectionView, let pagerView = self.pagerView else {
return
}
guard self.needsReprepare || self.collectionViewSize != collectionView.frame.size else {
return
}
self.needsReprepare = false
self.collectionViewSize = collectionView.frame.size
self.layoutAttributes.removeAll()
// Calculate basic parameters/variables
self.numberOfSections = pagerView.numberOfSections(in: collectionView)
self.numberOfItems = pagerView.collectionView(collectionView, numberOfItemsInSection: 0)
guard self.numberOfItems > 0 && self.numberOfSections > 0 else {
return
}
self.actualItemSize = {
var size = pagerView.itemSize
if size == .zero {
size = collectionView.frame.size
}
return size
}()
self.actualInteritemSpacing = {
if let transformer = pagerView.transformer {
return transformer.proposedInteritemSpacing()
}
return pagerView.interitemSpacing
}()
self.leadingSpacing = (collectionView.frame.width-self.actualItemSize.width)*0.5
self.itemSpan = self.actualItemSize.width+self.actualInteritemSpacing
// Calculate and cache contentSize, rather than calculating each time
self.contentSize = {
let numberOfItems = self.numberOfItems*self.numberOfSections
var contentSizeWidth: CGFloat = self.leadingSpacing*2 // Leading & trailing spacing
contentSizeWidth += CGFloat(numberOfItems-1)*self.actualInteritemSpacing // Interitem spacing
contentSizeWidth += CGFloat(numberOfItems)*self.actualItemSize.width // Item sizes
let contentSize = CGSize(width: contentSizeWidth, height: collectionView.frame.height)
return contentSize
}()
self.adjustCollectionViewBounds()
}
override open var collectionViewContentSize: CGSize {
return self.contentSize
}
override open func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
return true
}
override open func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
var layoutAttributes = [UICollectionViewLayoutAttributes]()
guard self.itemSpan > 0, !rect.isEmpty else {
return layoutAttributes
}
let rect = rect.intersection(CGRect(origin: .zero, size: self.contentSize))
guard !rect.isEmpty else {
return layoutAttributes
}
// Calculate start position and index of certain rects
let numberOfItemsBefore = max(Int((rect.minX-self.leadingSpacing)/self.itemSpan),0)
let startPosition = self.leadingSpacing + CGFloat(numberOfItemsBefore)*self.itemSpan
let startIndex = numberOfItemsBefore
// Create layout attributes
var itemIndex = startIndex
var x = startPosition
let maxPosition = min(rect.maxX,self.contentSize.width-self.actualItemSize.width)
while x <= maxPosition {
let indexPath = IndexPath(item: itemIndex%self.numberOfItems, section: itemIndex/self.numberOfItems)
let attributes = self.layoutAttributesForItem(at: indexPath)!
self.applyTransform(to: attributes)
layoutAttributes.append(attributes)
itemIndex += 1
x += self.itemSpan
}
return layoutAttributes
}
override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard let collectionView = self.collectionView else {
return UICollectionViewLayoutAttributes(forCellWith: indexPath)
}
if let attributes = self.layoutAttributes[indexPath] {
return attributes
}
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
let x = self.frame(for: indexPath).minX
let center = CGPoint(x: x+self.actualItemSize.width*0.5, y: collectionView.frame.height*0.5)
attributes.center = center
attributes.size = self.actualItemSize
self.layoutAttributes[indexPath] = attributes
return attributes
}
override open func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
guard let collectionView = self.collectionView else {
return proposedContentOffset
}
let proposedContentOffsetX: CGFloat = {
var offset: CGFloat = round(proposedContentOffset.x/self.itemSpan)*self.itemSpan
let translation = collectionView.panGestureRecognizer.translation(in: collectionView).x
let minFlippingDistance = min(0.5 * self.itemSpan,150)
if abs(translation) <= minFlippingDistance {
if abs(velocity.x) >= 0.3 {
offset += self.itemSpan * (velocity.x)/abs(velocity.x)
}
}
return offset
}()
let proposedContentOffset = CGPoint(x: proposedContentOffsetX, y: proposedContentOffset.y)
return proposedContentOffset
}
// MARK:- Internal functions
internal func forceInvalidate() {
self.needsReprepare = true
self.invalidateLayout()
}
internal func contentOffset(for indexPath: IndexPath) -> CGPoint {
let origin = self.frame(for: indexPath).origin
guard let collectionView = self.collectionView else {
return origin
}
let contentOffset = CGPoint(x: origin.x - (collectionView.frame.width*0.5-self.actualItemSize.width*0.5), y: collectionView.contentOffset.y)
return contentOffset
}
internal func frame(for indexPath: IndexPath) -> CGRect {
let numberOfItems = self.numberOfItems*indexPath.section + indexPath.item
let originX = self.leadingSpacing + CGFloat(numberOfItems)*self.itemSpan
let originY = (self.collectionView!.frame.height-self.actualItemSize.height)
let origin = CGPoint(x: originX, y: originY)
let frame = CGRect(origin: origin, size: self.actualItemSize)
return frame
}
internal func nextIndexPath(for indexPath: IndexPath) -> IndexPath {
let section = indexPath.section
let item = indexPath.item + 1
if item >= self.numberOfItems {
return IndexPath(item: 0, section: min(section+1,self.numberOfSections-1))
}
return IndexPath(item: item, section: section)
}
internal func previousIndexPath(for indexPath: IndexPath) -> IndexPath {
let section = indexPath.section
let item = indexPath.item - 1
if item < 0 {
return IndexPath(item: self.numberOfItems-1, section: max(section-1,0))
}
return IndexPath(item: item, section: section)
}
// MARK:- Private functions
fileprivate func commonInit() {
NotificationCenter.default.addObserver(self, selector: #selector(didReceiveNotification(notification:)), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
@objc
fileprivate func didReceiveNotification(notification: Notification) {
if self.pagerView?.itemSize == .zero {
self.adjustCollectionViewBounds()
}
}
fileprivate func adjustCollectionViewBounds() {
guard let collectionView = self.collectionView, let pagerView = self.pagerView else {
return
}
let currentIndex = pagerView.currentIndex
let newIndexPath = IndexPath(item: currentIndex, section: self.isInfinite ? self.numberOfSections/2 : 0)
let contentOffsetX = self.contentOffset(for: newIndexPath).x
let contentOffset = CGPoint(x: contentOffsetX, y: 0)
let newBounds = CGRect(origin: contentOffset, size: collectionView.frame.size)
collectionView.bounds = newBounds
}
fileprivate func applyTransform(to attributes: UICollectionViewLayoutAttributes) {
guard let collectionView = self.collectionView else {
return
}
guard let transformer = self.pagerView?.transformer else {
return
}
let ruler = collectionView.bounds.midX
let position = (attributes.center.x-ruler)/self.itemSpan
transformer.applyTransform(to: attributes, for: position)
}
}

View File

@ -0,0 +1,202 @@
//
// FSPagerViewTransformer.swift
// FSPagerView
//
// Created by Wenchao Ding on 05/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import UIKit
@objc
public enum FSPagerViewTransformerType: Int {
case none
case crossFading
case zoomOut
case depth
case overlap
case linear
case coverFlow
case ferrisWheel
case invertedFerrisWheel
}
open class FSPagerViewTransformer: NSObject {
open internal(set) weak var pagerView: FSPagerView?
open internal(set) var type: FSPagerViewTransformerType = .none
open var minimumScale: CGFloat = 0.65
open var minimumAlpha: CGFloat = 0.6
public init(type: FSPagerViewTransformerType) {
super.init()
self.type = type
switch type {
case .zoomOut:
self.minimumScale = 0.85
case .depth:
self.minimumScale = 0.5
default:
break
}
}
public override init () {
super.init()
}
// Apply transform to attributes - zIndex: Int, frame: CGRect, alpha: CGFloat, transform: CGAffineTransform or transform3D: CATransform3D.
open func applyTransform(to attributes: UICollectionViewLayoutAttributes, for position: CGFloat) {
guard let pagerView = self.pagerView else {
return
}
let itemSpan = pagerView.collectionViewLayout.itemSpan
switch self.type {
case .none:
break
case .crossFading:
var zIndex = 0
var alpha: CGFloat = 0
let transform = CGAffineTransform(translationX: -itemSpan * position, y: 0)
if (abs(position) < 1) { // [-1,1]
// Use the default slide transition when moving to the left page
alpha = 1 - abs(position)
zIndex = 1
} else { // (1,+Infinity]
// This page is way off-screen to the right.
alpha = 0
zIndex = Int.min
}
attributes.alpha = alpha
attributes.transform = transform
attributes.zIndex = zIndex
case .zoomOut:
var alpha: CGFloat = 0
var transform = CGAffineTransform.identity
switch position {
case -CGFloat.greatestFiniteMagnitude ..< -1 : // [-Infinity,-1)
// This page is way off-screen to the left.
alpha = 0
case -1 ... 1 : // [-1,1]
// Modify the default slide transition to shrink the page as well
let scaleFactor = max(self.minimumScale, 1 - abs(position))
let vertMargin = attributes.bounds.height * (1 - scaleFactor) / 2;
let horzMargin = itemSpan * (1 - scaleFactor) / 2;
transform.a = scaleFactor
transform.d = scaleFactor
transform.tx = position < 0 ? (horzMargin - vertMargin*2) : (-horzMargin + vertMargin*2)
// Fade the page relative to its size.
alpha = self.minimumAlpha + (scaleFactor-self.minimumScale)/(1-self.minimumScale)*(1-self.minimumAlpha)
case 1 ... CGFloat.greatestFiniteMagnitude : // (1,+Infinity]
// This page is way off-screen to the right.
alpha = 0
default:
break
}
attributes.alpha = alpha
attributes.transform = transform
case .depth:
var transform = CGAffineTransform.identity
var zIndex = 0
var alpha: CGFloat = 0.0
switch position {
case -CGFloat.greatestFiniteMagnitude ..< -1: // [-Infinity,-1)
// This page is way off-screen to the left.
alpha = 0
zIndex = 0
case -1 ... 0: // [-1,0]
// Use the default slide transition when moving to the left page
alpha = 1
transform.tx = 0
transform.a = 1
transform.d = 1
zIndex = 1
case 0 ..< 1: // (0,1]
// Fade the page out.
alpha = CGFloat(1.0) - position
// Counteract the default slide transition
transform.tx = itemSpan * -position;
// Scale the page down (between minimumScale and 1)
let scaleFactor = self.minimumScale
+ (1.0 - self.minimumScale) * (1.0 - abs(position));
transform.a = scaleFactor
transform.d = scaleFactor
zIndex = 0
case 1 ... CGFloat.greatestFiniteMagnitude: // (1,+Infinity]
// This page is way off-screen to the right.
alpha = 0
zIndex = 0
default:
break
}
attributes.alpha = alpha
attributes.transform = transform
attributes.zIndex = zIndex
case .overlap,.linear:
let scale = max(1 - (1-self.minimumScale) * abs(position), self.minimumScale)
let transform = CGAffineTransform(scaleX: scale, y: scale)
attributes.transform = transform
let alpha = (self.minimumAlpha + (1-abs(position))*(1-self.minimumAlpha))
attributes.alpha = alpha
let zIndex = (1-abs(position)) * 10
attributes.zIndex = Int(zIndex)
case .coverFlow:
let position = min(max(-position,-1) ,1)
let rotation = sin(position*CGFloat(M_PI_2)) * CGFloat(M_PI_4)*1.5
let translationZ = -itemSpan * 0.5*abs(position)
var transform3D = CATransform3DIdentity
transform3D.m34 = -0.002
transform3D = CATransform3DRotate(transform3D,rotation, 0, 1, 0)
transform3D = CATransform3DTranslate(transform3D,0, 0, translationZ)
attributes.zIndex = 100 - Int(abs(position))
attributes.transform3D = transform3D
case .ferrisWheel, .invertedFerrisWheel:
var zIndex = 0
var transform = CGAffineTransform.identity
switch position {
case -5 ... 5:
let itemSpacing = attributes.bounds.width+self.proposedInteritemSpacing()
let count: CGFloat = 14
let circle: CGFloat = CGFloat(M_PI) * 2.0
let radius = itemSpacing * count / circle
let ty = radius * (self.type == .ferrisWheel ? 1 : -1)
let theta = circle / count
let rotation = position * theta * (self.type == .ferrisWheel ? 1 : -1)
transform = transform.translatedBy(x: -position*itemSpacing, y: ty)
transform = transform.rotated(by: rotation)
transform = transform.translatedBy(x: 0, y: -ty)
zIndex = Int((4.0-abs(position)*10))
break
default:
break
}
attributes.alpha = abs(position) < 0.5 ? 1 : self.minimumAlpha
attributes.transform = transform
attributes.zIndex = zIndex
break
}
}
// An interitem spacing proposed by transformer class. This will override the default interitemSpacing provided by page slider.
open func proposedInteritemSpacing() -> CGFloat {
guard let pagerView = self.pagerView else {
return 0
}
switch self.type {
case .overlap:
return pagerView.itemSize.width * -self.minimumScale * 0.6
case .linear:
return pagerView.itemSize.width * -self.minimumScale * 0.2
case .coverFlow:
return -pagerView.itemSize.width * sin(CGFloat(M_PI_4)/4.0*3.0)
case .ferrisWheel,.invertedFerrisWheel:
return -pagerView.itemSize.width * 0.15
default:
break
}
return pagerView.interitemSpacing
}
}

View File

@ -0,0 +1,60 @@
//
// FSPagerViewCollectionView.swift
// FSPagerView
//
// Created by Wenchao Ding on 24/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
// 1. Reject -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary]
// 2. Group initialized features
import UIKit
class FSPagerViewCollectionView: UICollectionView {
fileprivate weak var pagerView: FSPagerView? {
return self.superview?.superview as? FSPagerView
}
override var scrollsToTop: Bool {
set {
super.scrollsToTop = false
}
get {
return false
}
}
override var contentInset: UIEdgeInsets {
set {
super.contentInset = .zero
if (newValue.top > 0) {
let contentOffset = CGPoint(x:self.contentOffset.x, y:self.contentOffset.y+newValue.top);
self.contentOffset = contentOffset
}
}
get {
return super.contentInset
}
}
override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
super.init(frame: frame, collectionViewLayout: layout)
self.commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
fileprivate func commonInit() {
self.contentInset = .zero
self.scrollsToTop = false
self.isPagingEnabled = false
self.decelerationRate = UIScrollViewDecelerationRateFast
self.showsVerticalScrollIndicator = false
self.showsHorizontalScrollIndicator = false
}
}

View File

@ -0,0 +1,468 @@
//
// FSPagerView.swift
// FSPagerView
//
// Created by Wenchao Ding on 17/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
import UIKit
@objc
public protocol FSPagerViewDataSource: NSObjectProtocol {
/// Asks your data source object for the number of items in the pager view.
@objc(numberOfItemsInpagerView:)
func numberOfItems(in pagerView: FSPagerView) -> Int
/// Asks your data source object for the cell that corresponds to the specified item in the pager view.
@objc(pagerView:cellForItemAtIndex:)
func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell
}
@objc
public protocol FSPagerViewDelegate: NSObjectProtocol {
/// Asks the delegate if the item should be highlighted during tracking.
@objc(pagerView:shouldHighlightItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, shouldHighlightItemAt index: Int) -> Bool
/// Tells the delegate that the item at the specified index was highlighted.
@objc(pagerView:didHighlightItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, didHighlightItemAt index: Int)
/// Asks the delegate if the specified item should be selected.
@objc(pagerView:shouldSelectItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, shouldSelectItemAt index: Int) -> Bool
/// Tells the delegate that the item at the specified index was selected.
@objc(pagerView:didSelectItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int)
/// Tells the delegate that the specified cell is about to be displayed in the pager view.
@objc(pagerView:willDisplayCell:forItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, willDisplay cell: FSPagerViewCell, forItemAt index: Int)
/// Tells the delegate that the specified cell was removed from the pager view.
@objc(pagerView:didEndDisplayingCell:forItemAtIndex:)
optional func pagerView(_ pagerView: FSPagerView, didEndDisplaying cell: FSPagerViewCell, forItemAt index: Int)
/// Tells the delegate when the pager view is about to start scrolling the content.
@objc(pagerViewWillBeginDragging:)
optional func pagerViewWillBeginDragging(_ pagerView: FSPagerView)
/// Tells the delegate when the user finishes scrolling the content.
@objc(pagerViewWillEndDragging:targetIndex:)
optional func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int)
/// Tells the delegate when the user scrolls the content view within the receiver.
@objc(pagerViewDidScroll:)
optional func pagerViewDidScroll(_ pagerView: FSPagerView)
/// Tells the delegate when a scrolling animation in the pager view concludes.
@objc(pagerViewDidEndScrollAnimation:)
optional func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView)
/// Tells the delegate that the pager view has ended decelerating the scrolling movement.
@objc(pagerViewDidEndDecelerating:)
optional func pagerViewDidEndDecelerating(_ pagerView: FSPagerView)
}
@IBDesignable
open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelegate {
// MARK: - Public properties
#if TARGET_INTERFACE_BUILDER
// Yes you need to lie to the Interface Builder, otherwise "@IBOutlet" cannot be connected.
@IBOutlet open weak var dataSource: AnyObject?
@IBOutlet open weak var delegate: AnyObject?
#else
open weak var dataSource: FSPagerViewDataSource?
open weak var delegate: FSPagerViewDelegate?
#endif
/// The time interval of automatic sliding. 0 means disabling automatic sliding. Default is 0.
@IBInspectable
open var automaticSlidingInterval: CGFloat = 0.0 {
didSet {
self.cancelTimer()
if self.automaticSlidingInterval > 0 {
self.startTimer()
}
}
}
/// The spacing to use between items in the pager view. Default is 0.
@IBInspectable
open var interitemSpacing: CGFloat = 0 {
didSet {
self.collectionViewLayout.forceInvalidate()
}
}
/// The item size of the pager view. .zero means always fill the bounds of the pager view. Default is .zero.
@IBInspectable
open var itemSize: CGSize = .zero {
didSet {
self.collectionViewLayout.forceInvalidate()
}
}
/// A Boolean value indicates that whether the pager view has infinite items. Default is false.
@IBInspectable
open var isInfinite: Bool = false {
didSet {
self.collectionView.reloadData()
self.collectionViewLayout.forceInvalidate()
}
}
/// The background view of the pager view
@IBInspectable
open var backgroundView: UIView? {
didSet {
if let backgroundView = self.backgroundView {
if backgroundView.superview != nil {
backgroundView.removeFromSuperview()
}
self.insertSubview(backgroundView, at: 0)
self.setNeedsLayout()
}
}
}
/// The transformer of the pager view
open var transformer: FSPagerViewTransformer? {
didSet {
self.transformer?.pagerView = self
self.collectionViewLayout.forceInvalidate()
}
}
/// Returns whether the user has touched the content to initiate scrolling.
open var isTracking: Bool {
return self.collectionView.isTracking
}
// MARK: - Public readonly-properties
open fileprivate(set) dynamic var currentIndex: Int = 0
// MARK: - Private properties
internal weak var collectionViewLayout: FSPagerViewLayout!
internal weak var collectionView: FSPagerViewCollectionView!
internal weak var contentView: UIView!
internal var timer: Timer?
internal var numberOfItems: Int = 0
internal var numberOfSections: Int = 0
fileprivate var dequeingSection = 0
fileprivate var centermostIndexPath: IndexPath {
guard self.numberOfItems > 0, self.collectionView.contentSize.width > 0 else {
return IndexPath(item: 0, section: 0)
}
let sortedIndexPaths = self.collectionView.indexPathsForVisibleItems.sorted { (l, r) -> Bool in
let leftCenter = self.collectionViewLayout.frame(for: l).midX
let rightCenter = self.collectionViewLayout.frame(for: r).midX
let ruler = self.collectionView.bounds.midX
return abs(ruler-leftCenter) < abs(ruler-rightCenter)
}
let indexPath = sortedIndexPaths.first
if let indexPath = indexPath {
return indexPath
}
return IndexPath(item: 0, section: 0)
}
fileprivate var possibleTargetingIndexPath: IndexPath?
// MARK: - Overriden functions
public override init(frame: CGRect) {
super.init(frame: frame)
self.commonInit()
}
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
open override func layoutSubviews() {
super.layoutSubviews()
self.backgroundView?.frame = self.bounds
self.contentView.frame = self.bounds
self.collectionView.frame = self.contentView.bounds
}
open override func willMove(toWindow newWindow: UIWindow?) {
super.willMove(toWindow: newWindow)
if newWindow != nil {
self.startTimer()
} else {
self.cancelTimer()
}
}
open override func prepareForInterfaceBuilder() {
super.prepareForInterfaceBuilder()
self.contentView.layer.borderWidth = 1
self.contentView.layer.cornerRadius = 5
self.contentView.layer.masksToBounds = true
let label = UILabel(frame: self.contentView.bounds)
label.textAlignment = .center
label.font = UIFont.boldSystemFont(ofSize: 25)
label.text = "FSPagerView"
self.contentView.addSubview(label)
}
deinit {
self.collectionView.dataSource = nil
self.collectionView.delegate = nil
}
// MARK: - UICollectionViewDataSource
public func numberOfSections(in collectionView: UICollectionView) -> Int {
guard let dataSource = self.dataSource else {
return 1
}
self.numberOfItems = dataSource.numberOfItems(in: self)
self.numberOfSections = self.isInfinite ? Int(Int16.max)/self.numberOfItems : 1
return self.numberOfSections
}
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.numberOfItems
}
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let index = indexPath.item
self.dequeingSection = indexPath.section
let cell = self.dataSource!.pagerView(self, cellForItemAt: index)
return cell
}
// MARK: - UICollectionViewDelegate
public func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool {
guard let function = self.delegate?.pagerView(_:shouldHighlightItemAt:) else {
return true
}
let index = indexPath.item % self.numberOfItems
return function(self,index)
}
public func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath) {
guard let function = self.delegate?.pagerView(_:didHighlightItemAt:) else {
return
}
let index = indexPath.item % self.numberOfItems
function(self,index)
}
public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
guard let function = self.delegate?.pagerView(_:shouldSelectItemAt:) else {
return true
}
let index = indexPath.item % self.numberOfItems
return function(self,index)
}
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let function = self.delegate?.pagerView(_:didSelectItemAt:) else {
return
}
self.possibleTargetingIndexPath = indexPath
defer {
self.possibleTargetingIndexPath = nil
}
let index = indexPath.item % self.numberOfItems
function(self,index)
}
public func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
guard let function = self.delegate?.pagerView(_:willDisplay:forItemAt:) else {
return
}
let index = indexPath.item % self.numberOfItems
function(self,cell as! FSPagerViewCell,index)
}
public func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
guard let function = self.delegate?.pagerView(_:didEndDisplaying:forItemAt:) else {
return
}
let index = indexPath.item % self.numberOfItems
function(self,cell as! FSPagerViewCell,index)
}
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
if self.numberOfItems > 0 {
// In case someone is using KVO
let currentIndex = lround(Double(scrollView.contentOffset.x.divided(by: self.collectionViewLayout.itemSpan))) % self.numberOfItems
if (currentIndex != self.currentIndex) {
self.currentIndex = currentIndex
}
}
guard let function = self.delegate?.pagerViewDidScroll else {
return
}
function(self)
}
public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
if let function = self.delegate?.pagerViewWillBeginDragging(_:) {
function(self)
}
if self.automaticSlidingInterval > 0 {
self.cancelTimer()
}
}
public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
if let function = self.delegate?.pagerViewWillEndDragging(_:targetIndex:) {
let targetItem = lround(Double(targetContentOffset.pointee.x/self.collectionViewLayout.itemSpan))
function(self, targetItem % self.numberOfItems)
}
if self.automaticSlidingInterval > 0 {
self.startTimer()
}
}
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
if let function = self.delegate?.pagerViewDidEndDecelerating {
function(self)
}
}
public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
if let function = self.delegate?.pagerViewDidEndScrollAnimation {
function(self)
}
}
// MARK: - Public functions
@objc(registerClass:forCellWithReuseIdentifier:)
open func register(_ cellClass: Swift.AnyClass?, forCellWithReuseIdentifier identifier: String) {
guard let cellClass = cellClass, cellClass.isSubclass(of: FSPagerViewCell.self) else {
fatalError("Cell class must be subclass of FSPagerViewCell")
}
self.collectionView.register(cellClass, forCellWithReuseIdentifier: identifier)
}
@objc(dequeueReusableCellWithReuseIdentifier:atIndex:)
open func dequeueReusableCell(withReuseIdentifier identifier: String, at index: Int) -> FSPagerViewCell {
let indexPath = IndexPath(item: index, section: self.dequeingSection)
let cell = self.collectionView.dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath) as! FSPagerViewCell
return cell
}
@objc(reloadData)
open func reloadData() {
self.collectionView.reloadData()
}
@objc(selectItemAtIndex:animated:)
open func selectItem(at index: Int, animated: Bool) {
let indexPath = self.nearbyIndexPath(for: index)
self.collectionView.selectItem(at: indexPath, animated: animated, scrollPosition: .centeredHorizontally)
}
@objc(deselectItemAtIndex:animated:)
open func deselectItem(at index: Int, animated: Bool) {
let indexPath = self.nearbyIndexPath(for: index)
self.collectionView.deselectItem(at: indexPath, animated: animated)
}
@objc(scrollToItemAtIndex:animated:)
open func scrollToItem(at index: Int, animated: Bool) {
guard index < self.numberOfItems else {
fatalError("index \(index) is out of range [0...\(self.numberOfItems-1)]")
}
let indexPath = { () -> IndexPath in
if let indexPath = self.possibleTargetingIndexPath, indexPath.item == index {
defer {
self.possibleTargetingIndexPath = nil
}
return indexPath
}
return self.isInfinite ? self.nearbyIndexPath(for: index) : IndexPath(item: index, section: 0)
}()
let contentOffset = self.collectionViewLayout.contentOffset(for: indexPath)
self.collectionView.setContentOffset(contentOffset, animated: animated)
}
// MARK: - Private functions
fileprivate func commonInit() {
// Content View
let contentView = UIView(frame:CGRect.zero)
contentView.backgroundColor = UIColor.clear
self.addSubview(contentView)
self.contentView = contentView
// UICollectionView
let collectionViewLayout = FSPagerViewLayout()
let collectionView = FSPagerViewCollectionView(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
collectionView.dataSource = self
collectionView.delegate = self
collectionView.backgroundColor = UIColor.clear
self.contentView.addSubview(collectionView)
self.collectionView = collectionView
self.collectionViewLayout = collectionViewLayout
}
fileprivate func startTimer() {
guard self.automaticSlidingInterval > 0 && self.timer == nil else {
return
}
self.timer = Timer.scheduledTimer(timeInterval: TimeInterval(self.automaticSlidingInterval), target: self, selector: #selector(self.flipNext(sender:)), userInfo: nil, repeats: true)
}
@objc
fileprivate func flipNext(sender: Timer?) {
guard let _ = self.superview, let _ = self.window else {
return
}
guard !self.collectionView.isTracking else {
return
}
self.scrollToItem(at: (self.currentIndex+1)%self.numberOfItems, animated: true)
}
fileprivate func cancelTimer() {
guard self.timer != nil else {
return
}
self.timer!.invalidate()
self.timer = nil
}
fileprivate func nearbyIndexPath(for index: Int) -> IndexPath {
// Is there a better algorithm?
let currentIndex = self.currentIndex
let currentSection = self.centermostIndexPath.section
if abs(currentIndex-index) <= self.numberOfItems/2 {
return IndexPath(item: index, section: currentSection)
} else if (index-currentIndex >= 0) {
return IndexPath(item: index, section: currentSection-1)
} else {
return IndexPath(item: index, section: currentSection+1)
}
}
}

View File

@ -0,0 +1,136 @@
//
// FSPagerViewCell.swift
// FSPagerView
//
// Created by Wenchao Ding on 17/12/2016.
// Copyright © 2016 Wenchao Ding. All rights reserved.
//
import UIKit
open class FSPagerViewCell: UICollectionViewCell {
fileprivate let kvoContext = UnsafeMutableRawPointer(bitPattern: 0)
fileprivate let selectionColor = UIColor(white: 0.2, alpha: 0.2)
internal weak var _textLabel: UILabel?
open var textLabel: UILabel? {
if let _ = _textLabel {
return _textLabel
}
let view = UIView(frame: .zero)
view.isUserInteractionEnabled = false
view.backgroundColor = UIColor.black.withAlphaComponent(0.6)
let textLabel = UILabel(frame: .zero)
textLabel.textColor = .white
textLabel.font = UIFont.preferredFont(forTextStyle: .body)
self.contentView.addSubview(view)
view.addSubview(textLabel)
textLabel.addObserver(self, forKeyPath: "font", options: [.old,.new], context: kvoContext)
_textLabel = textLabel
return textLabel
}
internal weak var _imageView: UIImageView?
open var imageView: UIImageView? {
if let _ = _imageView {
return _imageView
}
let imageView = UIImageView(frame: .zero)
self.contentView.addSubview(imageView)
_imageView = imageView
return imageView
}
fileprivate weak var _selectedForegroundView: UIView?
fileprivate var selectedForegroundView: UIView? {
if let _ = _selectedForegroundView {
return _selectedForegroundView
}
let view = UIView(frame: self.contentView.bounds)
self.contentView.addSubview(view)
_selectedForegroundView = view
return view
}
open override var isHighlighted: Bool {
didSet {
if self.isHighlighted {
self.selectedForegroundView?.layer.backgroundColor = self.selectionColor.cgColor
} else if !self.isSelected {
self.selectedForegroundView?.layer.backgroundColor = UIColor.clear.cgColor
}
}
}
open override var isSelected: Bool {
didSet {
self.selectedForegroundView?.layer.backgroundColor = self.isSelected ? self.selectionColor.cgColor : UIColor.clear.cgColor
}
}
public override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
fileprivate func commonInit() {
self.contentView.backgroundColor = UIColor.white
self.contentView.layer.shadowColor = UIColor.black.cgColor
self.contentView.layer.shadowRadius = 5
self.contentView.layer.shadowOpacity = 0.75
self.contentView.layer.shadowOffset = .zero
self.backgroundColor = UIColor.white
}
deinit {
if let textLabel = _textLabel {
textLabel.removeObserver(self, forKeyPath: "font", context: kvoContext)
}
}
override open func layoutSubviews() {
super.layoutSubviews()
if let imageView = _imageView {
imageView.frame = self.contentView.bounds
}
if let textLabel = _textLabel {
textLabel.superview!.frame = {
var rect = self.contentView.bounds
let height = textLabel.font.pointSize*1.5
rect.size.height = height
rect.origin.y = self.contentView.frame.height-height
return rect
}()
textLabel.frame = {
var rect = textLabel.superview!.bounds
rect = rect.insetBy(dx: 8, dy: 0)
rect.size.height -= 1
rect.origin.y += 1
return rect
}()
}
if let selectedForegroundView = _selectedForegroundView {
selectedForegroundView.frame = self.contentView.bounds
}
}
open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if context == kvoContext {
if keyPath == "font" {
self.setNeedsLayout()
}
} else {
super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context)
}
}
}

View File

@ -0,0 +1,580 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F908BC411E35AAE4002B2F51 /* 1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC321E35AAE4002B2F51 /* 1.jpg */; };
F908BC421E35AAE4002B2F51 /* 1_1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC331E35AAE4002B2F51 /* 1_1.jpg */; };
F908BC431E35AAE4002B2F51 /* 1_2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC341E35AAE4002B2F51 /* 1_2.jpg */; };
F908BC441E35AAE4002B2F51 /* 1_3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC351E35AAE4002B2F51 /* 1_3.jpg */; };
F908BC451E35AAE4002B2F51 /* 1_4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC361E35AAE4002B2F51 /* 1_4.jpg */; };
F908BC461E35AAE4002B2F51 /* 1_5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC371E35AAE4002B2F51 /* 1_5.jpg */; };
F908BC471E35AAE4002B2F51 /* 1_6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC381E35AAE4002B2F51 /* 1_6.jpg */; };
F908BC481E35AAE4002B2F51 /* 1_7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC391E35AAE4002B2F51 /* 1_7.jpg */; };
F908BC491E35AAE4002B2F51 /* 2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3A1E35AAE4002B2F51 /* 2.jpg */; };
F908BC4A1E35AAE4002B2F51 /* 3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3B1E35AAE4002B2F51 /* 3.jpg */; };
F908BC4B1E35AAE4002B2F51 /* 4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3C1E35AAE4002B2F51 /* 4.jpg */; };
F908BC4C1E35AAE4002B2F51 /* 5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3D1E35AAE4002B2F51 /* 5.jpg */; };
F908BC4D1E35AAE4002B2F51 /* 6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3E1E35AAE4002B2F51 /* 6.jpg */; };
F908BC4E1E35AAE4002B2F51 /* 7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC3F1E35AAE4002B2F51 /* 7.jpg */; };
F908BC4F1E35AAE4002B2F51 /* background.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F908BC401E35AAE4002B2F51 /* background.jpg */; };
F93F5E141E319AE8006B7082 /* PageControlExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F93F5E131E319AE8006B7082 /* PageControlExampleViewController.m */; };
F9C6943F1E40C63E007084B6 /* FSPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C694391E40C63E007084B6 /* FSPageControl.swift */; };
F9C694401E40C63E007084B6 /* FSPagerCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6943A1E40C63E007084B6 /* FSPagerCollectionView.swift */; };
F9C694411E40C63E007084B6 /* FSPagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6943B1E40C63E007084B6 /* FSPagerView.swift */; };
F9C694421E40C63E007084B6 /* FSPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6943C1E40C63E007084B6 /* FSPagerViewCell.swift */; };
F9C694431E40C63E007084B6 /* FSPageViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6943D1E40C63E007084B6 /* FSPageViewLayout.swift */; };
F9C694441E40C63E007084B6 /* FSPageViewTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6943E1E40C63E007084B6 /* FSPageViewTransformer.swift */; };
F9C6944C1E40C6C1007084B6 /* FSPagerViewExample_ObjcUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9C6944B1E40C6C1007084B6 /* FSPagerViewExample_ObjcUITests.swift */; };
F9EC371E1E304A830022B6D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F9EC371D1E304A830022B6D6 /* main.m */; };
F9EC37211E304A830022B6D6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F9EC37201E304A830022B6D6 /* AppDelegate.m */; };
F9EC37241E304A830022B6D6 /* BasicExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F9EC37231E304A830022B6D6 /* BasicExampleViewController.m */; };
F9EC37271E304A830022B6D6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9EC37251E304A830022B6D6 /* Main.storyboard */; };
F9EC37291E304A830022B6D6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F9EC37281E304A830022B6D6 /* Assets.xcassets */; };
F9EC372C1E304A830022B6D6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9EC372A1E304A830022B6D6 /* LaunchScreen.storyboard */; };
F9F00A901E310FF600790735 /* TransformerExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F9F00A8F1E310FF600790735 /* TransformerExampleViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F9C6944E1E40C6C1007084B6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F9EC37111E304A830022B6D6 /* Project object */;
proxyType = 1;
remoteGlobalIDString = F9EC37181E304A830022B6D6;
remoteInfo = "FSPagerViewExample-Objc";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
F908BC321E35AAE4002B2F51 /* 1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1.jpg; sourceTree = "<group>"; };
F908BC331E35AAE4002B2F51 /* 1_1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_1.jpg; sourceTree = "<group>"; };
F908BC341E35AAE4002B2F51 /* 1_2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_2.jpg; sourceTree = "<group>"; };
F908BC351E35AAE4002B2F51 /* 1_3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_3.jpg; sourceTree = "<group>"; };
F908BC361E35AAE4002B2F51 /* 1_4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_4.jpg; sourceTree = "<group>"; };
F908BC371E35AAE4002B2F51 /* 1_5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_5.jpg; sourceTree = "<group>"; };
F908BC381E35AAE4002B2F51 /* 1_6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_6.jpg; sourceTree = "<group>"; };
F908BC391E35AAE4002B2F51 /* 1_7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 1_7.jpg; sourceTree = "<group>"; };
F908BC3A1E35AAE4002B2F51 /* 2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 2.jpg; sourceTree = "<group>"; };
F908BC3B1E35AAE4002B2F51 /* 3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 3.jpg; sourceTree = "<group>"; };
F908BC3C1E35AAE4002B2F51 /* 4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 4.jpg; sourceTree = "<group>"; };
F908BC3D1E35AAE4002B2F51 /* 5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 5.jpg; sourceTree = "<group>"; };
F908BC3E1E35AAE4002B2F51 /* 6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 6.jpg; sourceTree = "<group>"; };
F908BC3F1E35AAE4002B2F51 /* 7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 7.jpg; sourceTree = "<group>"; };
F908BC401E35AAE4002B2F51 /* background.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = background.jpg; sourceTree = "<group>"; };
F93F5E121E319AE8006B7082 /* PageControlExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageControlExampleViewController.h; sourceTree = "<group>"; };
F93F5E131E319AE8006B7082 /* PageControlExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PageControlExampleViewController.m; sourceTree = "<group>"; };
F9C694391E40C63E007084B6 /* FSPageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageControl.swift; sourceTree = "<group>"; };
F9C6943A1E40C63E007084B6 /* FSPagerCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerCollectionView.swift; sourceTree = "<group>"; };
F9C6943B1E40C63E007084B6 /* FSPagerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerView.swift; sourceTree = "<group>"; };
F9C6943C1E40C63E007084B6 /* FSPagerViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerViewCell.swift; sourceTree = "<group>"; };
F9C6943D1E40C63E007084B6 /* FSPageViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageViewLayout.swift; sourceTree = "<group>"; };
F9C6943E1E40C63E007084B6 /* FSPageViewTransformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageViewTransformer.swift; sourceTree = "<group>"; };
F9C694491E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "FSPagerViewExample-ObjcUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
F9C6944B1E40C6C1007084B6 /* FSPagerViewExample_ObjcUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FSPagerViewExample_ObjcUITests.swift; sourceTree = "<group>"; };
F9C6944D1E40C6C1007084B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9EC37191E304A830022B6D6 /* FSPagerViewExample-Objc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "FSPagerViewExample-Objc.app"; sourceTree = BUILT_PRODUCTS_DIR; };
F9EC371D1E304A830022B6D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
F9EC371F1E304A830022B6D6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
F9EC37201E304A830022B6D6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
F9EC37221E304A830022B6D6 /* BasicExampleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BasicExampleViewController.h; sourceTree = "<group>"; };
F9EC37231E304A830022B6D6 /* BasicExampleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BasicExampleViewController.m; sourceTree = "<group>"; };
F9EC37261E304A830022B6D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F9EC37281E304A830022B6D6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F9EC372B1E304A830022B6D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F9EC372D1E304A830022B6D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9F00A8E1E310FF600790735 /* TransformerExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformerExampleViewController.h; sourceTree = "<group>"; };
F9F00A8F1E310FF600790735 /* TransformerExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransformerExampleViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F9C694461E40C6C1007084B6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F9EC37161E304A830022B6D6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F908BC311E35AAE4002B2F51 /* Resources */ = {
isa = PBXGroup;
children = (
F908BC321E35AAE4002B2F51 /* 1.jpg */,
F908BC331E35AAE4002B2F51 /* 1_1.jpg */,
F908BC341E35AAE4002B2F51 /* 1_2.jpg */,
F908BC351E35AAE4002B2F51 /* 1_3.jpg */,
F908BC361E35AAE4002B2F51 /* 1_4.jpg */,
F908BC371E35AAE4002B2F51 /* 1_5.jpg */,
F908BC381E35AAE4002B2F51 /* 1_6.jpg */,
F908BC391E35AAE4002B2F51 /* 1_7.jpg */,
F908BC3A1E35AAE4002B2F51 /* 2.jpg */,
F908BC3B1E35AAE4002B2F51 /* 3.jpg */,
F908BC3C1E35AAE4002B2F51 /* 4.jpg */,
F908BC3D1E35AAE4002B2F51 /* 5.jpg */,
F908BC3E1E35AAE4002B2F51 /* 6.jpg */,
F908BC3F1E35AAE4002B2F51 /* 7.jpg */,
F908BC401E35AAE4002B2F51 /* background.jpg */,
);
name = Resources;
path = ../../Resources;
sourceTree = "<group>";
};
F9C694381E40C63E007084B6 /* FSPagerView */ = {
isa = PBXGroup;
children = (
F9C694391E40C63E007084B6 /* FSPageControl.swift */,
F9C6943A1E40C63E007084B6 /* FSPagerCollectionView.swift */,
F9C6943B1E40C63E007084B6 /* FSPagerView.swift */,
F9C6943C1E40C63E007084B6 /* FSPagerViewCell.swift */,
F9C6943D1E40C63E007084B6 /* FSPageViewLayout.swift */,
F9C6943E1E40C63E007084B6 /* FSPageViewTransformer.swift */,
);
name = FSPagerView;
path = ../FSPagerView;
sourceTree = "<group>";
};
F9C6944A1E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests */ = {
isa = PBXGroup;
children = (
F9C6944B1E40C6C1007084B6 /* FSPagerViewExample_ObjcUITests.swift */,
F9C6944D1E40C6C1007084B6 /* Info.plist */,
);
path = "FSPagerViewExample-ObjcUITests";
sourceTree = "<group>";
};
F9C870F71E30FF8B005786E9 /* Basic Example */ = {
isa = PBXGroup;
children = (
F9EC37221E304A830022B6D6 /* BasicExampleViewController.h */,
F9EC37231E304A830022B6D6 /* BasicExampleViewController.m */,
);
name = "Basic Example";
sourceTree = "<group>";
};
F9C870F81E30FFA0005786E9 /* Transformer Example */ = {
isa = PBXGroup;
children = (
F9F00A8E1E310FF600790735 /* TransformerExampleViewController.h */,
F9F00A8F1E310FF600790735 /* TransformerExampleViewController.m */,
);
name = "Transformer Example";
sourceTree = "<group>";
};
F9C870F91E30FFAB005786E9 /* PageControl Example */ = {
isa = PBXGroup;
children = (
F93F5E121E319AE8006B7082 /* PageControlExampleViewController.h */,
F93F5E131E319AE8006B7082 /* PageControlExampleViewController.m */,
);
name = "PageControl Example";
sourceTree = "<group>";
};
F9EC37101E304A830022B6D6 = {
isa = PBXGroup;
children = (
F9C694381E40C63E007084B6 /* FSPagerView */,
F9EC371B1E304A830022B6D6 /* FSPagerViewExample-Objc */,
F9C6944A1E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests */,
F9EC371A1E304A830022B6D6 /* Products */,
);
sourceTree = "<group>";
};
F9EC371A1E304A830022B6D6 /* Products */ = {
isa = PBXGroup;
children = (
F9EC37191E304A830022B6D6 /* FSPagerViewExample-Objc.app */,
F9C694491E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
F9EC371B1E304A830022B6D6 /* FSPagerViewExample-Objc */ = {
isa = PBXGroup;
children = (
F9EC371F1E304A830022B6D6 /* AppDelegate.h */,
F9EC37201E304A830022B6D6 /* AppDelegate.m */,
F9C870F71E30FF8B005786E9 /* Basic Example */,
F9C870F81E30FFA0005786E9 /* Transformer Example */,
F9C870F91E30FFAB005786E9 /* PageControl Example */,
F9EC37251E304A830022B6D6 /* Main.storyboard */,
F9EC37281E304A830022B6D6 /* Assets.xcassets */,
F9EC372A1E304A830022B6D6 /* LaunchScreen.storyboard */,
F9EC372D1E304A830022B6D6 /* Info.plist */,
F908BC311E35AAE4002B2F51 /* Resources */,
F9EC371C1E304A830022B6D6 /* Supporting Files */,
);
path = "FSPagerViewExample-Objc";
sourceTree = "<group>";
};
F9EC371C1E304A830022B6D6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
F9EC371D1E304A830022B6D6 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F9C694481E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = F9C694501E40C6C1007084B6 /* Build configuration list for PBXNativeTarget "FSPagerViewExample-ObjcUITests" */;
buildPhases = (
F9C694451E40C6C1007084B6 /* Sources */,
F9C694461E40C6C1007084B6 /* Frameworks */,
F9C694471E40C6C1007084B6 /* Resources */,
);
buildRules = (
);
dependencies = (
F9C6944F1E40C6C1007084B6 /* PBXTargetDependency */,
);
name = "FSPagerViewExample-ObjcUITests";
productName = "FSPagerViewExample-ObjcUITests";
productReference = F9C694491E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
F9EC37181E304A830022B6D6 /* FSPagerViewExample-Objc */ = {
isa = PBXNativeTarget;
buildConfigurationList = F9EC37301E304A830022B6D6 /* Build configuration list for PBXNativeTarget "FSPagerViewExample-Objc" */;
buildPhases = (
F9EC37151E304A830022B6D6 /* Sources */,
F9EC37161E304A830022B6D6 /* Frameworks */,
F9EC37171E304A830022B6D6 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "FSPagerViewExample-Objc";
productName = "FSPageSliderExample-Objc";
productReference = F9EC37191E304A830022B6D6 /* FSPagerViewExample-Objc.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F9EC37111E304A830022B6D6 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = "Wenchao Ding";
TargetAttributes = {
F9C694481E40C6C1007084B6 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HZF422TY46;
ProvisioningStyle = Automatic;
TestTargetID = F9EC37181E304A830022B6D6;
};
F9EC37181E304A830022B6D6 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = HZF422TY46;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = F9EC37141E304A830022B6D6 /* Build configuration list for PBXProject "FSPagerViewExample-Objc" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = F9EC37101E304A830022B6D6;
productRefGroup = F9EC371A1E304A830022B6D6 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F9EC37181E304A830022B6D6 /* FSPagerViewExample-Objc */,
F9C694481E40C6C1007084B6 /* FSPagerViewExample-ObjcUITests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F9C694471E40C6C1007084B6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F9EC37171E304A830022B6D6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F908BC441E35AAE4002B2F51 /* 1_3.jpg in Resources */,
F908BC481E35AAE4002B2F51 /* 1_7.jpg in Resources */,
F908BC431E35AAE4002B2F51 /* 1_2.jpg in Resources */,
F908BC451E35AAE4002B2F51 /* 1_4.jpg in Resources */,
F908BC4A1E35AAE4002B2F51 /* 3.jpg in Resources */,
F908BC461E35AAE4002B2F51 /* 1_5.jpg in Resources */,
F908BC4C1E35AAE4002B2F51 /* 5.jpg in Resources */,
F9EC372C1E304A830022B6D6 /* LaunchScreen.storyboard in Resources */,
F908BC491E35AAE4002B2F51 /* 2.jpg in Resources */,
F908BC4F1E35AAE4002B2F51 /* background.jpg in Resources */,
F908BC4B1E35AAE4002B2F51 /* 4.jpg in Resources */,
F908BC4E1E35AAE4002B2F51 /* 7.jpg in Resources */,
F908BC4D1E35AAE4002B2F51 /* 6.jpg in Resources */,
F908BC421E35AAE4002B2F51 /* 1_1.jpg in Resources */,
F908BC471E35AAE4002B2F51 /* 1_6.jpg in Resources */,
F908BC411E35AAE4002B2F51 /* 1.jpg in Resources */,
F9EC37291E304A830022B6D6 /* Assets.xcassets in Resources */,
F9EC37271E304A830022B6D6 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F9C694451E40C6C1007084B6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F9C6944C1E40C6C1007084B6 /* FSPagerViewExample_ObjcUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F9EC37151E304A830022B6D6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F9C694431E40C63E007084B6 /* FSPageViewLayout.swift in Sources */,
F9C694401E40C63E007084B6 /* FSPagerCollectionView.swift in Sources */,
F9EC37241E304A830022B6D6 /* BasicExampleViewController.m in Sources */,
F9C694421E40C63E007084B6 /* FSPagerViewCell.swift in Sources */,
F9C6943F1E40C63E007084B6 /* FSPageControl.swift in Sources */,
F9EC37211E304A830022B6D6 /* AppDelegate.m in Sources */,
F9F00A901E310FF600790735 /* TransformerExampleViewController.m in Sources */,
F93F5E141E319AE8006B7082 /* PageControlExampleViewController.m in Sources */,
F9C694411E40C63E007084B6 /* FSPagerView.swift in Sources */,
F9EC371E1E304A830022B6D6 /* main.m in Sources */,
F9C694441E40C63E007084B6 /* FSPageViewTransformer.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
F9C6944F1E40C6C1007084B6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F9EC37181E304A830022B6D6 /* FSPagerViewExample-Objc */;
targetProxy = F9C6944E1E40C6C1007084B6 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
F9EC37251E304A830022B6D6 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
F9EC37261E304A830022B6D6 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
F9EC372A1E304A830022B6D6 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
F9EC372B1E304A830022B6D6 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F9C694511E40C6C1007084B6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "FSPagerViewExample-ObjcUITests/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerViewExample-ObjcUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = "FSPagerViewExample-Objc";
};
name = Debug;
};
F9C694521E40C6C1007084B6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "FSPagerViewExample-ObjcUITests/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerViewExample-ObjcUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = "FSPagerViewExample-Objc";
};
name = Release;
};
F9EC372E1E304A830022B6D6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
F9EC372F1E304A830022B6D6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F9EC37311E304A830022B6D6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "$(SRCROOT)/FSPagerViewExample-Objc/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerView-Objc";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
F9EC37321E304A830022B6D6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
INFOPLIST_FILE = "$(SRCROOT)/FSPagerViewExample-Objc/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerView-Objc";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F9C694501E40C6C1007084B6 /* Build configuration list for PBXNativeTarget "FSPagerViewExample-ObjcUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F9C694511E40C6C1007084B6 /* Debug */,
F9C694521E40C6C1007084B6 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
F9EC37141E304A830022B6D6 /* Build configuration list for PBXProject "FSPagerViewExample-Objc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F9EC372E1E304A830022B6D6 /* Debug */,
F9EC372F1E304A830022B6D6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F9EC37301E304A830022B6D6 /* Build configuration list for PBXNativeTarget "FSPagerViewExample-Objc" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F9EC37311E304A830022B6D6 /* Debug */,
F9EC37321E304A830022B6D6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F9EC37111E304A830022B6D6 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/wenchaoding/Developer/Xcode/FSPageSlider/FSPagerViewExample-Objc/FSPagerViewExample-Objc.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9EC37181E304A830022B6D6"
BuildableName = "FSPagerViewExample-Objc.app"
BlueprintName = "FSPagerViewExample-Objc"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F988117C1E31003D003B5E5E"
BuildableName = "FSPageSliderExample-ObjcTests.xctest"
BlueprintName = "FSPageSliderExample-ObjcTests"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9C694481E40C6C1007084B6"
BuildableName = "FSPagerViewExample-ObjcUITests.xctest"
BlueprintName = "FSPagerViewExample-ObjcUITests"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9EC37181E304A830022B6D6"
BuildableName = "FSPagerViewExample-Objc.app"
BlueprintName = "FSPagerViewExample-Objc"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9EC37181E304A830022B6D6"
BuildableName = "FSPagerViewExample-Objc.app"
BlueprintName = "FSPagerViewExample-Objc"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9EC37181E304A830022B6D6"
BuildableName = "FSPagerViewExample-Objc.app"
BlueprintName = "FSPagerViewExample-Objc"
ReferencedContainer = "container:FSPagerViewExample-Objc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,32 @@
<?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>SchemeUserState</key>
<dict>
<key>FSPagerViewExample-Objc.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>F988117C1E31003D003B5E5E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F9C694481E40C6C1007084B6</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>F9EC37181E304A830022B6D6</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,17 @@
//
// AppDelegate.h
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

View File

@ -0,0 +1,51 @@
//
// AppDelegate.m
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end

View File

@ -0,0 +1,93 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_cat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_footprint@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,403 @@
<?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="65m-zG-Zjb">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="1gZ-cN-8UU">
<objects>
<navigationController id="65m-zG-Zjb" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="sdq-d2-T0f">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="QFv-CW-07W" kind="relationship" relationship="rootViewController" id="LEb-Q1-2GK"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XrD-t8-fKf" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1302" y="58"/>
</scene>
<!--FSPagerView-->
<scene sceneID="BUU-qk-sys">
<objects>
<tableViewController id="QFv-CW-07W" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="5YA-MX-aYX">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections>
<tableViewSection id="dcb-AR-Y6o">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="xbh-ag-gwU" style="IBUITableViewCellStyleDefault" id="c8R-jz-NC9">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="c8R-jz-NC9" id="Xt2-E6-SSP">
<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="Banner Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xbh-ag-gwU">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="7zq-aB-pr6" kind="show" id="uwf-fW-o5e"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="tbD-GK-bJ9" style="IBUITableViewCellStyleDefault" id="FxB-ZA-C8d">
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="FxB-ZA-C8d" id="3kH-YG-RlN">
<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="Transformer Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tbD-GK-bJ9">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="UOf-Wx-Dm5" kind="show" id="u1f-IZ-XjV"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="kw1-Wq-GDF" style="IBUITableViewCellStyleDefault" id="Z9U-TY-wA5">
<rect key="frame" x="0.0" y="88" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z9U-TY-wA5" id="ebB-1o-WJk">
<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="PageControl Example" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kw1-Wq-GDF">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="lma-uy-r7Q" kind="show" id="Ywb-QZ-BEV"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="QFv-CW-07W" id="BKi-in-Tr5"/>
<outlet property="delegate" destination="QFv-CW-07W" id="z5U-b1-65X"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="FSPagerView" id="Lpl-eu-Fmc"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="odI-aG-hCn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-540" y="57"/>
</scene>
<!--Data Source-->
<scene sceneID="YvR-xA-dZd">
<objects>
<viewController id="UOf-Wx-Dm5" customClass="TransformerExampleViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="YqO-fo-CV0"/>
<viewControllerLayoutGuide type="bottom" id="SYq-Ou-9Hm"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="gyH-Fj-vjS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tSq-4e-Jil" customClass="FSPagerView" customModule="FSPagerViewExample_Objc" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="tSq-4e-Jil" secondAttribute="height" multiplier="375:193" id="8cc-kO-s6Y"/>
</constraints>
<connections>
<outlet property="dataSource" destination="UOf-Wx-Dm5" id="of8-pK-BTI"/>
<outlet property="delegate" destination="UOf-Wx-Dm5" id="AJg-UN-kCk"/>
</connections>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="TEB-Em-38e">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="NRZ-QP-i1t"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="zyL-iX-55x" style="IBUITableViewCellStyleDefault" id="5d8-B4-K8u">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5d8-B4-K8u" id="uyz-07-btn">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="zyL-iX-55x">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="UOf-Wx-Dm5" id="OyG-Zv-zse"/>
<outlet property="delegate" destination="UOf-Wx-Dm5" id="M6x-pe-ONn"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="tSq-4e-Jil" firstAttribute="leading" secondItem="gyH-Fj-vjS" secondAttribute="leading" id="4JR-wM-Hj6"/>
<constraint firstAttribute="trailing" secondItem="TEB-Em-38e" secondAttribute="trailing" id="9aI-K5-eVK"/>
<constraint firstItem="TEB-Em-38e" firstAttribute="leading" secondItem="gyH-Fj-vjS" secondAttribute="leading" id="Nzy-x1-I37"/>
<constraint firstAttribute="trailing" secondItem="tSq-4e-Jil" secondAttribute="trailing" id="RgI-TS-XNy"/>
<constraint firstItem="SYq-Ou-9Hm" firstAttribute="top" secondItem="TEB-Em-38e" secondAttribute="bottom" priority="900" id="SvE-DZ-QZZ"/>
<constraint firstItem="TEB-Em-38e" firstAttribute="top" secondItem="tSq-4e-Jil" secondAttribute="bottom" id="Y6P-xg-PBD"/>
<constraint firstItem="tSq-4e-Jil" firstAttribute="top" secondItem="YqO-fo-CV0" secondAttribute="bottom" id="aLW-5l-Ysv"/>
</constraints>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="FSPagerView" id="TLb-uP-T5p"/>
<connections>
<outlet property="pagerView" destination="tSq-4e-Jil" id="8Jc-7p-Ufz"/>
<outlet property="tableView" destination="TEB-Em-38e" id="IVC-J2-DaD"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="umh-fh-emi" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="270" y="57"/>
</scene>
<!--Data Source-->
<scene sceneID="ubH-x9-Tsd">
<objects>
<viewController id="lma-uy-r7Q" customClass="PageControlExampleViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="g8E-NI-6cy"/>
<viewControllerLayoutGuide type="bottom" id="LRp-ZY-5aK"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="te4-kA-aq3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dn3-eb-Xp7" customClass="FSPagerView" customModule="FSPagerViewExample_Objc" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="Dn3-eb-Xp7" secondAttribute="height" multiplier="375:193" id="i9F-Jy-ACA"/>
</constraints>
<connections>
<outlet property="dataSource" destination="lma-uy-r7Q" id="cVy-Ic-JoI"/>
<outlet property="delegate" destination="lma-uy-r7Q" id="Jb0-T6-k5C"/>
</connections>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="1nD-dr-afd">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="DJv-Gh-cqi"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="BsM-5g-055" style="IBUITableViewCellStyleDefault" id="xKM-zP-mhA">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xKM-zP-mhA" id="e6f-eC-LPJ">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BsM-5g-055">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="slider_cell" id="5vo-WJ-LAV">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5vo-WJ-LAV" id="4El-3j-sQo">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<slider opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="po6-ni-APz">
<rect key="frame" x="20" y="6" width="334" height="31"/>
<connections>
<action selector="sliderValueChanged:" destination="lma-uy-r7Q" eventType="valueChanged" id="gFi-4y-tQy"/>
</connections>
</slider>
</subviews>
<constraints>
<constraint firstItem="po6-ni-APz" firstAttribute="centerX" secondItem="4El-3j-sQo" secondAttribute="centerX" id="foX-sD-T7e"/>
<constraint firstItem="po6-ni-APz" firstAttribute="leading" secondItem="4El-3j-sQo" secondAttribute="leadingMargin" constant="14" id="mq9-Ba-kWP"/>
<constraint firstItem="po6-ni-APz" firstAttribute="centerY" secondItem="4El-3j-sQo" secondAttribute="centerY" id="vUz-88-Rc7"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="lma-uy-r7Q" id="lKf-ae-tE0"/>
<outlet property="delegate" destination="lma-uy-r7Q" id="c3M-CG-U6P"/>
</connections>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6XD-Hd-JIV" customClass="FSPageControl" customModule="FSPagerViewExample_Objc" customModuleProvider="target">
<rect key="frame" x="0.0" y="227" width="375" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.5" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="T3E-mc-eGj"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="LRp-ZY-5aK" firstAttribute="top" secondItem="1nD-dr-afd" secondAttribute="bottom" id="CPh-jp-Uyb"/>
<constraint firstAttribute="trailing" secondItem="1nD-dr-afd" secondAttribute="trailing" id="ClN-uY-lET"/>
<constraint firstItem="1nD-dr-afd" firstAttribute="top" secondItem="Dn3-eb-Xp7" secondAttribute="bottom" id="G58-E2-cgd"/>
<constraint firstAttribute="trailing" secondItem="Dn3-eb-Xp7" secondAttribute="trailing" id="e9e-i7-ujY"/>
<constraint firstAttribute="trailing" secondItem="6XD-Hd-JIV" secondAttribute="trailing" id="iKX-Nj-2S8"/>
<constraint firstItem="1nD-dr-afd" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="jWs-RY-JCp"/>
<constraint firstItem="Dn3-eb-Xp7" firstAttribute="top" secondItem="g8E-NI-6cy" secondAttribute="bottom" id="kns-bN-gzL"/>
<constraint firstItem="Dn3-eb-Xp7" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="mbX-uc-m8F"/>
<constraint firstItem="6XD-Hd-JIV" firstAttribute="bottom" secondItem="Dn3-eb-Xp7" secondAttribute="bottom" id="p91-lV-jBL"/>
<constraint firstItem="6XD-Hd-JIV" firstAttribute="leading" secondItem="te4-kA-aq3" secondAttribute="leading" id="qsg-zG-lYB"/>
</constraints>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="FSPagerView" id="OcE-VL-TYq"/>
<connections>
<outlet property="pageControl" destination="6XD-Hd-JIV" id="Obv-i1-0Gv"/>
<outlet property="pagerView" destination="Dn3-eb-Xp7" id="ZCf-yT-eh3"/>
<outlet property="tableView" destination="1nD-dr-afd" id="uO4-v0-qCU"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pdp-h1-Udb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="270" y="818"/>
</scene>
<!--Data Source-->
<scene sceneID="tPJ-rw-QQI">
<objects>
<viewController id="7zq-aB-pr6" customClass="BasicExampleViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="3bN-RB-78f"/>
<viewControllerLayoutGuide type="bottom" id="rZq-8C-6dC"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zhe-8b-S4r">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ch4-Dh-rc6" customClass="FSPagerView" customModule="FSPagerViewExample_Objc" customModuleProvider="target">
<rect key="frame" x="0.0" y="64" width="375" height="193"/>
<constraints>
<constraint firstAttribute="width" secondItem="ch4-Dh-rc6" secondAttribute="height" multiplier="375:193" id="q7s-YA-wpI"/>
</constraints>
<connections>
<outlet property="dataSource" destination="7zq-aB-pr6" id="PzF-f2-zA4"/>
<outlet property="delegate" destination="7zq-aB-pr6" id="RZx-1y-bYh"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h5f-nu-Doz" customClass="FSPageControl" customModule="FSPagerViewExample_Objc" customModuleProvider="target">
<rect key="frame" x="0.0" y="232" width="375" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="awi-gp-ifB"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="226-3E-RRx">
<rect key="frame" x="0.0" y="257" width="375" height="410"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="400" id="Ix2-fM-f0e"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" textLabel="LWk-3K-WmP" style="IBUITableViewCellStyleDefault" id="wPj-3l-HCm">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wPj-3l-HCm" id="QTf-kp-J16">
<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="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="LWk-3K-WmP">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="slider_cell" id="nbi-ZR-nDk">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nbi-ZR-nDk" id="cD9-AG-y92">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<slider opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="WnD-c9-GfM">
<rect key="frame" x="20" y="6" width="334" height="31"/>
<connections>
<action selector="sliderValueChanged:" destination="7zq-aB-pr6" eventType="valueChanged" id="7fs-KL-CRX"/>
</connections>
</slider>
</subviews>
<constraints>
<constraint firstItem="WnD-c9-GfM" firstAttribute="centerX" secondItem="cD9-AG-y92" secondAttribute="centerX" id="KwF-5u-JF0"/>
<constraint firstItem="WnD-c9-GfM" firstAttribute="leading" secondItem="cD9-AG-y92" secondAttribute="leadingMargin" constant="14" id="VlZ-XN-1on"/>
<constraint firstItem="WnD-c9-GfM" firstAttribute="centerY" secondItem="cD9-AG-y92" secondAttribute="centerY" id="q7d-vC-5gP"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="7zq-aB-pr6" id="iMl-vb-qKd"/>
<outlet property="delegate" destination="7zq-aB-pr6" id="xPe-k6-GJ5"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="h5f-nu-Doz" firstAttribute="bottom" secondItem="ch4-Dh-rc6" secondAttribute="bottom" id="2Ba-Ep-xus"/>
<constraint firstItem="226-3E-RRx" firstAttribute="trailing" secondItem="ch4-Dh-rc6" secondAttribute="trailing" id="9qq-11-ogh"/>
<constraint firstItem="rZq-8C-6dC" firstAttribute="top" secondItem="226-3E-RRx" secondAttribute="bottom" id="Bc4-AO-203"/>
<constraint firstItem="ch4-Dh-rc6" firstAttribute="top" secondItem="3bN-RB-78f" secondAttribute="bottom" id="Cvt-wn-ItH"/>
<constraint firstItem="226-3E-RRx" firstAttribute="leading" secondItem="ch4-Dh-rc6" secondAttribute="leading" id="DIt-KV-x4D"/>
<constraint firstItem="h5f-nu-Doz" firstAttribute="leading" secondItem="zhe-8b-S4r" secondAttribute="leading" id="EC9-XN-MBg"/>
<constraint firstItem="226-3E-RRx" firstAttribute="top" secondItem="ch4-Dh-rc6" secondAttribute="bottom" id="bAA-Q2-Um6"/>
<constraint firstAttribute="trailing" secondItem="ch4-Dh-rc6" secondAttribute="trailing" id="bIU-eX-6a7"/>
<constraint firstAttribute="trailing" secondItem="h5f-nu-Doz" secondAttribute="trailing" id="iNL-kr-zlK"/>
<constraint firstItem="ch4-Dh-rc6" firstAttribute="leading" secondItem="zhe-8b-S4r" secondAttribute="leading" id="u1K-Fr-jm0"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="FSPagerView" id="QMU-sT-Kbv"/>
<connections>
<outlet property="pageControl" destination="h5f-nu-Doz" id="u5x-u0-UQk"/>
<outlet property="pagerView" destination="ch4-Dh-rc6" id="uVl-Rj-GWx"/>
<outlet property="tableView" destination="226-3E-RRx" id="iIv-Hz-eae"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Pvu-FJ-vJz" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="270" y="-615"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,15 @@
//
// BasicExampleViewController.h
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BasicExampleViewController : UIViewController
@end

View File

@ -0,0 +1,196 @@
//
// BasicExampleViewController.m
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import "BasicExampleViewController.h"
#import "FSPagerViewExample_Objc-Swift.h"
@interface BasicExampleViewController () <UITableViewDataSource,UITableViewDelegate,FSPagerViewDataSource,FSPagerViewDelegate>
@property (strong, nonatomic) NSArray<NSString *> *sectionTitles;
@property (strong, nonatomic) NSArray<NSString *> *configurationTitles;
@property (strong, nonatomic) NSArray<NSString *> *imageNames;
@property (weak , nonatomic) IBOutlet UITableView *tableView;
@property (weak , nonatomic) IBOutlet FSPagerView *pagerView;
@property (weak , nonatomic) IBOutlet FSPageControl *pageControl;
- (IBAction)sliderValueChanged:(UISlider *)sender;
@end
@implementation BasicExampleViewController
#pragma mark - Life cycle
- (void)viewDidLoad
{
[super viewDidLoad];
self.sectionTitles = @[@"Configurations", @"Item Size", @"Interitem Spacing"];
self.configurationTitles = @[@"Automatic sliding", @"Infinite"];
self.imageNames = @[@"1.jpg", @"2.jpg", @"3.jpg", @"4.jpg", @"5.jpg", @"6.jpg", @"7.jpg"];
[self.pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"];
self.pagerView.itemSize = self.pagerView.frame.size;
self.pageControl.numberOfPages = self.imageNames.count;
self.pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
self.pageControl.contentInsets = UIEdgeInsetsMake(0, 20, 0, 20);
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return self.sectionTitles.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
switch (section) {
case 0:
return self.configurationTitles.count;
case 1:
case 2:
return 1;
default:
break;
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.section) {
case 0: {
// Configurations
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
cell.textLabel.text = self.configurationTitles[indexPath.row];
if (indexPath.row == 0) {
// Automatic Sliding
cell.accessoryType = self.pagerView.automaticSlidingInterval > 0 ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
} else if (indexPath.row == 1) {
// IsInfinite
cell.accessoryType = self.pagerView.isInfinite ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
}
return cell;
}
case 1: {
// Item Spacing
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"slider_cell"];
UISlider *slider = cell.contentView.subviews.firstObject;
slider.tag = indexPath.section;
slider.value = ({
CGFloat scale = self.pagerView.itemSize.width/self.pagerView.frame.size.width;
CGFloat value = (scale-0.5)*2;
value;
});
return cell;
}
case 2: {
// Interitem Spacing
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"slider_cell"];
UISlider *slider = cell.contentView.subviews.firstObject;
slider.tag = indexPath.section;
slider.value = self.pagerView.interitemSpacing / 20.0;
return cell;
}
default:
break;
}
return [tableView dequeueReusableCellWithIdentifier:@"cell"];
}
#pragma mark - UITableViewDelegate
- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
return indexPath.section == 0;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.section) {
case 0:
if (indexPath.row == 0) {
// Automatic Sliding
self.pagerView.automaticSlidingInterval = 3.0 - self.pagerView.automaticSlidingInterval;
} else if (indexPath.row == 1) {
// IsInfinite
self.pagerView.isInfinite = !self.pagerView.isInfinite;
}
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationAutomatic];
break;
default:
break;
}
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return self.sectionTitles[section];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return section == 0 ? 40 : 20;
}
#pragma mark - FSPagerViewDataSource
- (NSInteger)numberOfItemsInpagerView:(FSPagerView *)pagerView
{
return self.imageNames.count;
}
- (FSPagerViewCell *)pagerView:(FSPagerView *)pagerView cellForItemAtIndex:(NSInteger)index
{
FSPagerViewCell *cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"cell" atIndex:index];
cell.imageView.image = [UIImage imageNamed:self.imageNames[index]];
cell.textLabel.text = [NSString stringWithFormat:@"%@%@",@(index),@(index)];
return cell;
}
#pragma mark - FSPagerView Delegate
- (void)pagerView:(FSPagerView *)pagerView didSelectItemAtIndex:(NSInteger)index
{
[pagerView deselectItemAtIndex:index animated:YES];
[pagerView scrollToItemAtIndex:index animated:YES];
self.pageControl.currentPage = index;
}
- (void)pagerViewDidScroll:(FSPagerView *)pagerView
{
if (self.pageControl.currentPage != pagerView.currentIndex) {
self.pageControl.currentPage = pagerView.currentIndex;
}
}
#pragma mark - Target actions
- (void)sliderValueChanged:(UISlider *)sender
{
switch (sender.tag) {
case 1: {
CGFloat scale = 0.5 * (1 + sender.value); // [0.5 - 1.0]
self.pagerView.itemSize = CGSizeApplyAffineTransform(self.pagerView.frame.size, CGAffineTransformMakeScale(scale, scale));
break;
}
case 2: {
self.pagerView.interitemSpacing = sender.value * 20; // [0 - 20]
break;
}
default:
break;
}
}
@end

View File

@ -0,0 +1,45 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,13 @@
//
// PageControlExampleViewController.h
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 20/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PageControlExampleViewController : UIViewController
@end

View File

@ -0,0 +1,316 @@
//
// PageControlExampleViewController.m
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 20/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import "PageControlExampleViewController.h"
#import "FSPagerViewExample_Objc-Swift.h"
@interface PageControlExampleViewController () <UITableViewDataSource,UITableViewDelegate,FSPagerViewDataSource,FSPagerViewDelegate>
@property (strong, nonatomic) NSArray<NSString *> *imageNames;
@property (strong, nonatomic) NSArray<NSString *> *pageControlStyles;
@property (strong, nonatomic) NSArray<NSString *> *pageControlAlignments;
@property (strong, nonatomic) NSArray<NSString *> *sectionTitles;
@property (weak , nonatomic) IBOutlet UITableView *tableView;
@property (weak , nonatomic) IBOutlet FSPagerView *pagerView;
@property (weak , nonatomic) IBOutlet FSPageControl *pageControl;
@property (assign, nonatomic) NSInteger styleIndex;
@property (assign, nonatomic) NSInteger alignmentIndex;
//
@property (readonly, nonatomic) UIBezierPath *starPath;
//
@property (readonly, nonatomic) UIBezierPath *heartPath;
- (IBAction)sliderValueChanged:(UISlider *)sender;
@end
@implementation PageControlExampleViewController
#pragma mark - Life cycle
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageNames = @[@"1_1.jpg", @"1_2.jpg", @"1_3.jpg", @"1_4.jpg", @"1_5.jpg", @"1_6.jpg", @"1_7.jpg"];
self.pageControlStyles = @[@"Default", @"Ring", @"UIImage", @"UIBezierPath - Star", @"UIBezierPath - Heart"];
self.pageControlAlignments = @[@"Right", @"Center", @"Left"];
self.sectionTitles = @[@"Style", @"Item Spacing", @"Interitem Spacing", @"Horizontal Alignment"];
self.pageControl.numberOfPages = self.imageNames.count;
self.pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
self.pageControl.contentInsets = UIEdgeInsetsMake(0, 20, 0, 20);
self.pagerView.itemSize = CGSizeZero; // Fill parent
[self.pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"];
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return self.sectionTitles.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
switch (section) {
case 0:
return self.pageControlStyles.count;
case 1:
case 2:
return 1;
case 3:
return self.pageControlAlignments.count;
default:
break;
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.section) {
case 0: {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
cell.textLabel.text = self.pageControlStyles[indexPath.row];
cell.accessoryType = self.styleIndex==indexPath.row ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
return cell;
}
case 1: {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"slider_cell"];
UISlider *slider = cell.contentView.subviews.firstObject;
slider.tag = indexPath.section;
slider.value = (self.pageControl.itemSpacing-6.0)/10.0;
return cell;
}
case 2: {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"slider_cell"];
UISlider *slider = cell.contentView.subviews.firstObject;
slider.tag = indexPath.section;
slider.value = (self.pageControl.interitemSpacing-6.0)/10.0;
return cell;
}
case 3: {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
cell.textLabel.text = self.pageControlAlignments[indexPath.row];
cell.accessoryType = self.alignmentIndex==indexPath.row ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
return cell;
}
default:
break;
}
return [tableView dequeueReusableCellWithIdentifier:@"cell"];
}
#pragma mark - UITableViewDelegate
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return self.sectionTitles[section];
}
- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
return indexPath.section == 0 || indexPath.section == 3;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.section) {
case 0: {
self.styleIndex = indexPath.row;
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationAutomatic];
break;
}
case 3: {
self.alignmentIndex = indexPath.row;
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationAutomatic];
break;
}
default:
break;
}
}
#pragma mark - FSPagerViewDataSource
- (NSInteger)numberOfItemsInpagerView:(FSPagerView *)pagerView
{
return self.imageNames.count;
}
- (FSPagerViewCell *)pagerView:(FSPagerView *)pagerView cellForItemAtIndex:(NSInteger)index
{
FSPagerViewCell *cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"cell" atIndex:index];
cell.imageView.image = [UIImage imageNamed:self.imageNames[index]];
return cell;
}
#pragma mark - FSPagerViewDelegate
- (void)pagerViewDidScroll:(FSPagerView *)pagerView
{
if (self.pageControl.currentPage != pagerView.currentIndex) {
self.pageControl.currentPage = pagerView.currentIndex;
}
}
#pragma mark - Target actions
- (void)sliderValueChanged:(UISlider *)sender
{
switch (sender.tag) {
case 1: {
self.pageControl.itemSpacing = 6.0 + sender.value*10.0; // [6 - 16]
// Redraw UIBezierPath
if (self.styleIndex == 3 || self.styleIndex == 4) {
self.styleIndex = self.styleIndex;
}
break;
}
case 3: {
self.pageControl.interitemSpacing = 6.0 + sender.value*10.0; // [6 - 16]
break;
}
default:
break;
}
}
#pragma mark - Private properties
- (void)setStyleIndex:(NSInteger)styleIndex
{
_styleIndex = styleIndex;
// Clean up
[self.pageControl setStrokeColor:nil forState:UIControlStateNormal];
[self.pageControl setStrokeColor:nil forState:UIControlStateSelected];
[self.pageControl setFillColor:nil forState:UIControlStateNormal];
[self.pageControl setFillColor:nil forState:UIControlStateSelected];
[self.pageControl setImage:nil forState:UIControlStateNormal];
[self.pageControl setImage:nil forState:UIControlStateSelected];
[self.pageControl setPath:nil forState:UIControlStateNormal];
[self.pageControl setPath:nil forState:UIControlStateSelected];
switch (styleIndex) {
case 0: {
// Default
break;
}
case 1: {
// Ring
[self.pageControl setStrokeColor:[UIColor greenColor] forState:UIControlStateNormal];
[self.pageControl setStrokeColor:[UIColor greenColor] forState:UIControlStateSelected];
[self.pageControl setFillColor:[UIColor greenColor] forState:UIControlStateSelected];
break;
}
case 2: {
// UIImage
[self.pageControl setImage:[UIImage imageNamed:@"icon_footprint"] forState:UIControlStateNormal];
[self.pageControl setImage:[UIImage imageNamed:@"icon_cat"] forState:UIControlStateSelected];
break;
}
case 3: {
// UIBezierPath - Star
[self.pageControl setStrokeColor:[UIColor yellowColor] forState:UIControlStateNormal];
[self.pageControl setStrokeColor:[UIColor yellowColor] forState:UIControlStateSelected];
[self.pageControl setFillColor:[UIColor yellowColor] forState:UIControlStateSelected];
[self.pageControl setPath:self.starPath forState:UIControlStateNormal];
[self.pageControl setPath:self.starPath forState:UIControlStateSelected];
break;
}
case 4: {
// UIBezierPath - Heart
UIColor *color = [UIColor colorWithRed:255/255.0 green:102/255.0 blue:255/255.0 alpha:1.0];
[self.pageControl setStrokeColor:color forState:UIControlStateNormal];
[self.pageControl setStrokeColor:color forState:UIControlStateSelected];
[self.pageControl setFillColor:color forState:UIControlStateSelected];
[self.pageControl setPath:self.heartPath forState:UIControlStateNormal];
[self.pageControl setPath:self.heartPath forState:UIControlStateSelected];
break;
}
default:
break;
}
}
- (void)setAlignmentIndex:(NSInteger)alignmentIndex
{
_alignmentIndex = alignmentIndex;
switch (alignmentIndex) {
case 0: {
self.pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
break;
}
case 1: {
self.pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
break;
}
case 2: {
self.pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
break;
}
default:
break;
}
}
//
- (UIBezierPath *)starPath
{
CGFloat width = self.pageControl.itemSpacing;
CGFloat height = self.pageControl.itemSpacing;
UIBezierPath *starPath = [[UIBezierPath alloc] init];
[starPath moveToPoint:CGPointMake(width*0.5, 0)];
[starPath addLineToPoint:CGPointMake(width*0.677, height*0.257)];
[starPath addLineToPoint:CGPointMake(width*0.975, height*0.345)];
[starPath addLineToPoint:CGPointMake(width*0.785, height*0.593)];
[starPath addLineToPoint:CGPointMake(width*0.794, height*0.905)];
[starPath addLineToPoint:CGPointMake(width*0.5, height*0.8)];
[starPath addLineToPoint:CGPointMake(width*0.206, height*0.905)];
[starPath addLineToPoint:CGPointMake(width*0.215, height*0.593)];
[starPath addLineToPoint:CGPointMake(width*0.025, height*0.345)];
[starPath addLineToPoint:CGPointMake(width*0.323, height*0.257)];
[starPath closePath];
return starPath;
}
//
- (UIBezierPath *)heartPath
{
CGFloat width = self.pageControl.itemSpacing;
CGFloat height = self.pageControl.itemSpacing;
UIBezierPath *heartPath = [[UIBezierPath alloc] init];
[heartPath moveToPoint:CGPointMake(width*0.5, height)];
[heartPath addCurveToPoint:CGPointMake(0, height*0.25)
controlPoint1:CGPointMake(width*0.5, height*0.75)
controlPoint2:CGPointMake(0, height*0.5)];
[heartPath addArcWithCenter:CGPointMake(width*0.25, height*0.25)
radius:width*0.25
startAngle:M_PI
endAngle:0
clockwise:YES];
[heartPath addArcWithCenter:CGPointMake(width*0.75, height*0.25)
radius:width*0.25
startAngle:M_PI
endAngle:0
clockwise:YES];
[heartPath addCurveToPoint:CGPointMake(width*0.5, height)
controlPoint1:CGPointMake(width, height*0.5)
controlPoint2:CGPointMake(width*0.5, height*0.75)];
[heartPath closePath];
return heartPath;
}
@end

View File

@ -0,0 +1,13 @@
//
// ViewController.h
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TransformerExampleViewController : UIViewController
@end

View File

@ -0,0 +1,170 @@
//
// TransformerExampleViewController.m
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import "TransformerExampleViewController.h"
#import "FSPagerViewExample_Objc-Swift.h"
@interface TransformerExampleViewController () <UITableViewDataSource,UITableViewDelegate,FSPagerViewDataSource,FSPagerViewDelegate>
@property (strong, nonatomic) NSArray<NSString *> *imageNames;
@property (strong, nonatomic) NSArray<NSString *> *transformerNames;
@property (assign, nonatomic) NSInteger typeIndex;
@property (weak , nonatomic) IBOutlet UITableView *tableView;
@property (weak , nonatomic) IBOutlet FSPagerView *pagerView;
@end
@implementation TransformerExampleViewController
#pragma mark - Life cycle
- (void)viewDidLoad
{
[super viewDidLoad];
self.imageNames = @[@"1_1.jpg",@"1_2.jpg",@"1_3.jpg",@"1_4.jpg",@"1_5.jpg",@"1_6.jpg",@"1_7.jpg"];
self.transformerNames = @[@"cross fading", @"zoom out", @"depth", @"linear", @"overlap", @"ferris wheel", @"inverted ferris wheel", @"coverflow"];
[self.pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"];
self.typeIndex = 0;
}
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
self.typeIndex = self.typeIndex;
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.transformerNames.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
cell.textLabel.text = self.transformerNames[indexPath.row];
cell.accessoryType = indexPath.row == self.typeIndex ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
self.typeIndex = indexPath.row;
[tableView reloadRowsAtIndexPaths:tableView.indexPathsForVisibleRows withRowAnimation:UITableViewRowAnimationAutomatic];
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @"Transformers";
}
#pragma mark - FSPagerViewDataSource
- (NSInteger)numberOfItemsInpagerView:(FSPagerView *)pagerView
{
return self.imageNames.count;
}
- (FSPagerViewCell *)pagerView:(FSPagerView *)pagerView cellForItemAtIndex:(NSInteger)index
{
FSPagerViewCell * cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"cell" atIndex:index];
cell.imageView.image = [UIImage imageNamed:self.imageNames[index]];
cell.imageView.contentMode = UIViewContentModeScaleAspectFill;
cell.imageView.clipsToBounds = YES;
return cell;
}
#pragma mark - FSPagerViewDelegate
- (void)pagerView:(FSPagerView *)pagerView didSelectItemAtIndex:(NSInteger)index
{
[pagerView deselectItemAtIndex:index animated:YES];
[pagerView scrollToItemAtIndex:index animated:YES];
}
#pragma mark - Private properties
- (void)setTypeIndex:(NSInteger)typeIndex
{
_typeIndex = typeIndex;
FSPagerViewTransformerType type;
switch (typeIndex) {
case 0: {
type = FSPagerViewTransformerTypeCrossFading;
break;
}
case 1: {
type = FSPagerViewTransformerTypeZoomOut;
break;
}
case 2: {
type = FSPagerViewTransformerTypeDepth;
break;
}
case 3: {
type = FSPagerViewTransformerTypeLinear;
break;
}
case 4: {
type = FSPagerViewTransformerTypeOverlap;
break;
}
case 5: {
type = FSPagerViewTransformerTypeFerrisWheel;
break;
}
case 6: {
type = FSPagerViewTransformerTypeInvertedFerrisWheel;
break;
}
case 7: {
type = FSPagerViewTransformerTypeCoverFlow;
break;
}
default:
break;
}
self.pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:type];
switch (type) {
case FSPagerViewTransformerTypeCrossFading:
case FSPagerViewTransformerTypeZoomOut:
case FSPagerViewTransformerTypeDepth: {
self.pagerView.itemSize = CGSizeZero; // 'Zero' means fill the size of parent
break;
}
case FSPagerViewTransformerTypeLinear:
case FSPagerViewTransformerTypeOverlap: {
CGAffineTransform transform = CGAffineTransformMakeScale(0.6, 0.75);
self.pagerView.itemSize = CGSizeApplyAffineTransform(self.pagerView.frame.size, transform);
break;
}
case FSPagerViewTransformerTypeFerrisWheel:
case FSPagerViewTransformerTypeInvertedFerrisWheel: {
self.pagerView.itemSize = CGSizeMake(180, 140);
break;
}
case FSPagerViewTransformerTypeCoverFlow: {
self.pagerView.itemSize = CGSizeMake(220, 170);
break;
}
default:
break;
}
}
@end

View File

@ -0,0 +1,16 @@
//
// main.m
// FSPagerViewExample-Objc
//
// Created by Wenchao Ding on 19/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -0,0 +1,36 @@
//
// FSPagerViewExample_ObjcUITests.swift
// FSPagerViewExample-ObjcUITests
//
// Created by Wenchao Ding on 31/01/2017.
// Copyright © 2017 Wenchao Ding. All rights reserved.
//
import XCTest
class FSPagerViewExample_ObjcUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
XCUIApplication().launch()
// In UI tests its important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
}

View File

@ -0,0 +1,22 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

374
README-OBJECTIVE-C.md Normal file
View File

@ -0,0 +1,374 @@
# FSPagerView
| [<font size="4"><b>SWIFT</b></font>](https://github.com/WenchaoD/FSPagerView/blob/master/README.md) | <font size="4"><b>OBJECTIVE-C</b></font> |
|---|---|
**FSPagerView** is an elegant Screen Slide Library implemented primarily with ***UICollectionView***. It is extremely helpful for making Banner、Product Show、Welcome Pages、Screen/ViewController Sliders.
## Features
* ***Infinite*** scrolling.
* ***Automatic*** Sliding.
* Fully customizable item, with predefined banner-style item.
* Fully customizable ***page control***.
* Rich build-in 3D transformers.
* ***Simple*** and ***Delightful*** api usage.
* Support **SWIFT** and **OBJECTIVE-C**.
## Demo1 Banner
| Banner |
|---|
|![9](https://cloud.githubusercontent.com/assets/5186464/22688057/9003d880-ed65-11e6-882e-4587c97c8878.gif) |
### automaticSlidingInterval
The time interval of automatic sliding. 0 means disabling automatic sliding. Default is 0.
**e.g.**
```objc
pagerView.automaticSlidingInterval = 3.0;
```
### isInfinite
A boolean value indicates whether the pager view has infinite number of items. Default is false.
**e.g.**
```objc
pagerView.isInfinite = YES;
```
### itemSize
The item size of the pager view. .zero means always fill the bounds of the pager view. Default is .zero.
**e.g.**
```objc
pagerView.itemSize = CGSizeMake(200, 180);
```
### interitemSpacing
The spacing to use between items in the pager view. Default is 0.
**e.g.**
```objc
pagerView.interitemSpacing = 10;
```
## Demo2 - Transformers
|Cross Fading|
|---|
| ![1](https://cloud.githubusercontent.com/assets/5186464/22686429/1983b97e-ed5f-11e6-9a32-44c1830df7ac.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeCrossFading];
```
---
|Zoom Out|
|---|
| ![2](https://cloud.githubusercontent.com/assets/5186464/22686426/19830862-ed5f-11e6-90be-8fb1319cd125.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeZoomOut];
```
---
|Depth|
|---|
| ![3](https://cloud.githubusercontent.com/assets/5186464/22686430/19856c1a-ed5f-11e6-8187-9e4395b7597c.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeDepth];
```
---
|Linear|
|---|
| ![4](https://cloud.githubusercontent.com/assets/5186464/22686428/198368c0-ed5f-11e6-95df-cfcfe9bc3f29.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeLinear];
```
---
|Overlap|
|---|
| ![5](https://cloud.githubusercontent.com/assets/5186464/22686431/198905aa-ed5f-11e6-9312-ec371c8c4e44.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeOverlap];
```
---
|Ferris Wheel|
|------|
| ![6](https://cloud.githubusercontent.com/assets/5186464/22686427/19831c08-ed5f-11e6-8bdb-30e762a85d4b.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeFerrisWheel];
```
---
|Inverted Ferris Wheel|
|------|
| ![7](https://cloud.githubusercontent.com/assets/5186464/22686433/19b669a0-ed5f-11e6-8bf0-dc23edf8101f.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeInvertedFerrisWheel];
```
---
|Cover Flow|
|------|
| ![8](https://cloud.githubusercontent.com/assets/5186464/22686432/19b567f8-ed5f-11e6-885d-bd660c98b507.gif) |
```objc
pagerView.transformer = [[FSPagerViewTransformer alloc] initWithType:FSPagerViewTransformerTypeCoverFlow];
```
---
> Customize your own transformer by subclassing`FSPagerViewTransformer.`
## Demo3 Page Control
|Page Control|
|---|
|![10](https://cloud.githubusercontent.com/assets/5186464/22689720/2baabdb0-ed6d-11e6-8287-ef7a2c0f64bc.gif)
|
### numberOfPages
The number of page indicators of the page control. Default is 0.
**e.g.**
```objc
pageControl.numberOfPages = 5;
```
### currentPage
The current page, highlighted by the page control. Default is 0.
**e.g.**
```objc
pageControl.currentPage = 1;
```
### setStrokeColor:forState:
Sets the stroke color for page indicators to use for the specified state. (selected/normal).
**e.g.**
```objc
[pageControl setStrokeColor:[UIColor greenColor] forState:UIControlStateNormal];
[pageControl setStrokeColor:[UIColor yellowColor] forState:UIControlStateSelected];
```
### setFillColor:forState:
Sets the fill color for page indicators to use for the specified state. (selected/normal).
**e.g.**
```objc
[pageControl setFillColor:[UIColor grayColor] forState:UIControlStateNormal];
[pageControl setFillColor:[UIColor whiteColor] forState:UIControlStateSelected];
```
### setImage:forState:
Sets the image for page indicators to use for the specified state. (selected/normal).
**e.g.**
```objc
[pageControl setImage:[UIImage imageNamed:@"image1"] forState:UIControlStateNormal];
[pageControl setImage:[UIImage imageNamed:@"image2"] forState:UIControlStateSelected];
```
### setPath:forState:
Sets the path for page indicators to use for the specified state. (selected/normal).
**e.g.**
```objc
[pageControl setPath:[UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 8, 8)] forState:UIControlStateNormal];
[pageControl setPath: [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, 8, 8)] forState:UIControlStateSelected];
```
## Installation
* Manually
* Cocoapods
### Manually
1. ***[Download](#)*** the source code.
2. Extract the zip file, simply drag folder ***FSPagerView*** into your project.
3. Make sure ***Copy items if needed*** is checked.
### Cocoapods
```ruby
use_frameworks!
pod FSPagerView
```
## Tutorial
* [Get start](#get_start)
* [Implement FSPagerViewDataSource](#implement_fspagerviewdatasource)
* [Implement FSPagerViewDelegate](#implement_fspagerviewdelegate)
### 1. Get start <a id='get_start'></a>
* Get start with code
```objc
// Create a pager view
FSPagerView *pagerView = [[FSPagerView alloc] initWithFrame:frame1];
pagerView.dataSource = self;
pagerView.delegate = self;
[pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"];
[self.view addSubview:pagerView];
// Create a page control
FSPagerControl *pageControl = [[FSPagerControl alloc] initWithFrame:frame2];
[self.view addSubview:pageControl];
```
* Get start with Interface Builder <br/>
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`) <br/>
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller. <br/>
3、Register a cell class.
```objc
- (void)viewDidLoad {
[self.pagerView registerClass:[FSPagerViewCell class] forCellWithReuseIdentifier:@"cell"];
}
```
### 2. Implement FSPagerViewDataSource <a id='implement_fspagerviewdatasource'></a>
```objc
- (NSInteger)numberOfItemsInpagerView:(FSPagerView *)pagerView
{
return numberOfItems;
}
- (FSPagerViewCell *)pagerView:(FSPagerView *)pagerView cellForItemAtIndex:(NSInteger)index
{
FSPagerViewCell *cell = [pagerView dequeueReusableCellWithReuseIdentifier:@"cell" atIndex:index];
cell.imageView.image = ...;
cell.textLabel.text = ...;
return cell;
}
```
### 3. Implement FSPagerViewDelegate <a id='implement_fspagerviewdelegate'></a>
```objc
- (BOOL)pagerView:(FSPagerView *)pagerView shouldHighlightItemAtIndex:(NSInteger)index;
```
> Asks the delegate if the item should be highlighted during tracking.
---
```objc
- (void)pagerView:(FSPagerView *)pagerView didHighlightItemAtIndex:(NSInteger)index;
```
> Tells the delegate that the item at the specified index was highlighted.
---
```objc
- (BOOL)pagerView:(FSPagerView *)pagerView shouldSelectItemAtIndex:(NSInteger)index;
```
> Asks the delegate if the specified item should be selected.
---
```objc
- (void)pagerView:(FSPagerView *)pagerView didSelectItemAtIndex:(NSInteger)index;
```
> Tells the delegate that the item at the specified index was selected.
---
```objc
- (void)pagerView:(FSPagerView *)pagerView willDisplayCell:(FSPagerViewCell *)cell forItemAtIndex:(NSInteger)index;
```
> Tells the delegate that the specified cell is about to be displayed in the pager view.
---
```objc
- (void)pagerView:(FSPagerView *)pagerView didEndDisplayingCell:(FSPagerViewCell *)cell forItemAtIndex:(NSInteger)index;
```
> Tells the delegate that the specified cell was removed from the pager view.
---
```objc
- (void)pagerViewWillBeginDragging:(FSPagerView *)pagerView;
```
> Tells the delegate when the pager view is about to start scrolling the content.
---
```objc
- (void)pagerViewWillEndDragging:(FSPagerView *) pagerView targetIndex:(NSInteger)index:
```
> Tells the delegate when the user finishes scrolling the content.
---
```objc
- (void)pagerViewDidScroll:(FSPagerView *)pagerView;
```
> Tells the delegate when the user scrolls the content view within the receiver.
---
```objc
- (void)pagerViewDidEndScrollAnimation:(FSPagerView *)pagerView;
```
> Tells the delegate when a scrolling animation in the pager view concludes.
---
```objc
- (void)pagerViewDidEndDecelerating:(FSPagerView *)pagerView;
```
> Tells the delegate that the pager view has ended decelerating the scrolling movement.
---
## <a id="support"></a>Support this repo
* ***Star*** this repo <a href="#"><img style="margin-bottom:-12px" width="72" alt="star" src="https://cloud.githubusercontent.com/assets/5186464/15383105/fcf9cdf0-1dc2-11e6-88db-bf221042a584.png"></a>
<br/>
* Buy me a ***Coffee***. ☕️
<a href="https://www.paypal.me/WenchaoD" target="_blank"><img src="https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg" width="100" height="40" style="margin-bottom:-15px;"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096775/bacc0506-1539-11e6-91b7-b1a7a773622b.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096872/b06f3a3a-153c-11e6-89f9-2e9c7b88ef42.png" target="_blank"><img src="http://a4.mzstatic.com/us/r30/Purple49/v4/23/31/14/233114f8-2e8d-7b63-8dc5-85d29893061e/icon175x175.jpeg" height="40" width="40" style="margin-bottom:-15px; -webkit-border-radius: 10px;border:1px solid rgba(43, 177, 0, 1)"></a>
---
## Author
* ***微博:[@WenchaoD](http://weibo.com/WenchaoD)***
* ***Twitter: [@WenchaoD](https://twitter.com/WenchaoD)***
* Other repos:
* <img src="https://cloud.githubusercontent.com/assets/5186464/22828152/b83ab04e-efd6-11e6-9baf-37abf0ae29c0.png" style="margin-bottom:-8px"/>
***[FSCalendar](https://github.com/WenchaoD/FSCalendar)***

380
README.md Normal file
View File

@ -0,0 +1,380 @@
# FSPagerView
| <font size="4"><b>SWIFT</b></font> | [<font size="4"><b>OBJECTIVE-C</b></font>](https://github.com/WenchaoD/FSPagerView/blob/master/README-OBJECTIVE-C.md) |
|---|---|
**FSPagerView** is an elegant Screen Slide Library implemented primarily with ***UICollectionView***. It is extremely helpful for making Banner、Product Show、Welcome Pages、Screen/ViewController Sliders.
## Features
* ***Infinite*** scrolling.
* ***Automatic*** Sliding.
* Fully customizable item, with predefined banner-style item.
* Fully customizable ***page control***.
* Rich build-in 3D transformers.
* ***Simple*** and ***Delightful*** api usage.
* Support **SWIFT** and **OBJECTIVE-C**.
## Demos
* [Demo1 - Banner](#banner)
* [Demo2 - Transformer](#transformer)
* [Demo3 - Page Control](#page_control)
### Demo1 - Banner <a id="banner"></a>
| Banner |
|---|
|![9](https://cloud.githubusercontent.com/assets/5186464/22688057/9003d880-ed65-11e6-882e-4587c97c8878.gif) |
### automaticSlidingInterval
The time interval of automatic sliding. 0 means disabling automatic sliding. Default is 0.
**e.g.**
```swift
pagerView.automaticSlidingInterval = 3.0
```
### isInfinite
A boolean value indicates whether the pager view has infinite number of items. Default is false.
**e.g.**
```swift
pagerView.isInfinite = true
```
### itemSize
The item size of the pager view. .zero means always fill the bounds of the pager view. Default is .zero.
**e.g.**
```swift
pagerView.itemSize = CGSize(width: 200, height: 180)
```
### interitemSpacing
The spacing to use between items in the pager view. Default is 0.
**e.g.**
```swift
pagerView.interitemSpacing = 10
```
## Demo2 - Transformers
|Cross Fading|
|---|
| ![1](https://cloud.githubusercontent.com/assets/5186464/22686429/1983b97e-ed5f-11e6-9a32-44c1830df7ac.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .crossfading)
```
---
|Zoom Out|
|---|
| ![2](https://cloud.githubusercontent.com/assets/5186464/22686426/19830862-ed5f-11e6-90be-8fb1319cd125.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .zoomout)
```
---
|Depth|
|---|
| ![3](https://cloud.githubusercontent.com/assets/5186464/22686430/19856c1a-ed5f-11e6-8187-9e4395b7597c.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .depth)
```
---
|Linear|
|---|
| ![4](https://cloud.githubusercontent.com/assets/5186464/22686428/198368c0-ed5f-11e6-95df-cfcfe9bc3f29.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .linear)
```
---
|Overlap|
|---|
| ![5](https://cloud.githubusercontent.com/assets/5186464/22686431/198905aa-ed5f-11e6-9312-ec371c8c4e44.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .overlap)
```
---
|Ferris Wheel|
|------|
| ![6](https://cloud.githubusercontent.com/assets/5186464/22686427/19831c08-ed5f-11e6-8bdb-30e762a85d4b.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .ferrisWheel)
```
---
|Inverted Ferris Wheel|
|------|
| ![7](https://cloud.githubusercontent.com/assets/5186464/22686433/19b669a0-ed5f-11e6-8bf0-dc23edf8101f.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .invertedFerrisWheel)
```
---
|Cover Flow|
|------|
| ![8](https://cloud.githubusercontent.com/assets/5186464/22686432/19b567f8-ed5f-11e6-885d-bd660c98b507.gif) |
```swift
pagerView.transformer = FSPagerViewTransformer(type: .coverFlow)
```
---
> Customize your own transformer by subclassing`FSPagerViewTransformer.`
## Demo3 Page Control
|Page Control|
|---|
|![10](https://cloud.githubusercontent.com/assets/5186464/22689720/2baabdb0-ed6d-11e6-8287-ef7a2c0f64bc.gif)
|
### numberOfPages
The number of page indicators of the page control. Default is 0.
**e.g.**
```swift
pageControl.numberOfPages = 5
```
### currentPage
The current page, highlighted by the page control. Default is 0.
**e.g.**
```swift
pageControl.currentPage = 1
```
### setStrokeColor:forState:
Sets the stroke color for page indicators to use for the specified state. (selected/normal).
**e.g.**
```swift
pageControl.setStrokeColor(.green, for: .normal)
pageControl.setStrokeColor(.yellow, for: .selected)
```
### setFillColor:forState:
Sets the fill color for page indicators to use for the specified state. (selected/normal).
**e.g.**
```swift
pageControl.setFillColor(.gray, for: .normal)
pageControl.setFillColor(.white, for: .selected)
```
### setImage:forState:
Sets the image for page indicators to use for the specified state. (selected/normal).
**e.g.**
```swift
pageControl.setImage(UIImage(named:"image1"), for: .normal)
pageControl.setImage(UIImage(named:"image2"), for: .selected)
```
### setPath:forState:
Sets the path for page indicators to use for the specified state. (selected/normal).
**e.g.**
```swift
pageControl.setPath(UIBezierPath(rect: CGRect(x: 0, y: 0, width: 8, height: 8)), for: .normal)
pageControl.setPath(UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: 8, height: 8)), for: .normal)
```
## Installation
* Manually
* Cocoapods
### Manually
1. ***[Download](#)*** the source code.
2. Extract the zip file, simply drag folder ***FSPagerView*** into your project.
3. Make sure ***Copy items if needed*** is checked.
### Cocoapods
```ruby
use_frameworks!
pod FSPagerView
```
## Tutorial
* [Get start](#get_start)
* [Implement FSPagerViewDataSource](#implement_fspagerviewdatasource)
* [Implement FSPagerViewDelegate](#implement_fspagerviewdelegate)
### 1. Get start <a id='get_start'></a>
* Get start with code
```swift
// Create a pager view
let pagerView = FSPagerView(frame: frame1)
pagerView.dataSource = self
pagerView.delegate = self
pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
self.view.addSubview(pagerView)
// Create a page control
let pageControl = FSPagerControl(frame: frame2)
self.view.addSubview(pageControl)
```
* Get start with Interface Builder <br/>
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`) <br/>
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller. <br/>
3、Register a cell class.
```swift
@IBOutlet weak var pagerView: FSPagerView! {
didSet {
self.pagerView.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
}
}
```
### 2. Implement FSPagerViewDataSource <a id='implement_fspagerviewdatasource'></a>
```swift
public func numberOfItems(in pagerView: FSPagerView) -> Int {
return numberOfItems
}
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index)
cell.imageView?.image = ...
cell.textLabel?.text = ...
return cell
}
```
### 3. Implement FSPagerViewDelegate <a id='implement_fspagerviewdelegate'></a>
```swift
func pagerView(_ pagerView: FSPagerView, shouldHighlightItemAt index: Int) -> Bool
```
> Asks the delegate if the item should be highlighted during tracking.
---
```swift
func pagerView(_ pagerView: FSPagerView, didHighlightItemAt index: Int)
```
> Tells the delegate that the item at the specified index was highlighted.
---
```swift
func pagerView(_ pagerView: FSPagerView, shouldSelectItemAt index: Int) -> Bool
```
> Asks the delegate if the specified item should be selected.
---
```swift
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int)
```
> Tells the delegate that the item at the specified index was selected.
---
```swift
func pagerView(_ pagerView: FSPagerView, willDisplay cell: FSPagerViewCell, forItemAt index: Int)
```
> Tells the delegate that the specified cell is about to be displayed in the pager view.
---
```swift
func pagerView(_ pagerView: FSPagerView, didEndDisplaying cell: FSPagerViewCell, forItemAt index: Int)
```
> Tells the delegate that the specified cell was removed from the pager view.
---
```swift
func pagerViewWillBeginDragging(_ pagerView: FSPagerView)
```
> Tells the delegate when the pager view is about to start scrolling the content.
---
```swift
func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int)
```
> Tells the delegate when the user finishes scrolling the content.
---
```swift
func pagerViewDidScroll(_ pagerView: FSPagerView)
```
> Tells the delegate when the user scrolls the content view within the receiver.
---
```swift
func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView)
```
> Tells the delegate when a scrolling animation in the pager view concludes.
---
```swift
func pagerViewDidEndDecelerating(_ pagerView: FSPagerView)
```
> Tells the delegate that the pager view has ended decelerating the scrolling movement.
---
## <a id="support"></a>Support this repo
* ***Star*** this repo <a href="#"><img style="margin-bottom:-12px" width="72" alt="star" src="https://cloud.githubusercontent.com/assets/5186464/15383105/fcf9cdf0-1dc2-11e6-88db-bf221042a584.png"></a>
<br/>
* Buy me a Coffee. ☕️
<a href="https://www.paypal.me/WenchaoD" target="_blank"><img src="https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg" width="100" height="40" style="margin-bottom:-15px;"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096775/bacc0506-1539-11e6-91b7-b1a7a773622b.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096872/b06f3a3a-153c-11e6-89f9-2e9c7b88ef42.png" target="_blank"><img src="http://a4.mzstatic.com/us/r30/Purple49/v4/23/31/14/233114f8-2e8d-7b63-8dc5-85d29893061e/icon175x175.jpeg" height="40" width="40" style="margin-bottom:-15px; -webkit-border-radius: 10px;border:1px solid rgba(43, 177, 0, 1)"></a>
---
## Author
* ***微博:[@WenchaoD](http://weibo.com/WenchaoD)***
* ***Twitter: [@WenchaoD](https://twitter.com/WenchaoD)***
* Other repos:
* <img src="https://cloud.githubusercontent.com/assets/5186464/22828152/b83ab04e-efd6-11e6-9baf-37abf0ae29c0.png" style="margin-bottom:-8px"/>
***[FSCalendar](https://github.com/WenchaoD/FSCalendar)***

BIN
Resources/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
Resources/1_1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
Resources/1_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
Resources/1_3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
Resources/1_4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
Resources/1_5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
Resources/1_6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

BIN
Resources/1_7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
Resources/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
Resources/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
Resources/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
Resources/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
Resources/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
Resources/7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
Resources/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB