├── .gitignore ├── .swift-version ├── BannerView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── BannerView.xcworkspace └── contents.xcworkspacedata ├── BannerView ├── Array+Safety.swift ├── BannerCollectionCell.swift ├── BannerCollectionView.swift ├── BannerDataSource.swift ├── BannerItem.swift ├── BannerPageControl.swift ├── BannerView.h ├── BannerView.swift ├── Info.plist ├── UIApplication+RtL.swift └── UIView+Constraints.swift ├── BannerViewExample ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Cell.swift ├── Cell.xib ├── Colors.swift ├── CustomBannerViewController.swift ├── Demo_alwaysForward.gif ├── Demo_ar.gif ├── Demo_en.gif ├── Demo_fromStart.gif ├── Demo_reverse.gif ├── Info.plist ├── Localizable.swift ├── ViewController.swift ├── ar.lproj │ ├── Localizable.strings │ ├── Main.strings │ ├── banner_1.jpg │ ├── banner_2.jpg │ └── banner_3.png └── en.lproj │ ├── Localizable.strings │ ├── banner_1.jpg │ ├── banner_2.jpg │ └── banner_3.png ├── LICENSE ├── MLBannerView.podspec ├── Podfile ├── Podfile.lock ├── Pods ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── RSReusable │ ├── LICENSE │ ├── README.md │ └── Reusable │ │ ├── BaseTableHeaderFooterView.swift │ │ ├── NibLoadableView.swift │ │ ├── Reusable.h │ │ ├── Reusable.swift │ │ ├── UICollectionView+Dequeueable.swift │ │ ├── UINib.swift │ │ └── UITableView+Dequeueable.swift └── Target Support Files │ ├── Pods-BannerView │ ├── Info.plist │ ├── Pods-BannerView-acknowledgements.markdown │ ├── Pods-BannerView-acknowledgements.plist │ ├── Pods-BannerView-dummy.m │ ├── Pods-BannerView-resources.sh │ ├── Pods-BannerView-umbrella.h │ ├── Pods-BannerView.debug.xcconfig │ ├── Pods-BannerView.modulemap │ └── Pods-BannerView.release.xcconfig │ ├── Pods-BannerViewExample │ ├── Info.plist │ ├── Pods-BannerViewExample-acknowledgements.markdown │ ├── Pods-BannerViewExample-acknowledgements.plist │ ├── Pods-BannerViewExample-dummy.m │ ├── Pods-BannerViewExample-frameworks.sh │ ├── Pods-BannerViewExample-resources.sh │ ├── Pods-BannerViewExample-umbrella.h │ ├── Pods-BannerViewExample.debug.xcconfig │ ├── Pods-BannerViewExample.modulemap │ └── Pods-BannerViewExample.release.xcconfig │ └── RSReusable │ ├── Info.plist │ ├── RSReusable-dummy.m │ ├── RSReusable-prefix.pch │ ├── RSReusable-umbrella.h │ ├── RSReusable.modulemap │ └── RSReusable.xcconfig └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /BannerView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5DAC2147441EA79D09BD18A4 /* Pods_BannerViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90972948360F7EB13B00A4AF /* Pods_BannerViewExample.framework */; }; 11 | 72001F9BE52424BB241AF4D0 /* Pods_BannerView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE9414ED6A96AAA0EAC289D0 /* Pods_BannerView.framework */; }; 12 | B50C5E3A1F05665D00908490 /* BannerView.h in Headers */ = {isa = PBXBuildFile; fileRef = B50C5E381F05665D00908490 /* BannerView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | B53A73591F0E56F500D458B4 /* BannerCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B53A73581F0E56F500D458B4 /* BannerCollectionView.swift */; }; 14 | B53A735B1F0E88E800D458B4 /* CustomBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B53A735A1F0E88E800D458B4 /* CustomBannerViewController.swift */; }; 15 | B53A735F1F0E8C6D00D458B4 /* Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B53A735E1F0E8C6D00D458B4 /* Cell.swift */; }; 16 | B542E9B91F05994800627A79 /* banner_1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B542E9BB1F05994800627A79 /* banner_1.jpg */; }; 17 | B542E9BD1F05995400627A79 /* banner_2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = B542E9BF1F05995400627A79 /* banner_2.jpg */; }; 18 | B542E9C11F05995B00627A79 /* banner_3.png in Resources */ = {isa = PBXBuildFile; fileRef = B542E9C31F05995B00627A79 /* banner_3.png */; }; 19 | B542E9C71F0599AD00627A79 /* Localizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B542E9C61F0599AD00627A79 /* Localizable.swift */; }; 20 | B542E9CA1F059A1200627A79 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B542E9CC1F059A1200627A79 /* Localizable.strings */; }; 21 | B542E9CF1F05B1F300627A79 /* BannerPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = B542E9CE1F05B1F300627A79 /* BannerPageControl.swift */; }; 22 | B542E9D11F05BEE200627A79 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = B542E9D01F05BEE200627A79 /* Colors.swift */; }; 23 | B542E9D31F05C11500627A79 /* Demo_en.gif in Resources */ = {isa = PBXBuildFile; fileRef = B542E9D21F05C11500627A79 /* Demo_en.gif */; }; 24 | B542E9D61F05C3A700627A79 /* Demo_ar.gif in Resources */ = {isa = PBXBuildFile; fileRef = B542E9D51F05C3A700627A79 /* Demo_ar.gif */; }; 25 | B542E9D81F05C68400627A79 /* Demo_alwaysForward.gif in Resources */ = {isa = PBXBuildFile; fileRef = B542E9D71F05C68400627A79 /* Demo_alwaysForward.gif */; }; 26 | B542E9DA1F05C68C00627A79 /* Demo_reverse.gif in Resources */ = {isa = PBXBuildFile; fileRef = B542E9D91F05C68C00627A79 /* Demo_reverse.gif */; }; 27 | B542E9DC1F05C69300627A79 /* Demo_fromStart.gif in Resources */ = {isa = PBXBuildFile; fileRef = B542E9DB1F05C69300627A79 /* Demo_fromStart.gif */; }; 28 | B5807A651F0566EC002112D5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A641F0566EC002112D5 /* AppDelegate.swift */; }; 29 | B5807A671F0566EC002112D5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A661F0566EC002112D5 /* ViewController.swift */; }; 30 | B5807A6A1F0566EC002112D5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5807A681F0566EC002112D5 /* Main.storyboard */; }; 31 | B5807A6C1F0566EC002112D5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5807A6B1F0566EC002112D5 /* Assets.xcassets */; }; 32 | B5807A6F1F0566EC002112D5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5807A6D1F0566EC002112D5 /* LaunchScreen.storyboard */; }; 33 | B5807A781F05678A002112D5 /* BannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A771F05678A002112D5 /* BannerView.swift */; }; 34 | B5807A7A1F056861002112D5 /* BannerDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A791F056861002112D5 /* BannerDataSource.swift */; }; 35 | B5807A7C1F0569D8002112D5 /* BannerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A7B1F0569D8002112D5 /* BannerItem.swift */; }; 36 | B5807A811F056E25002112D5 /* UIApplication+RtL.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A801F056E25002112D5 /* UIApplication+RtL.swift */; }; 37 | B5807A831F056EB1002112D5 /* BannerCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A821F056EB1002112D5 /* BannerCollectionCell.swift */; }; 38 | B5807A841F05715F002112D5 /* BannerView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B50C5E351F05665D00908490 /* BannerView.framework */; }; 39 | B5807A851F05715F002112D5 /* BannerView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B50C5E351F05665D00908490 /* BannerView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 40 | B5807A8A1F0575D9002112D5 /* UIView+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A891F0575D9002112D5 /* UIView+Constraints.swift */; }; 41 | B5807A8D1F058D74002112D5 /* Array+Safety.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5807A8C1F058D74002112D5 /* Array+Safety.swift */; }; 42 | B5F789091F0E94F600626304 /* Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5F789081F0E94F600626304 /* Cell.xib */; }; 43 | /* End PBXBuildFile section */ 44 | 45 | /* Begin PBXContainerItemProxy section */ 46 | B5807A861F05715F002112D5 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = B50C5E2C1F05665D00908490 /* Project object */; 49 | proxyType = 1; 50 | remoteGlobalIDString = B50C5E341F05665D00908490; 51 | remoteInfo = BannerView; 52 | }; 53 | /* End PBXContainerItemProxy section */ 54 | 55 | /* Begin PBXCopyFilesBuildPhase section */ 56 | B5807A881F05715F002112D5 /* Embed Frameworks */ = { 57 | isa = PBXCopyFilesBuildPhase; 58 | buildActionMask = 2147483647; 59 | dstPath = ""; 60 | dstSubfolderSpec = 10; 61 | files = ( 62 | B5807A851F05715F002112D5 /* BannerView.framework in Embed Frameworks */, 63 | ); 64 | name = "Embed Frameworks"; 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXCopyFilesBuildPhase section */ 68 | 69 | /* Begin PBXFileReference section */ 70 | 65BA36269FEB255F68ED517F /* Pods-BannerViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BannerViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.debug.xcconfig"; sourceTree = ""; }; 71 | 7558056BDE9B62A3F89D9564 /* Pods-BannerViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BannerViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.release.xcconfig"; sourceTree = ""; }; 72 | 90972948360F7EB13B00A4AF /* Pods_BannerViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BannerViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | A7CDD77A5B49ECC3396A1752 /* Pods-BannerView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BannerView.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BannerView/Pods-BannerView.debug.xcconfig"; sourceTree = ""; }; 74 | B50C5E351F05665D00908490 /* BannerView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BannerView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | B50C5E381F05665D00908490 /* BannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BannerView.h; sourceTree = ""; }; 76 | B50C5E391F05665D00908490 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 77 | B53A73581F0E56F500D458B4 /* BannerCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerCollectionView.swift; sourceTree = ""; }; 78 | B53A735A1F0E88E800D458B4 /* CustomBannerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomBannerViewController.swift; sourceTree = ""; }; 79 | B53A735E1F0E8C6D00D458B4 /* Cell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Cell.swift; sourceTree = ""; }; 80 | B542E9BA1F05994800627A79 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = en; path = en.lproj/banner_1.jpg; sourceTree = ""; }; 81 | B542E9BC1F05994B00627A79 /* ar */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = ar; path = ar.lproj/banner_1.jpg; sourceTree = ""; }; 82 | B542E9BE1F05995400627A79 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = en; path = en.lproj/banner_2.jpg; sourceTree = ""; }; 83 | B542E9C01F05995600627A79 /* ar */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = ar; path = ar.lproj/banner_2.jpg; sourceTree = ""; }; 84 | B542E9C21F05995B00627A79 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = en.lproj/banner_3.png; sourceTree = ""; }; 85 | B542E9C41F05995C00627A79 /* ar */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ar; path = ar.lproj/banner_3.png; sourceTree = ""; }; 86 | B542E9C61F0599AD00627A79 /* Localizable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Localizable.swift; sourceTree = ""; }; 87 | B542E9CB1F059A1200627A79 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 88 | B542E9CD1F059A3200627A79 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = ""; }; 89 | B542E9CE1F05B1F300627A79 /* BannerPageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerPageControl.swift; sourceTree = ""; }; 90 | B542E9D01F05BEE200627A79 /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; 91 | B542E9D21F05C11500627A79 /* Demo_en.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Demo_en.gif; sourceTree = ""; }; 92 | B542E9D51F05C3A700627A79 /* Demo_ar.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Demo_ar.gif; sourceTree = ""; }; 93 | B542E9D71F05C68400627A79 /* Demo_alwaysForward.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Demo_alwaysForward.gif; sourceTree = ""; }; 94 | B542E9D91F05C68C00627A79 /* Demo_reverse.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Demo_reverse.gif; sourceTree = ""; }; 95 | B542E9DB1F05C69300627A79 /* Demo_fromStart.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Demo_fromStart.gif; sourceTree = ""; }; 96 | B5807A621F0566EC002112D5 /* BannerViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BannerViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | B5807A641F0566EC002112D5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 98 | B5807A661F0566EC002112D5 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 99 | B5807A691F0566EC002112D5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 100 | B5807A6B1F0566EC002112D5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 101 | B5807A6E1F0566EC002112D5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 102 | B5807A701F0566EC002112D5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 103 | B5807A771F05678A002112D5 /* BannerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerView.swift; sourceTree = ""; }; 104 | B5807A791F056861002112D5 /* BannerDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerDataSource.swift; sourceTree = ""; }; 105 | B5807A7B1F0569D8002112D5 /* BannerItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerItem.swift; sourceTree = ""; }; 106 | B5807A801F056E25002112D5 /* UIApplication+RtL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIApplication+RtL.swift"; sourceTree = ""; }; 107 | B5807A821F056EB1002112D5 /* BannerCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerCollectionCell.swift; sourceTree = ""; }; 108 | B5807A891F0575D9002112D5 /* UIView+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Constraints.swift"; sourceTree = ""; }; 109 | B5807A8B1F058A20002112D5 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = ""; }; 110 | B5807A8C1F058D74002112D5 /* Array+Safety.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Safety.swift"; sourceTree = ""; }; 111 | B5F789081F0E94F600626304 /* Cell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Cell.xib; sourceTree = ""; }; 112 | FB2AE12E0A600FA3699870AE /* Pods-BannerView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BannerView.release.xcconfig"; path = "Pods/Target Support Files/Pods-BannerView/Pods-BannerView.release.xcconfig"; sourceTree = ""; }; 113 | FE9414ED6A96AAA0EAC289D0 /* Pods_BannerView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BannerView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 114 | /* End PBXFileReference section */ 115 | 116 | /* Begin PBXFrameworksBuildPhase section */ 117 | B50C5E311F05665D00908490 /* Frameworks */ = { 118 | isa = PBXFrameworksBuildPhase; 119 | buildActionMask = 2147483647; 120 | files = ( 121 | 72001F9BE52424BB241AF4D0 /* Pods_BannerView.framework in Frameworks */, 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | B5807A5F1F0566EC002112D5 /* Frameworks */ = { 126 | isa = PBXFrameworksBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | B5807A841F05715F002112D5 /* BannerView.framework in Frameworks */, 130 | 5DAC2147441EA79D09BD18A4 /* Pods_BannerViewExample.framework in Frameworks */, 131 | ); 132 | runOnlyForDeploymentPostprocessing = 0; 133 | }; 134 | /* End PBXFrameworksBuildPhase section */ 135 | 136 | /* Begin PBXGroup section */ 137 | 66931EB8A63315E4FC1A3138 /* Pods */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | A7CDD77A5B49ECC3396A1752 /* Pods-BannerView.debug.xcconfig */, 141 | FB2AE12E0A600FA3699870AE /* Pods-BannerView.release.xcconfig */, 142 | 65BA36269FEB255F68ED517F /* Pods-BannerViewExample.debug.xcconfig */, 143 | 7558056BDE9B62A3F89D9564 /* Pods-BannerViewExample.release.xcconfig */, 144 | ); 145 | name = Pods; 146 | sourceTree = ""; 147 | }; 148 | B50C5E2B1F05665D00908490 = { 149 | isa = PBXGroup; 150 | children = ( 151 | B50C5E371F05665D00908490 /* BannerView */, 152 | B5807A631F0566EC002112D5 /* BannerViewExample */, 153 | B50C5E361F05665D00908490 /* Products */, 154 | 66931EB8A63315E4FC1A3138 /* Pods */, 155 | C6E33D18A78D4F9F091A3C20 /* Frameworks */, 156 | ); 157 | sourceTree = ""; 158 | }; 159 | B50C5E361F05665D00908490 /* Products */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | B50C5E351F05665D00908490 /* BannerView.framework */, 163 | B5807A621F0566EC002112D5 /* BannerViewExample.app */, 164 | ); 165 | name = Products; 166 | sourceTree = ""; 167 | }; 168 | B50C5E371F05665D00908490 /* BannerView */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | B5807A7F1F056E18002112D5 /* Help */, 172 | B5807A771F05678A002112D5 /* BannerView.swift */, 173 | B5807A791F056861002112D5 /* BannerDataSource.swift */, 174 | B5807A7B1F0569D8002112D5 /* BannerItem.swift */, 175 | B53A73581F0E56F500D458B4 /* BannerCollectionView.swift */, 176 | B5807A821F056EB1002112D5 /* BannerCollectionCell.swift */, 177 | B542E9CE1F05B1F300627A79 /* BannerPageControl.swift */, 178 | B50C5E381F05665D00908490 /* BannerView.h */, 179 | B50C5E391F05665D00908490 /* Info.plist */, 180 | ); 181 | path = BannerView; 182 | sourceTree = ""; 183 | }; 184 | B53A735C1F0E8C4D00D458B4 /* VC */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | B5807A661F0566EC002112D5 /* ViewController.swift */, 188 | B53A735D1F0E8C5B00D458B4 /* Custom */, 189 | ); 190 | name = VC; 191 | sourceTree = ""; 192 | }; 193 | B53A735D1F0E8C5B00D458B4 /* Custom */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | B53A73601F0E8C8500D458B4 /* Cell */, 197 | B53A735A1F0E88E800D458B4 /* CustomBannerViewController.swift */, 198 | ); 199 | name = Custom; 200 | sourceTree = ""; 201 | }; 202 | B53A73601F0E8C8500D458B4 /* Cell */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | B53A735E1F0E8C6D00D458B4 /* Cell.swift */, 206 | B5F789081F0E94F600626304 /* Cell.xib */, 207 | ); 208 | name = Cell; 209 | sourceTree = ""; 210 | }; 211 | B542E9B21F05991900627A79 /* LocalizedImages */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | B542E9BB1F05994800627A79 /* banner_1.jpg */, 215 | B542E9BF1F05995400627A79 /* banner_2.jpg */, 216 | B542E9C31F05995B00627A79 /* banner_3.png */, 217 | ); 218 | name = LocalizedImages; 219 | sourceTree = ""; 220 | }; 221 | B542E9C51F05999E00627A79 /* Extensions */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | B542E9C61F0599AD00627A79 /* Localizable.swift */, 225 | ); 226 | name = Extensions; 227 | sourceTree = ""; 228 | }; 229 | B542E9D41F05C11800627A79 /* Demo */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | B542E9DB1F05C69300627A79 /* Demo_fromStart.gif */, 233 | B542E9D91F05C68C00627A79 /* Demo_reverse.gif */, 234 | B542E9D51F05C3A700627A79 /* Demo_ar.gif */, 235 | B542E9D21F05C11500627A79 /* Demo_en.gif */, 236 | B542E9D71F05C68400627A79 /* Demo_alwaysForward.gif */, 237 | ); 238 | name = Demo; 239 | sourceTree = ""; 240 | }; 241 | B5807A631F0566EC002112D5 /* BannerViewExample */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | B5807A641F0566EC002112D5 /* AppDelegate.swift */, 245 | B53A735C1F0E8C4D00D458B4 /* VC */, 246 | B5807A761F056707002112D5 /* UI */, 247 | B542E9C51F05999E00627A79 /* Extensions */, 248 | B5807A741F0566F1002112D5 /* Resources */, 249 | B5807A751F0566FD002112D5 /* Supporting files */, 250 | ); 251 | path = BannerViewExample; 252 | sourceTree = ""; 253 | }; 254 | B5807A741F0566F1002112D5 /* Resources */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | B542E9D41F05C11800627A79 /* Demo */, 258 | B542E9B21F05991900627A79 /* LocalizedImages */, 259 | B5807A6B1F0566EC002112D5 /* Assets.xcassets */, 260 | B542E9CC1F059A1200627A79 /* Localizable.strings */, 261 | B542E9D01F05BEE200627A79 /* Colors.swift */, 262 | ); 263 | name = Resources; 264 | sourceTree = ""; 265 | }; 266 | B5807A751F0566FD002112D5 /* Supporting files */ = { 267 | isa = PBXGroup; 268 | children = ( 269 | B5807A701F0566EC002112D5 /* Info.plist */, 270 | ); 271 | name = "Supporting files"; 272 | sourceTree = ""; 273 | }; 274 | B5807A761F056707002112D5 /* UI */ = { 275 | isa = PBXGroup; 276 | children = ( 277 | B5807A681F0566EC002112D5 /* Main.storyboard */, 278 | B5807A6D1F0566EC002112D5 /* LaunchScreen.storyboard */, 279 | ); 280 | name = UI; 281 | sourceTree = ""; 282 | }; 283 | B5807A7F1F056E18002112D5 /* Help */ = { 284 | isa = PBXGroup; 285 | children = ( 286 | B5807A801F056E25002112D5 /* UIApplication+RtL.swift */, 287 | B5807A891F0575D9002112D5 /* UIView+Constraints.swift */, 288 | B5807A8C1F058D74002112D5 /* Array+Safety.swift */, 289 | ); 290 | name = Help; 291 | sourceTree = ""; 292 | }; 293 | C6E33D18A78D4F9F091A3C20 /* Frameworks */ = { 294 | isa = PBXGroup; 295 | children = ( 296 | FE9414ED6A96AAA0EAC289D0 /* Pods_BannerView.framework */, 297 | 90972948360F7EB13B00A4AF /* Pods_BannerViewExample.framework */, 298 | ); 299 | name = Frameworks; 300 | sourceTree = ""; 301 | }; 302 | /* End PBXGroup section */ 303 | 304 | /* Begin PBXHeadersBuildPhase section */ 305 | B50C5E321F05665D00908490 /* Headers */ = { 306 | isa = PBXHeadersBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | B50C5E3A1F05665D00908490 /* BannerView.h in Headers */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | /* End PBXHeadersBuildPhase section */ 314 | 315 | /* Begin PBXNativeTarget section */ 316 | B50C5E341F05665D00908490 /* BannerView */ = { 317 | isa = PBXNativeTarget; 318 | buildConfigurationList = B50C5E3D1F05665D00908490 /* Build configuration list for PBXNativeTarget "BannerView" */; 319 | buildPhases = ( 320 | 46FE89FF6CC09AD98350C78F /* [CP] Check Pods Manifest.lock */, 321 | B50C5E301F05665D00908490 /* Sources */, 322 | B50C5E311F05665D00908490 /* Frameworks */, 323 | B50C5E321F05665D00908490 /* Headers */, 324 | B50C5E331F05665D00908490 /* Resources */, 325 | E07355C86E266796D2F9CED3 /* [CP] Copy Pods Resources */, 326 | ); 327 | buildRules = ( 328 | ); 329 | dependencies = ( 330 | ); 331 | name = BannerView; 332 | productName = BannerView; 333 | productReference = B50C5E351F05665D00908490 /* BannerView.framework */; 334 | productType = "com.apple.product-type.framework"; 335 | }; 336 | B5807A611F0566EC002112D5 /* BannerViewExample */ = { 337 | isa = PBXNativeTarget; 338 | buildConfigurationList = B5807A731F0566EC002112D5 /* Build configuration list for PBXNativeTarget "BannerViewExample" */; 339 | buildPhases = ( 340 | CB2C02B1249969FB331B6860 /* [CP] Check Pods Manifest.lock */, 341 | B5807A5E1F0566EC002112D5 /* Sources */, 342 | B5807A5F1F0566EC002112D5 /* Frameworks */, 343 | B5807A601F0566EC002112D5 /* Resources */, 344 | B5807A881F05715F002112D5 /* Embed Frameworks */, 345 | F6C39A83B3CB1A2F1238E29D /* [CP] Embed Pods Frameworks */, 346 | CD1361451E9294603E3FD759 /* [CP] Copy Pods Resources */, 347 | ); 348 | buildRules = ( 349 | ); 350 | dependencies = ( 351 | B5807A871F05715F002112D5 /* PBXTargetDependency */, 352 | ); 353 | name = BannerViewExample; 354 | productName = BannerViewExample; 355 | productReference = B5807A621F0566EC002112D5 /* BannerViewExample.app */; 356 | productType = "com.apple.product-type.application"; 357 | }; 358 | /* End PBXNativeTarget section */ 359 | 360 | /* Begin PBXProject section */ 361 | B50C5E2C1F05665D00908490 /* Project object */ = { 362 | isa = PBXProject; 363 | attributes = { 364 | LastSwiftUpdateCheck = 0830; 365 | LastUpgradeCheck = 0830; 366 | ORGANIZATIONNAME = MagicLab; 367 | TargetAttributes = { 368 | B50C5E341F05665D00908490 = { 369 | CreatedOnToolsVersion = 8.3.3; 370 | DevelopmentTeam = SWXVWAU9H9; 371 | LastSwiftMigration = 0830; 372 | ProvisioningStyle = Automatic; 373 | }; 374 | B5807A611F0566EC002112D5 = { 375 | CreatedOnToolsVersion = 8.3.3; 376 | DevelopmentTeam = SWXVWAU9H9; 377 | ProvisioningStyle = Automatic; 378 | }; 379 | }; 380 | }; 381 | buildConfigurationList = B50C5E2F1F05665D00908490 /* Build configuration list for PBXProject "BannerView" */; 382 | compatibilityVersion = "Xcode 3.2"; 383 | developmentRegion = English; 384 | hasScannedForEncodings = 0; 385 | knownRegions = ( 386 | en, 387 | Base, 388 | ar, 389 | ); 390 | mainGroup = B50C5E2B1F05665D00908490; 391 | productRefGroup = B50C5E361F05665D00908490 /* Products */; 392 | projectDirPath = ""; 393 | projectRoot = ""; 394 | targets = ( 395 | B50C5E341F05665D00908490 /* BannerView */, 396 | B5807A611F0566EC002112D5 /* BannerViewExample */, 397 | ); 398 | }; 399 | /* End PBXProject section */ 400 | 401 | /* Begin PBXResourcesBuildPhase section */ 402 | B50C5E331F05665D00908490 /* Resources */ = { 403 | isa = PBXResourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | B5807A601F0566EC002112D5 /* Resources */ = { 410 | isa = PBXResourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | B5807A6F1F0566EC002112D5 /* LaunchScreen.storyboard in Resources */, 414 | B542E9C11F05995B00627A79 /* banner_3.png in Resources */, 415 | B542E9DA1F05C68C00627A79 /* Demo_reverse.gif in Resources */, 416 | B542E9D61F05C3A700627A79 /* Demo_ar.gif in Resources */, 417 | B5F789091F0E94F600626304 /* Cell.xib in Resources */, 418 | B542E9B91F05994800627A79 /* banner_1.jpg in Resources */, 419 | B542E9D81F05C68400627A79 /* Demo_alwaysForward.gif in Resources */, 420 | B542E9CA1F059A1200627A79 /* Localizable.strings in Resources */, 421 | B542E9BD1F05995400627A79 /* banner_2.jpg in Resources */, 422 | B542E9DC1F05C69300627A79 /* Demo_fromStart.gif in Resources */, 423 | B5807A6C1F0566EC002112D5 /* Assets.xcassets in Resources */, 424 | B542E9D31F05C11500627A79 /* Demo_en.gif in Resources */, 425 | B5807A6A1F0566EC002112D5 /* Main.storyboard in Resources */, 426 | ); 427 | runOnlyForDeploymentPostprocessing = 0; 428 | }; 429 | /* End PBXResourcesBuildPhase section */ 430 | 431 | /* Begin PBXShellScriptBuildPhase section */ 432 | 46FE89FF6CC09AD98350C78F /* [CP] Check Pods Manifest.lock */ = { 433 | isa = PBXShellScriptBuildPhase; 434 | buildActionMask = 2147483647; 435 | files = ( 436 | ); 437 | inputPaths = ( 438 | ); 439 | name = "[CP] Check Pods Manifest.lock"; 440 | outputPaths = ( 441 | ); 442 | runOnlyForDeploymentPostprocessing = 0; 443 | shellPath = /bin/sh; 444 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 445 | showEnvVarsInLog = 0; 446 | }; 447 | CB2C02B1249969FB331B6860 /* [CP] Check Pods Manifest.lock */ = { 448 | isa = PBXShellScriptBuildPhase; 449 | buildActionMask = 2147483647; 450 | files = ( 451 | ); 452 | inputPaths = ( 453 | ); 454 | name = "[CP] Check Pods Manifest.lock"; 455 | outputPaths = ( 456 | ); 457 | runOnlyForDeploymentPostprocessing = 0; 458 | shellPath = /bin/sh; 459 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 460 | showEnvVarsInLog = 0; 461 | }; 462 | CD1361451E9294603E3FD759 /* [CP] Copy Pods Resources */ = { 463 | isa = PBXShellScriptBuildPhase; 464 | buildActionMask = 2147483647; 465 | files = ( 466 | ); 467 | inputPaths = ( 468 | ); 469 | name = "[CP] Copy Pods Resources"; 470 | outputPaths = ( 471 | ); 472 | runOnlyForDeploymentPostprocessing = 0; 473 | shellPath = /bin/sh; 474 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-resources.sh\"\n"; 475 | showEnvVarsInLog = 0; 476 | }; 477 | E07355C86E266796D2F9CED3 /* [CP] Copy Pods Resources */ = { 478 | isa = PBXShellScriptBuildPhase; 479 | buildActionMask = 2147483647; 480 | files = ( 481 | ); 482 | inputPaths = ( 483 | ); 484 | name = "[CP] Copy Pods Resources"; 485 | outputPaths = ( 486 | ); 487 | runOnlyForDeploymentPostprocessing = 0; 488 | shellPath = /bin/sh; 489 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BannerView/Pods-BannerView-resources.sh\"\n"; 490 | showEnvVarsInLog = 0; 491 | }; 492 | F6C39A83B3CB1A2F1238E29D /* [CP] Embed Pods Frameworks */ = { 493 | isa = PBXShellScriptBuildPhase; 494 | buildActionMask = 2147483647; 495 | files = ( 496 | ); 497 | inputPaths = ( 498 | ); 499 | name = "[CP] Embed Pods Frameworks"; 500 | outputPaths = ( 501 | ); 502 | runOnlyForDeploymentPostprocessing = 0; 503 | shellPath = /bin/sh; 504 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-frameworks.sh\"\n"; 505 | showEnvVarsInLog = 0; 506 | }; 507 | /* End PBXShellScriptBuildPhase section */ 508 | 509 | /* Begin PBXSourcesBuildPhase section */ 510 | B50C5E301F05665D00908490 /* Sources */ = { 511 | isa = PBXSourcesBuildPhase; 512 | buildActionMask = 2147483647; 513 | files = ( 514 | B5807A7A1F056861002112D5 /* BannerDataSource.swift in Sources */, 515 | B5807A7C1F0569D8002112D5 /* BannerItem.swift in Sources */, 516 | B53A73591F0E56F500D458B4 /* BannerCollectionView.swift in Sources */, 517 | B5807A8A1F0575D9002112D5 /* UIView+Constraints.swift in Sources */, 518 | B5807A781F05678A002112D5 /* BannerView.swift in Sources */, 519 | B5807A811F056E25002112D5 /* UIApplication+RtL.swift in Sources */, 520 | B5807A831F056EB1002112D5 /* BannerCollectionCell.swift in Sources */, 521 | B542E9CF1F05B1F300627A79 /* BannerPageControl.swift in Sources */, 522 | B5807A8D1F058D74002112D5 /* Array+Safety.swift in Sources */, 523 | ); 524 | runOnlyForDeploymentPostprocessing = 0; 525 | }; 526 | B5807A5E1F0566EC002112D5 /* Sources */ = { 527 | isa = PBXSourcesBuildPhase; 528 | buildActionMask = 2147483647; 529 | files = ( 530 | B5807A671F0566EC002112D5 /* ViewController.swift in Sources */, 531 | B542E9D11F05BEE200627A79 /* Colors.swift in Sources */, 532 | B53A735B1F0E88E800D458B4 /* CustomBannerViewController.swift in Sources */, 533 | B542E9C71F0599AD00627A79 /* Localizable.swift in Sources */, 534 | B53A735F1F0E8C6D00D458B4 /* Cell.swift in Sources */, 535 | B5807A651F0566EC002112D5 /* AppDelegate.swift in Sources */, 536 | ); 537 | runOnlyForDeploymentPostprocessing = 0; 538 | }; 539 | /* End PBXSourcesBuildPhase section */ 540 | 541 | /* Begin PBXTargetDependency section */ 542 | B5807A871F05715F002112D5 /* PBXTargetDependency */ = { 543 | isa = PBXTargetDependency; 544 | target = B50C5E341F05665D00908490 /* BannerView */; 545 | targetProxy = B5807A861F05715F002112D5 /* PBXContainerItemProxy */; 546 | }; 547 | /* End PBXTargetDependency section */ 548 | 549 | /* Begin PBXVariantGroup section */ 550 | B542E9BB1F05994800627A79 /* banner_1.jpg */ = { 551 | isa = PBXVariantGroup; 552 | children = ( 553 | B542E9BA1F05994800627A79 /* en */, 554 | B542E9BC1F05994B00627A79 /* ar */, 555 | ); 556 | name = banner_1.jpg; 557 | sourceTree = ""; 558 | }; 559 | B542E9BF1F05995400627A79 /* banner_2.jpg */ = { 560 | isa = PBXVariantGroup; 561 | children = ( 562 | B542E9BE1F05995400627A79 /* en */, 563 | B542E9C01F05995600627A79 /* ar */, 564 | ); 565 | name = banner_2.jpg; 566 | sourceTree = ""; 567 | }; 568 | B542E9C31F05995B00627A79 /* banner_3.png */ = { 569 | isa = PBXVariantGroup; 570 | children = ( 571 | B542E9C21F05995B00627A79 /* en */, 572 | B542E9C41F05995C00627A79 /* ar */, 573 | ); 574 | name = banner_3.png; 575 | sourceTree = ""; 576 | }; 577 | B542E9CC1F059A1200627A79 /* Localizable.strings */ = { 578 | isa = PBXVariantGroup; 579 | children = ( 580 | B542E9CB1F059A1200627A79 /* en */, 581 | B542E9CD1F059A3200627A79 /* ar */, 582 | ); 583 | name = Localizable.strings; 584 | sourceTree = ""; 585 | }; 586 | B5807A681F0566EC002112D5 /* Main.storyboard */ = { 587 | isa = PBXVariantGroup; 588 | children = ( 589 | B5807A691F0566EC002112D5 /* Base */, 590 | B5807A8B1F058A20002112D5 /* ar */, 591 | ); 592 | name = Main.storyboard; 593 | sourceTree = ""; 594 | }; 595 | B5807A6D1F0566EC002112D5 /* LaunchScreen.storyboard */ = { 596 | isa = PBXVariantGroup; 597 | children = ( 598 | B5807A6E1F0566EC002112D5 /* Base */, 599 | ); 600 | name = LaunchScreen.storyboard; 601 | sourceTree = ""; 602 | }; 603 | /* End PBXVariantGroup section */ 604 | 605 | /* Begin XCBuildConfiguration section */ 606 | B50C5E3B1F05665D00908490 /* Debug */ = { 607 | isa = XCBuildConfiguration; 608 | buildSettings = { 609 | ALWAYS_SEARCH_USER_PATHS = NO; 610 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 611 | CLANG_ANALYZER_NONNULL = YES; 612 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 613 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 614 | CLANG_CXX_LIBRARY = "libc++"; 615 | CLANG_ENABLE_MODULES = YES; 616 | CLANG_ENABLE_OBJC_ARC = YES; 617 | CLANG_WARN_BOOL_CONVERSION = YES; 618 | CLANG_WARN_CONSTANT_CONVERSION = YES; 619 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 620 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 621 | CLANG_WARN_EMPTY_BODY = YES; 622 | CLANG_WARN_ENUM_CONVERSION = YES; 623 | CLANG_WARN_INFINITE_RECURSION = YES; 624 | CLANG_WARN_INT_CONVERSION = YES; 625 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 626 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 627 | CLANG_WARN_UNREACHABLE_CODE = YES; 628 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 629 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 630 | COPY_PHASE_STRIP = NO; 631 | CURRENT_PROJECT_VERSION = 1; 632 | DEBUG_INFORMATION_FORMAT = dwarf; 633 | ENABLE_STRICT_OBJC_MSGSEND = YES; 634 | ENABLE_TESTABILITY = YES; 635 | GCC_C_LANGUAGE_STANDARD = gnu99; 636 | GCC_DYNAMIC_NO_PIC = NO; 637 | GCC_NO_COMMON_BLOCKS = YES; 638 | GCC_OPTIMIZATION_LEVEL = 0; 639 | GCC_PREPROCESSOR_DEFINITIONS = ( 640 | "DEBUG=1", 641 | "$(inherited)", 642 | ); 643 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 644 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 645 | GCC_WARN_UNDECLARED_SELECTOR = YES; 646 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 647 | GCC_WARN_UNUSED_FUNCTION = YES; 648 | GCC_WARN_UNUSED_VARIABLE = YES; 649 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 650 | MTL_ENABLE_DEBUG_INFO = YES; 651 | ONLY_ACTIVE_ARCH = YES; 652 | SDKROOT = iphoneos; 653 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 654 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 655 | TARGETED_DEVICE_FAMILY = "1,2"; 656 | VERSIONING_SYSTEM = "apple-generic"; 657 | VERSION_INFO_PREFIX = ""; 658 | }; 659 | name = Debug; 660 | }; 661 | B50C5E3C1F05665D00908490 /* Release */ = { 662 | isa = XCBuildConfiguration; 663 | buildSettings = { 664 | ALWAYS_SEARCH_USER_PATHS = NO; 665 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 666 | CLANG_ANALYZER_NONNULL = YES; 667 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 668 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 669 | CLANG_CXX_LIBRARY = "libc++"; 670 | CLANG_ENABLE_MODULES = YES; 671 | CLANG_ENABLE_OBJC_ARC = YES; 672 | CLANG_WARN_BOOL_CONVERSION = YES; 673 | CLANG_WARN_CONSTANT_CONVERSION = YES; 674 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 675 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 676 | CLANG_WARN_EMPTY_BODY = YES; 677 | CLANG_WARN_ENUM_CONVERSION = YES; 678 | CLANG_WARN_INFINITE_RECURSION = YES; 679 | CLANG_WARN_INT_CONVERSION = YES; 680 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 681 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 682 | CLANG_WARN_UNREACHABLE_CODE = YES; 683 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 684 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 685 | COPY_PHASE_STRIP = NO; 686 | CURRENT_PROJECT_VERSION = 1; 687 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 688 | ENABLE_NS_ASSERTIONS = NO; 689 | ENABLE_STRICT_OBJC_MSGSEND = YES; 690 | GCC_C_LANGUAGE_STANDARD = gnu99; 691 | GCC_NO_COMMON_BLOCKS = YES; 692 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 693 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 694 | GCC_WARN_UNDECLARED_SELECTOR = YES; 695 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 696 | GCC_WARN_UNUSED_FUNCTION = YES; 697 | GCC_WARN_UNUSED_VARIABLE = YES; 698 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 699 | MTL_ENABLE_DEBUG_INFO = NO; 700 | SDKROOT = iphoneos; 701 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 702 | TARGETED_DEVICE_FAMILY = "1,2"; 703 | VALIDATE_PRODUCT = YES; 704 | VERSIONING_SYSTEM = "apple-generic"; 705 | VERSION_INFO_PREFIX = ""; 706 | }; 707 | name = Release; 708 | }; 709 | B50C5E3E1F05665D00908490 /* Debug */ = { 710 | isa = XCBuildConfiguration; 711 | baseConfigurationReference = A7CDD77A5B49ECC3396A1752 /* Pods-BannerView.debug.xcconfig */; 712 | buildSettings = { 713 | CLANG_ENABLE_MODULES = YES; 714 | CODE_SIGN_IDENTITY = ""; 715 | DEFINES_MODULE = YES; 716 | DEVELOPMENT_TEAM = SWXVWAU9H9; 717 | DYLIB_COMPATIBILITY_VERSION = 1; 718 | DYLIB_CURRENT_VERSION = 1; 719 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 720 | INFOPLIST_FILE = BannerView/Info.plist; 721 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 722 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 723 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 724 | PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.BannerView; 725 | PRODUCT_NAME = "$(TARGET_NAME)"; 726 | SKIP_INSTALL = YES; 727 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 728 | SWIFT_VERSION = 3.0; 729 | }; 730 | name = Debug; 731 | }; 732 | B50C5E3F1F05665D00908490 /* Release */ = { 733 | isa = XCBuildConfiguration; 734 | baseConfigurationReference = FB2AE12E0A600FA3699870AE /* Pods-BannerView.release.xcconfig */; 735 | buildSettings = { 736 | CLANG_ENABLE_MODULES = YES; 737 | CODE_SIGN_IDENTITY = ""; 738 | DEFINES_MODULE = YES; 739 | DEVELOPMENT_TEAM = SWXVWAU9H9; 740 | DYLIB_COMPATIBILITY_VERSION = 1; 741 | DYLIB_CURRENT_VERSION = 1; 742 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 743 | INFOPLIST_FILE = BannerView/Info.plist; 744 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 745 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 746 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 747 | PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.BannerView; 748 | PRODUCT_NAME = "$(TARGET_NAME)"; 749 | SKIP_INSTALL = YES; 750 | SWIFT_VERSION = 3.0; 751 | }; 752 | name = Release; 753 | }; 754 | B5807A711F0566EC002112D5 /* Debug */ = { 755 | isa = XCBuildConfiguration; 756 | baseConfigurationReference = 65BA36269FEB255F68ED517F /* Pods-BannerViewExample.debug.xcconfig */; 757 | buildSettings = { 758 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 759 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 760 | DEVELOPMENT_TEAM = SWXVWAU9H9; 761 | INFOPLIST_FILE = BannerViewExample/Info.plist; 762 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 763 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 764 | PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.BannerViewExample; 765 | PRODUCT_NAME = "$(TARGET_NAME)"; 766 | SWIFT_VERSION = 3.0; 767 | }; 768 | name = Debug; 769 | }; 770 | B5807A721F0566EC002112D5 /* Release */ = { 771 | isa = XCBuildConfiguration; 772 | baseConfigurationReference = 7558056BDE9B62A3F89D9564 /* Pods-BannerViewExample.release.xcconfig */; 773 | buildSettings = { 774 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 775 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 776 | DEVELOPMENT_TEAM = SWXVWAU9H9; 777 | INFOPLIST_FILE = BannerViewExample/Info.plist; 778 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 779 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 780 | PRODUCT_BUNDLE_IDENTIFIER = com.magiclab.BannerViewExample; 781 | PRODUCT_NAME = "$(TARGET_NAME)"; 782 | SWIFT_VERSION = 3.0; 783 | }; 784 | name = Release; 785 | }; 786 | /* End XCBuildConfiguration section */ 787 | 788 | /* Begin XCConfigurationList section */ 789 | B50C5E2F1F05665D00908490 /* Build configuration list for PBXProject "BannerView" */ = { 790 | isa = XCConfigurationList; 791 | buildConfigurations = ( 792 | B50C5E3B1F05665D00908490 /* Debug */, 793 | B50C5E3C1F05665D00908490 /* Release */, 794 | ); 795 | defaultConfigurationIsVisible = 0; 796 | defaultConfigurationName = Release; 797 | }; 798 | B50C5E3D1F05665D00908490 /* Build configuration list for PBXNativeTarget "BannerView" */ = { 799 | isa = XCConfigurationList; 800 | buildConfigurations = ( 801 | B50C5E3E1F05665D00908490 /* Debug */, 802 | B50C5E3F1F05665D00908490 /* Release */, 803 | ); 804 | defaultConfigurationIsVisible = 0; 805 | defaultConfigurationName = Release; 806 | }; 807 | B5807A731F0566EC002112D5 /* Build configuration list for PBXNativeTarget "BannerViewExample" */ = { 808 | isa = XCConfigurationList; 809 | buildConfigurations = ( 810 | B5807A711F0566EC002112D5 /* Debug */, 811 | B5807A721F0566EC002112D5 /* Release */, 812 | ); 813 | defaultConfigurationIsVisible = 0; 814 | defaultConfigurationName = Release; 815 | }; 816 | /* End XCConfigurationList section */ 817 | }; 818 | rootObject = B50C5E2C1F05665D00908490 /* Project object */; 819 | } 820 | -------------------------------------------------------------------------------- /BannerView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BannerView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BannerView/Array+Safety.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Array+Safety.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Array { 12 | 13 | func safelyGet(_ i : Int) -> Element? { 14 | if i >= 0 && i < count { 15 | return self[i] 16 | } else { 17 | return nil 18 | } 19 | } 20 | 21 | mutating func safelyDelete(_ i: Int) -> Element? { 22 | if i >= 0 && i < count { 23 | return remove(at: i) 24 | } else { 25 | return nil 26 | } 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /BannerView/BannerCollectionCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerCollectionCell.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | /** 13 | BannerCollectionCell. 14 | */ 15 | public class BannerCollectionCell: UICollectionViewCell { 16 | 17 | private var _imageView: UIImageView? 18 | public var imageView: UIImageView { 19 | get { 20 | if let imageView = _imageView { 21 | return imageView 22 | } 23 | let imageView = UIImageView(frame: bounds) 24 | imageView.contentMode = .scaleAspectFill 25 | contentView.addSubview(imageView) 26 | imageView.addConstraintsAlignedToSuperview() 27 | 28 | _imageView = imageView 29 | 30 | return imageView 31 | } 32 | } 33 | 34 | public var bannerItem: BannerItem? { 35 | didSet { 36 | imageView.image = bannerItem?.image 37 | } 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /BannerView/BannerCollectionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerCollectionView.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 7/6/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | public class BannerCollectionView: UICollectionView { 13 | 14 | var isTouching: Bool = false 15 | 16 | 17 | public override func touchesBegan(_ touches: Set, with event: UIEvent?) { 18 | super.touchesBegan(touches, with: event) 19 | 20 | isTouching = true 21 | 22 | print("touchesBegan: \(isTouching)") 23 | } 24 | 25 | override public func touchesMoved(_ touches: Set, with event: UIEvent?) { 26 | super.touchesMoved(touches, with: event) 27 | 28 | isTouching = true 29 | 30 | print("touchesMoved: \(isTouching)") 31 | } 32 | 33 | override public func touchesEnded(_ touches: Set, with event: UIEvent?) { 34 | super.touchesEnded(touches, with: event) 35 | 36 | isTouching = false 37 | 38 | print("touchesEnded: \(isTouching)") 39 | } 40 | 41 | override public func touchesCancelled(_ touches: Set, with event: UIEvent?) { 42 | super.touchesCancelled(touches, with: event) 43 | 44 | isTouching = false 45 | 46 | print("touchesCancelled: \(isTouching)") 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BannerView/BannerDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerDataSource.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | typealias BannerItemHandler = (BannerItem, Int)->Void 13 | 14 | 15 | private let cellIdentifier = "BannerView.BannerCollectionCell" 16 | 17 | 18 | class BannerDataSource: NSObject, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout { 19 | 20 | private (set) weak var bannerView: BannerView! 21 | private (set) var bannerItems: [BannerItem]? 22 | private var totalItems: Int { 23 | if let bannerItems = self.bannerItems { 24 | return bannerItems.count 25 | } 26 | return 0 27 | } 28 | private (set) var currentPage: Int = 0 { 29 | didSet { 30 | if let bannerItem = bannerItems?.safelyGet(currentPage) { 31 | if bannerViewScrollType == .alwaysForward, 32 | currentPage + 1 == totalItems { 33 | delegate?.bannerView?( 34 | bannerView: bannerView, 35 | didScrollTo: bannerItem, 36 | with: 0 37 | ) 38 | } else { 39 | delegate?.bannerView?( 40 | bannerView: bannerView, 41 | didScrollTo: bannerItem, 42 | with: currentPage 43 | ) 44 | } 45 | } 46 | 47 | if bannerViewScrollType == .alwaysForward, 48 | currentPage + 1 == totalItems { 49 | 50 | collectionView?.scrollToItem( 51 | at: IndexPath(item: 0, section: 0), 52 | at: .centeredHorizontally, 53 | animated: false 54 | ) 55 | } 56 | } 57 | } 58 | private var timerIsWorking = true 59 | private var movingForward = true 60 | 61 | private weak var collectionView: UICollectionView? { 62 | didSet { 63 | collectionView?.register( 64 | BannerCollectionCell.self, 65 | forCellWithReuseIdentifier: cellIdentifier 66 | ) 67 | } 68 | } 69 | private var bannerCollectionView: BannerCollectionView? { 70 | return collectionView as? BannerCollectionView 71 | } 72 | 73 | private var bannerViewScrollType: BannerViewScrollType = .fromStart 74 | private var timeForOneItem: TimeInterval = 3 75 | 76 | var delegate: BannerViewDelegate? 77 | 78 | 79 | init(bannerView: BannerView, 80 | bannerViewScrollType: BannerViewScrollType, 81 | timeForOneItem: TimeInterval, 82 | bannerItems: [BannerItem], 83 | delegate: BannerViewDelegate) { 84 | 85 | super.init() 86 | 87 | self.bannerView = bannerView 88 | self.bannerViewScrollType = bannerViewScrollType 89 | self.timeForOneItem = timeForOneItem 90 | self.bannerItems = bannerItems 91 | if bannerViewScrollType == .alwaysForward, 92 | let bannerItem = bannerItems.safelyGet(0) { 93 | self.bannerItems?.append(bannerItem) 94 | } 95 | self.delegate = delegate 96 | 97 | if UIApplication.isRTL { 98 | currentPage = (self.bannerItems?.count ?? 0) - 1 99 | } else { 100 | currentPage = 0 101 | } 102 | } 103 | 104 | 105 | func startSlider() { 106 | timerIsWorking = true 107 | timerScrollCollection(after: timeForOneItem) 108 | } 109 | 110 | func stopSlider() { 111 | timerIsWorking = false 112 | } 113 | 114 | var isUserInteracts: Bool { 115 | if let bannerCollectionView = self.bannerCollectionView { 116 | return bannerCollectionView.isTouching 117 | } 118 | return false 119 | } 120 | 121 | var canAutomaticallyScroll: Bool { 122 | return timerIsWorking && !isUserInteracts 123 | } 124 | 125 | private func timerScrollCollection(after: TimeInterval) { 126 | if !timerIsWorking { 127 | return 128 | } 129 | DispatchQueue.main.asyncAfter(deadline: .now() + after) { [weak self] in 130 | guard let strongSelf = self else { 131 | return 132 | } 133 | if strongSelf.canAutomaticallyScroll { 134 | let indexPath = strongSelf.indexPathToScroll( 135 | totalPages: strongSelf.totalItems 136 | ) 137 | if indexPath.item >= 0 && indexPath.item < strongSelf.totalItems { 138 | strongSelf.collectionView?.scrollToItem( 139 | at: indexPath, 140 | at: .centeredHorizontally, 141 | animated: true 142 | ) 143 | } 144 | strongSelf.timerScrollCollection(after: strongSelf.timeForOneItem) 145 | } else { 146 | strongSelf.timerScrollCollection(after: strongSelf.timeForOneItem * 2) 147 | } 148 | } 149 | } 150 | 151 | private func indexPathToScroll(totalPages: Int) -> IndexPath { 152 | switch bannerViewScrollType { 153 | case .fromStart: 154 | if currentPage + 1 < totalPages { 155 | return IndexPath(item: currentPage + 1, section: 0) 156 | } else { 157 | return IndexPath(item: 0, section: 0) 158 | } 159 | case .reverse: 160 | if movingForward { 161 | if currentPage + 1 < totalPages { 162 | return IndexPath(item: currentPage + 1, section: 0) 163 | } else { 164 | movingForward = false 165 | return IndexPath(item: currentPage - 1, section: 0) 166 | } 167 | } else { 168 | if currentPage - 1 >= 0 { 169 | return IndexPath(item: currentPage - 1, section: 0) 170 | } else { 171 | movingForward = true 172 | return IndexPath(item: currentPage + 1, section: 0) 173 | } 174 | } 175 | case .alwaysForward: 176 | return IndexPath(item: currentPage + 1, section: 0) 177 | } 178 | } 179 | 180 | 181 | 182 | //MARK: UICollectionViewDelegateFlowLayout 183 | 184 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 185 | 186 | self.collectionView = collectionView 187 | 188 | return collectionView.bounds.size 189 | } 190 | 191 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { 192 | return 0 193 | } 194 | 195 | 196 | //MARK: UICollectionViewDataSource, UICollectionViewDelegate 197 | 198 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 199 | return totalItems 200 | } 201 | 202 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 203 | let indexPathForDelegate: IndexPath = { 204 | if bannerViewScrollType == .alwaysForward, 205 | indexPath.item == totalItems - 1 { 206 | return IndexPath(item: 0, section: 0) 207 | } else { 208 | return indexPath 209 | } 210 | }() 211 | 212 | if let cell = delegate?.bannerView?( 213 | bannerView: bannerView, 214 | collectionView: collectionView, 215 | cellForItemAt: indexPathForDelegate 216 | ) { 217 | return cell 218 | } 219 | 220 | let cell: BannerCollectionCell = { 221 | guard let cell = collectionView.dequeueReusableCell( 222 | withReuseIdentifier: cellIdentifier, 223 | for: indexPath 224 | ) as? BannerCollectionCell else { 225 | return BannerCollectionCell() 226 | } 227 | return cell 228 | }() 229 | 230 | cell.bannerItem = bannerItems?.safelyGet(indexPath.item) 231 | 232 | return cell 233 | } 234 | 235 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 236 | 237 | if let bannerItem = bannerItems?[indexPath.item] { 238 | // clickHandler?(bannerItem, indexPath.item) 239 | delegate?.bannerView?( 240 | bannerView: bannerView, 241 | didSelectItem: bannerItem, 242 | with: indexPath.item 243 | ) 244 | } 245 | } 246 | 247 | 248 | //MARK: scroll view delegate 249 | 250 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 251 | let pageFloat = scrollView.contentOffset.x / scrollView.frame.width 252 | if UIApplication.isRTL { 253 | let page = Int(ceil(pageFloat)) 254 | currentPage = (page - (totalItems-1)) * -1 255 | } else { 256 | let page = Int(pageFloat) 257 | currentPage = page 258 | } 259 | } 260 | } 261 | 262 | -------------------------------------------------------------------------------- /BannerView/BannerItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerItem.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /** 12 | Model for item that is shown in BannerCollectionCell. 13 | */ 14 | public class BannerItem: NSObject { 15 | 16 | private (set) public var image: UIImage? 17 | 18 | 19 | public init(image: UIImage?) { 20 | self.image = image 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /BannerView/BannerPageControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerPageControl.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/30/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | /** 10 | BannerPageControl. 11 | */ 12 | @IBDesignable 13 | public class BannerPageControl: UIView { 14 | 15 | private var currentPageView: UIView! 16 | private var leadingConstraing: NSLayoutConstraint! 17 | 18 | /** 19 | Color of the whole control. UIColor.black by default. 20 | */ 21 | public var color: UIColor = UIColor.black { 22 | didSet { 23 | backgroundColor = color 24 | } 25 | } 26 | /** 27 | Current page color. UIColor.green by default. 28 | */ 29 | public var currentPageColor: UIColor = UIColor.green { 30 | didSet { 31 | currentPageView.backgroundColor = currentPageColor 32 | } 33 | } 34 | 35 | private (set) var total: Int = 0 36 | /** 37 | Current page. 38 | */ 39 | internal (set) public var currentPage: Int = 0 { 40 | didSet { 41 | UIView.animate(withDuration: 0.2) { 42 | let x: CGFloat = { 43 | if UIApplication.isRTL { 44 | return CGFloat(self.total - 1 - self.currentPage) * self.frame.width / CGFloat(self.total) 45 | } else { 46 | return CGFloat(self.currentPage) * self.frame.width / CGFloat(self.total) 47 | } 48 | }() 49 | let width = self.frame.width / CGFloat(self.total) 50 | self.currentPageView.frame = CGRect( 51 | x: x, 52 | y: 0, 53 | width: width, 54 | height: self.frame.height 55 | ) 56 | } 57 | } 58 | } 59 | 60 | /** 61 | Setup banner page control. 62 | 63 | @param total - total pages. 64 | @param currentPage - current page. 65 | */ 66 | public func setup(total: Int, currentPage: Int) { 67 | self.total = total 68 | backgroundColor = color 69 | 70 | addCurrentPageView() 71 | 72 | DispatchQueue.main.async { 73 | self.currentPage = currentPage 74 | } 75 | } 76 | 77 | 78 | //MARK: private 79 | 80 | private func addCurrentPageView() { 81 | if currentPageView == nil { 82 | currentPageView = UIView() 83 | addSubview(currentPageView) 84 | } 85 | currentPageView.backgroundColor = currentPageColor 86 | 87 | bringSubview(toFront: currentPageView) 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /BannerView/BannerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BannerView.h 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for BannerView. 12 | FOUNDATION_EXPORT double BannerViewVersionNumber; 13 | 14 | //! Project version string for BannerView. 15 | FOUNDATION_EXPORT const unsigned char BannerViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /BannerView/BannerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerView.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | /** 13 | BannerViewDelegate. 14 | */ 15 | @objc public protocol BannerViewDelegate { 16 | 17 | /** 18 | Notifies when banner view scrolls to the next item. 19 | */ 20 | @objc optional func bannerView(bannerView: BannerView, didScrollTo: BannerItem, with index: Int) 21 | 22 | /** 23 | Notifies when user selects item. 24 | */ 25 | @objc optional func bannerView(bannerView: BannerView, didSelectItem: BannerItem, with index: Int) 26 | 27 | /** 28 | Returns cell for collection view. 29 | */ 30 | @objc optional func bannerView(bannerView: BannerView, collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell? 31 | } 32 | 33 | /** 34 | BannerViewScrollType contains different scroll types. 35 | */ 36 | public enum BannerViewScrollType { 37 | /** 38 | BannerView scrolls to the start after the last item. 39 | */ 40 | case fromStart 41 | /** 42 | BannerView scrolls to the end item and then to the first item through all items. 43 | */ 44 | case reverse 45 | /** 46 | BannerView always scrolls forward. 47 | */ 48 | case alwaysForward 49 | } 50 | 51 | 52 | /** 53 | * BannerView - contains all public API. 54 | */ 55 | @IBDesignable 56 | public class BannerView: UIView { 57 | 58 | @IBInspectable public var delegate: BannerViewDelegate? 59 | 60 | private var bannerDataSource: BannerDataSource! 61 | /** 62 | Collection view of BannerView. 63 | */ 64 | private (set) public var collectionView: BannerCollectionView! 65 | 66 | /** 67 | pageControl property allows to setup BannerPageControl. 68 | */ 69 | private (set) public var pageControl: BannerPageControl! 70 | 71 | /** 72 | Current page. 73 | */ 74 | public var currentPage: Int { 75 | get { 76 | return bannerDataSource.currentPage 77 | } 78 | } 79 | 80 | 81 | //MARK: initializers 82 | 83 | public override init(frame: CGRect) { 84 | super.init(frame: frame) 85 | 86 | commonInit() 87 | } 88 | 89 | public required init?(coder aDecoder: NSCoder) { 90 | super.init(coder: aDecoder) 91 | 92 | commonInit() 93 | } 94 | 95 | 96 | private func commonInit() { 97 | let layout = UICollectionViewFlowLayout() 98 | layout.scrollDirection = .horizontal 99 | collectionView = BannerCollectionView( 100 | frame: bounds, 101 | collectionViewLayout: layout 102 | ) 103 | collectionView.showsHorizontalScrollIndicator = false 104 | collectionView.isPagingEnabled = true 105 | collectionView.backgroundColor = UIColor.white 106 | 107 | addSubview(collectionView) 108 | 109 | collectionView.clipsToBounds = true 110 | collectionView.addConstraintsAlignedToSuperview(top: 2) 111 | 112 | pageControl = BannerPageControl() 113 | pageControl.backgroundColor = UIColor.black 114 | addSubview(pageControl) 115 | addContsraintsToPageControl(pageControl: pageControl) 116 | } 117 | 118 | private func addContsraintsToPageControl(pageControl: UIView) { 119 | pageControl.translatesAutoresizingMaskIntoConstraints = false 120 | 121 | addConstraint( 122 | NSLayoutConstraint( 123 | item: pageControl, 124 | attribute: NSLayoutAttribute.width, 125 | relatedBy: NSLayoutRelation.equal, 126 | toItem: self, 127 | attribute: NSLayoutAttribute.width, 128 | multiplier: CGFloat(2) / 3, 129 | constant: 0 130 | ) 131 | ) 132 | addConstraint( 133 | NSLayoutConstraint( 134 | item: pageControl, 135 | attribute: NSLayoutAttribute.height, 136 | relatedBy: NSLayoutRelation.equal, 137 | toItem: nil, 138 | attribute: NSLayoutAttribute.notAnAttribute, 139 | multiplier: 1, 140 | constant: 1 141 | ) 142 | ) 143 | addConstraint( 144 | NSLayoutConstraint( 145 | item: pageControl, 146 | attribute: NSLayoutAttribute.top, 147 | relatedBy: NSLayoutRelation.equal, 148 | toItem: self, 149 | attribute: NSLayoutAttribute.top, 150 | multiplier: 1, 151 | constant: 0 152 | ) 153 | ) 154 | addConstraint( 155 | NSLayoutConstraint( 156 | item: pageControl, 157 | attribute: NSLayoutAttribute.centerX, 158 | relatedBy: NSLayoutRelation.equal, 159 | toItem: self, 160 | attribute: NSLayoutAttribute.centerX, 161 | multiplier: 1, 162 | constant: 0 163 | ) 164 | ) 165 | } 166 | 167 | 168 | /** 169 | Setup banner view. 170 | 171 | @param type - scroll type. 172 | @param timeForOneItem - indicates how much time user can see one item. 173 | @param bannerItems - items to show. 174 | @param automaticallyScrolls - indicates whether banner view will scroll items automatically. By default is true. 175 | @param delegate - delegate. 176 | */ 177 | public func setup( 178 | type: BannerViewScrollType, 179 | timeForOneItem: TimeInterval, 180 | bannerItems: [BannerItem], 181 | automaticallyScrolls: Bool = true, 182 | delegate: BannerViewDelegate?) { 183 | 184 | bannerDataSource = BannerDataSource( 185 | bannerView: self, 186 | bannerViewScrollType: type, 187 | timeForOneItem: timeForOneItem, 188 | bannerItems: bannerItems, 189 | delegate: self 190 | ) 191 | self.delegate = delegate 192 | collectionView.dataSource = bannerDataSource 193 | collectionView.delegate = bannerDataSource 194 | collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) 195 | collectionView.contentOffset = CGPoint(x: 0, y: 0) 196 | 197 | pageControl.setup(total: bannerItems.count, currentPage: 0) 198 | 199 | if automaticallyScrolls { 200 | startAutomaticScrolling() 201 | } 202 | } 203 | 204 | /** 205 | Starts scrolling automatically. 206 | */ 207 | public func startAutomaticScrolling() { 208 | bannerDataSource.startSlider() 209 | } 210 | 211 | /** 212 | Stops scrolling automatically. 213 | */ 214 | public func stopAutomaticScrolling() { 215 | bannerDataSource.stopSlider() 216 | } 217 | } 218 | 219 | extension BannerView: BannerViewDelegate { 220 | 221 | public func bannerView(bannerView: BannerView, 222 | didScrollTo: BannerItem, 223 | with index: Int) { 224 | self.pageControl.currentPage = index 225 | 226 | delegate?.bannerView?( 227 | bannerView: bannerView, 228 | didScrollTo: didScrollTo, 229 | with: index 230 | ) 231 | } 232 | 233 | public func bannerView(bannerView: BannerView, 234 | didSelectItem: BannerItem, 235 | with index: Int) { 236 | self.delegate?.bannerView?( 237 | bannerView: self, 238 | didSelectItem: didSelectItem, 239 | with: index 240 | ) 241 | } 242 | 243 | public func bannerView(bannerView: BannerView, 244 | collectionView: UICollectionView, 245 | cellForItemAt indexPath: IndexPath) -> UICollectionViewCell? { 246 | return delegate?.bannerView?( 247 | bannerView: self, 248 | collectionView: collectionView, 249 | cellForItemAt: indexPath 250 | ) 251 | } 252 | } 253 | -------------------------------------------------------------------------------- /BannerView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BannerView/UIApplication+RtL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+RtL.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | extension UIApplication { 13 | 14 | static var isRTL: Bool { 15 | return UIApplication.shared.userInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.rightToLeft 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /BannerView/UIView+Constraints.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Constraints.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | extension UIView { 13 | 14 | func addConstraintsAlignedToSuperview(top: CGFloat = 0, leading: CGFloat = 0, bottom: CGFloat = 0, trailing: CGFloat = 0) { 15 | translatesAutoresizingMaskIntoConstraints = false 16 | 17 | superview?.addConstraint( 18 | NSLayoutConstraint( 19 | item: self, 20 | attribute: .top, 21 | relatedBy: .equal, 22 | toItem: superview, 23 | attribute: NSLayoutAttribute.top, 24 | multiplier: 1, 25 | constant: top 26 | ) 27 | ) 28 | superview?.addConstraint( 29 | NSLayoutConstraint( 30 | item: self, 31 | attribute: .leading, 32 | relatedBy: .equal, 33 | toItem: superview, 34 | attribute: .leading, 35 | multiplier: 1, 36 | constant: leading 37 | ) 38 | ) 39 | superview?.addConstraint( 40 | NSLayoutConstraint( 41 | item: self, 42 | attribute: .bottom, 43 | relatedBy: .equal, 44 | toItem: superview, 45 | attribute: .bottom, 46 | multiplier: 1, 47 | constant: bottom 48 | ) 49 | ) 50 | superview?.addConstraint( 51 | NSLayoutConstraint( 52 | item: self, 53 | attribute: .trailing, 54 | relatedBy: .equal, 55 | toItem: superview, 56 | attribute: .trailing, 57 | multiplier: 1, 58 | constant: trailing 59 | ) 60 | ) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /BannerViewExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // BannerViewExample 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /BannerViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /BannerViewExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /BannerViewExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /BannerViewExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 34 | 43 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /BannerViewExample/Cell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomCell.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 7/6/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Reusable 11 | 12 | 13 | class Cell: UICollectionViewCell, Reusable { 14 | 15 | @IBOutlet weak var myImageView: UIImageView! 16 | 17 | @IBOutlet weak var title: UILabel! 18 | 19 | } 20 | -------------------------------------------------------------------------------- /BannerViewExample/Cell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /BannerViewExample/Colors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colors.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 6/30/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | extension UIColor { 13 | 14 | convenience init(rgbValue: UInt, _ alpha: CGFloat = 1.0) { 15 | self.init( 16 | red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, 17 | green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, 18 | blue: CGFloat(rgbValue & 0x0000FF) / 255.0, 19 | alpha: CGFloat(alpha) 20 | ) 21 | } 22 | 23 | static func customGreenColor(_ alpha: CGFloat = 1.0) -> UIColor { 24 | return UIColor(rgbValue: 0x1F806C, alpha) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BannerViewExample/CustomBannerViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomBannerViewController.swift 3 | // BannerView 4 | // 5 | // Created by Roman Sorochak on 7/6/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import BannerView 11 | import Reusable 12 | 13 | 14 | class CustomBannerViewController: UIViewController, BannerViewDelegate { 15 | 16 | let items: [BannerItem] = [ 17 | BannerItem(image: "banner_1".localizedImage), 18 | BannerItem(image: "banner_2".localizedImage), 19 | BannerItem(image: "banner_3".localizedImage) 20 | ] 21 | 22 | var bannerView: BannerView! 23 | 24 | override func viewDidAppear(_ animated: Bool) { 25 | super.viewDidAppear(animated) 26 | 27 | bannerView = BannerView( 28 | frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 150) 29 | ) 30 | view.addSubview(bannerView) 31 | 32 | bannerView.center = view.center 33 | 34 | bannerView.setup( 35 | type: .alwaysForward, 36 | timeForOneItem: 1, 37 | bannerItems: items, 38 | delegate: self 39 | ) 40 | bannerView.pageControl.currentPageColor = UIColor.customGreenColor() 41 | } 42 | 43 | 44 | func bannerView(bannerView: BannerView, didScrollTo: BannerItem, with index: Int) { 45 | print("didScrollTo: \(index)") 46 | } 47 | 48 | func bannerView(bannerView: BannerView, didSelectItem: BannerItem, with index: Int) { 49 | print("didSelectItem: \(index)") 50 | } 51 | 52 | func bannerView(bannerView: BannerView, collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell? { 53 | let cell = collectionView.dequeueCell(for: indexPath) as Cell 54 | 55 | cell.myImageView.image = items[indexPath.item].image 56 | cell.title.text = "Custom cell" 57 | 58 | return cell 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /BannerViewExample/Demo_alwaysForward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/Demo_alwaysForward.gif -------------------------------------------------------------------------------- /BannerViewExample/Demo_ar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/Demo_ar.gif -------------------------------------------------------------------------------- /BannerViewExample/Demo_en.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/Demo_en.gif -------------------------------------------------------------------------------- /BannerViewExample/Demo_fromStart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/Demo_fromStart.gif -------------------------------------------------------------------------------- /BannerViewExample/Demo_reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/Demo_reverse.gif -------------------------------------------------------------------------------- /BannerViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIRequiresFullScreen 32 | 33 | UIStatusBarHidden 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /BannerViewExample/Localizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Localizable.swift 3 | // Localizable 4 | // 5 | // Created by Roman Sorochak on 6/23/17. 6 | // For more details look here https://github.com/romansorochak/Localizable 7 | // Copyright © 2017 MagicLab. All rights reserved. 8 | // 9 | 10 | import UIKit 11 | 12 | 13 | private let appleLanguagesKey = "AppleLanguages" 14 | 15 | 16 | enum Language: String { 17 | 18 | case english = "en" 19 | case arabic = "ar" 20 | case ukrainian = "uk" 21 | 22 | @available(iOS 9.0, *) 23 | var semantic: UISemanticContentAttribute { 24 | switch self { 25 | case .english, .ukrainian: 26 | return .forceLeftToRight 27 | case .arabic: 28 | return .forceRightToLeft 29 | } 30 | } 31 | 32 | 33 | static var language: Language { 34 | get { 35 | if let languageCode = UserDefaults.standard.string(forKey: appleLanguagesKey), 36 | let language = Language(rawValue: languageCode) { 37 | return language 38 | } else { 39 | let preferredLanguage = NSLocale.preferredLanguages[0] as String 40 | let index = preferredLanguage.index( 41 | preferredLanguage.startIndex, 42 | offsetBy: 2 43 | ) 44 | guard let localization = Language( 45 | rawValue: preferredLanguage.substring(to: index) 46 | ) else { 47 | return Language.english 48 | } 49 | 50 | return localization 51 | } 52 | } 53 | set { 54 | guard language != newValue else { 55 | return 56 | } 57 | 58 | //change language in the app 59 | //the language will be changed after restart 60 | UserDefaults.standard.set([newValue.rawValue], forKey: appleLanguagesKey) 61 | UserDefaults.standard.synchronize() 62 | 63 | //Changes semantic to all views 64 | //this hack needs in case of languages with different semantics: leftToRight(en/uk) & rightToLeft(ar) 65 | if #available(iOS 9.0, *) { 66 | UIView.appearance().semanticContentAttribute = newValue.semantic 67 | } 68 | 69 | //initialize the app from scratch 70 | //show initial view controller 71 | //so it seems like the is restarted 72 | //NOTE: do not localize storboards 73 | //After the app restart all labels/images will be set 74 | //see extension String below 75 | UIApplication.shared.windows[0].rootViewController = UIStoryboard( 76 | name: "Main", 77 | bundle: nil 78 | ).instantiateInitialViewController() 79 | } 80 | } 81 | } 82 | 83 | 84 | extension String { 85 | 86 | var localized: String { 87 | return Bundle.localizedBundle.localizedString(forKey: self, value: nil, table: nil) 88 | } 89 | 90 | var localizedImage: UIImage? { 91 | return localizedImage() 92 | ?? localizedImage(type: ".png") 93 | ?? localizedImage(type: ".jpg") 94 | ?? localizedImage(type: ".jpeg") 95 | ?? UIImage(named: self) 96 | } 97 | 98 | private func localizedImage(type: String = "") -> UIImage? { 99 | guard let imagePath = Bundle.localizedBundle.path(forResource: self, ofType: type) else { 100 | return nil 101 | } 102 | return UIImage(contentsOfFile: imagePath) 103 | } 104 | } 105 | 106 | extension Bundle { 107 | //Here magic happens 108 | //when you localize resources: for instance Localizable.strings, images 109 | //it creates different bundles 110 | //we take appropriate bundle according to language 111 | static var localizedBundle: Bundle { 112 | let languageCode = Language.language.rawValue 113 | guard let path = Bundle.main.path(forResource: languageCode, ofType: "lproj") else { 114 | return Bundle.main 115 | } 116 | return Bundle(path: path)! 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /BannerViewExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // BannerViewExample 4 | // 5 | // Created by Roman Sorochak on 6/29/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import BannerView 11 | 12 | 13 | class ViewController: UIViewController, BannerViewDelegate { 14 | 15 | 16 | @IBOutlet weak var topBannerView: BannerView! 17 | @IBOutlet weak var centerBannerView: BannerView! 18 | @IBOutlet weak var bottomBannerView: BannerView! 19 | 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | title = "title".localized 25 | 26 | let items: [BannerItem] = [ 27 | BannerItem(image: "banner_1".localizedImage), 28 | BannerItem(image: "banner_2".localizedImage), 29 | BannerItem(image: "banner_3".localizedImage) 30 | ] 31 | 32 | topBannerView.setup( 33 | type: BannerViewScrollType.fromStart, 34 | timeForOneItem: 2, 35 | bannerItems: items, 36 | delegate: self 37 | ) 38 | topBannerView.pageControl.color = UIColor.black 39 | topBannerView.pageControl.currentPageColor = UIColor.customGreenColor() 40 | 41 | centerBannerView.setup( 42 | type: BannerViewScrollType.reverse, 43 | timeForOneItem: 2, 44 | bannerItems: items, 45 | delegate: self 46 | ) 47 | centerBannerView.pageControl.color = UIColor.black 48 | centerBannerView.pageControl.currentPageColor = UIColor.customGreenColor() 49 | 50 | bottomBannerView.setup( 51 | type: BannerViewScrollType.alwaysForward, 52 | timeForOneItem: 2, 53 | bannerItems: items, 54 | delegate: nil 55 | ) 56 | bottomBannerView.pageControl.color = UIColor.black 57 | bottomBannerView.pageControl.currentPageColor = UIColor.customGreenColor() 58 | } 59 | 60 | override func didReceiveMemoryWarning() { 61 | super.didReceiveMemoryWarning() 62 | 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /BannerViewExample/ar.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | BannerView 4 | 5 | Created by Roman Sorochak on 6/29/17. 6 | Copyright © 2017 MagicLab. All rights reserved. 7 | */ 8 | 9 | "title" = "Right to left semantic"; 10 | -------------------------------------------------------------------------------- /BannerViewExample/ar.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = "Reverse"; ObjectID = "4SL-Ha-IVe"; */ 3 | "4SL-Ha-IVe.text" = "Reverse"; 4 | 5 | /* Class = "UILabel"; text = "From start"; ObjectID = "JWQ-Nk-SFJ"; */ 6 | "JWQ-Nk-SFJ.text" = "From start"; 7 | 8 | /* Class = "UILabel"; text = "Always forward"; ObjectID = "mdJ-iG-4uV"; */ 9 | "mdJ-iG-4uV.text" = "Always forward"; 10 | -------------------------------------------------------------------------------- /BannerViewExample/ar.lproj/banner_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/ar.lproj/banner_1.jpg -------------------------------------------------------------------------------- /BannerViewExample/ar.lproj/banner_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/ar.lproj/banner_2.jpg -------------------------------------------------------------------------------- /BannerViewExample/ar.lproj/banner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/ar.lproj/banner_3.png -------------------------------------------------------------------------------- /BannerViewExample/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | BannerView 4 | 5 | Created by Roman Sorochak on 6/29/17. 6 | Copyright © 2017 MagicLab. All rights reserved. 7 | */ 8 | 9 | "title" = "Left to right semantic"; 10 | -------------------------------------------------------------------------------- /BannerViewExample/en.lproj/banner_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/en.lproj/banner_1.jpg -------------------------------------------------------------------------------- /BannerViewExample/en.lproj/banner_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/en.lproj/banner_2.jpg -------------------------------------------------------------------------------- /BannerViewExample/en.lproj/banner_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagicLab-team/BannerView/e0963bb1297c2d8e522526922ce5853f62ba5835/BannerViewExample/en.lproj/banner_3.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 MagicLab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MLBannerView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MLBannerView" 3 | s.version = "1.1.1" 4 | s.summary = "BannerView with ability to show items periodically." 5 | s.description = "BannerView allows easily to setup banner with images to show." 6 | s.homepage = "https://github.com/MagicLab-team" 7 | s.license = "MIT" 8 | s.author = { "Roman Sorochak" => "roman.sorochak@gmail.com" } 9 | # s.social_media_url = "https://www.linkedin.com/in/roman-sorochak-b3339a93/" 10 | s.platform = :ios, "8.0" 11 | s.ios.deployment_target = "8.0" 12 | s.module_name = "BannerView" 13 | s.source = { :git => "https://github.com/MagicLab-team/BannerView.git", :tag => s.version } 14 | s.source_files = "BannerView/*.swift" 15 | s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3' } 16 | 17 | end 18 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'BannerView' do 4 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 5 | use_frameworks! 6 | 7 | # Pods for BannerView 8 | 9 | end 10 | 11 | target 'BannerViewExample' do 12 | 13 | pod 'RSReusable' 14 | 15 | end 16 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RSReusable (1.0.11) 3 | 4 | DEPENDENCIES: 5 | - RSReusable 6 | 7 | SPEC CHECKSUMS: 8 | RSReusable: ac2b6c35d1e9ce36ee1ffb03f0a3d6bb0a81ae8b 9 | 10 | PODFILE CHECKSUM: 497457da0a7d06b23a3942cccffd0a2db3064e9c 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RSReusable (1.0.11) 3 | 4 | DEPENDENCIES: 5 | - RSReusable 6 | 7 | SPEC CHECKSUMS: 8 | RSReusable: ac2b6c35d1e9ce36ee1ffb03f0a3d6bb0a81ae8b 9 | 10 | PODFILE CHECKSUM: 497457da0a7d06b23a3942cccffd0a2db3064e9c 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 138CF08BE82B6B72B7CEBD61179DD990 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 11 | 3F640595247A7CC4DE6DC30C017C551D /* BaseTableHeaderFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B79CC53201FF4A4952C12FA32636E45 /* BaseTableHeaderFooterView.swift */; }; 12 | 469647D9E0E5D465B6419784421FD046 /* Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 753F04C6C6936C1129D9BB4F88BD78C9 /* Reusable.swift */; }; 13 | 4AFD122E70B74914FF75CCE31D114B5D /* Reusable.h in Headers */ = {isa = PBXBuildFile; fileRef = 77180D62FE1C364EA28BBE17FC3D1548 /* Reusable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 51B66E80C321DC21EA722D1B3549504A /* UITableView+Dequeueable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E24D1BB7C821207B950B3D9BEBEF90F2 /* UITableView+Dequeueable.swift */; }; 15 | 51FB5C739688E2D0D7EC6BA13D657C54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 16 | 7C277394AECB1E74DCDF441A7C2DF4B4 /* RSReusable-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EDD6166BA35A7355C3E3936FC026FBC7 /* RSReusable-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 7F4F82149BD5E6807105BF303045D354 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 18 | A04D090F58FF13C20742008E4039B2EB /* NibLoadableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4310CAFE0B892EEB15A3F6C67B2F4FD9 /* NibLoadableView.swift */; }; 19 | B95EB93FC60228641CD9864FB9E970DF /* Pods-BannerView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E1D905950CD14B4D2BAF53D137F47619 /* Pods-BannerView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20 | BC550760BBDCDD469A0BF9904C6341E5 /* Pods-BannerView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C1E5F143D007964A0925FBA8FECF563 /* Pods-BannerView-dummy.m */; }; 21 | D018549F56B8ABB13F21D3C8E6ECA01C /* RSReusable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A7FD07D53438F8CA730BE181D3F63D92 /* RSReusable-dummy.m */; }; 22 | D692FCDEB61102AF88159141B1D367E5 /* UINib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D2C76919097D82B25F5425B3A18AB43 /* UINib.swift */; }; 23 | D91FA5366E59BF9D2EF2CD6457235920 /* UICollectionView+Dequeueable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF9DB8A590472B9274696C14428E0905 /* UICollectionView+Dequeueable.swift */; }; 24 | DC343827F2DBA7215FF1C6E2CC1BE73D /* Pods-BannerViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 23EF7D2AB35169D2B53F1C86F4A9FF75 /* Pods-BannerViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | EFA3E528DFB1B0D36B89FB73E7D9DE5F /* Pods-BannerViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B90C0B9EC5629EEDDB2FE8DE7EFBFCE6 /* Pods-BannerViewExample-dummy.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 32D9422A6E7885DAEB22668C56693481 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = C28677801FA044FC63206B1FB6AE7063; 34 | remoteInfo = RSReusable; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 00F8B0D7F0D1948A434F9BBE4D27E517 /* Pods-BannerViewExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BannerViewExample-resources.sh"; sourceTree = ""; }; 40 | 0C1E5F143D007964A0925FBA8FECF563 /* Pods-BannerView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BannerView-dummy.m"; sourceTree = ""; }; 41 | 0DB40DD584AC0BC5416B9BCB00869852 /* Reusable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Reusable.framework; path = RSReusable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 185110DC455443A948B93B39113BE1D6 /* Pods-BannerView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BannerView.release.xcconfig"; sourceTree = ""; }; 43 | 18C91C3D7AEA0B89D964510179BCD5B1 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 23EF7D2AB35169D2B53F1C86F4A9FF75 /* Pods-BannerViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BannerViewExample-umbrella.h"; sourceTree = ""; }; 45 | 2693DE3B4171A4D8E51EE36BD7B28B96 /* Pods_BannerView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_BannerView.framework; path = "Pods-BannerView.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 3D439D11E6B3A492AC071280019B0307 /* Pods-BannerViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BannerViewExample.release.xcconfig"; sourceTree = ""; }; 47 | 4310CAFE0B892EEB15A3F6C67B2F4FD9 /* NibLoadableView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NibLoadableView.swift; path = Reusable/NibLoadableView.swift; sourceTree = ""; }; 48 | 464BDA2A642A5D8542FADD8E82F403A1 /* Pods-BannerViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BannerViewExample-frameworks.sh"; sourceTree = ""; }; 49 | 4CBF75C6832A57C8C31CFB02C546989A /* RSReusable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RSReusable-prefix.pch"; sourceTree = ""; }; 50 | 51F3AA6691DE3157807691ECB786C4B1 /* Pods-BannerViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-BannerViewExample.modulemap"; sourceTree = ""; }; 51 | 554163D81732B82B5C1E2FACFE66C368 /* Pods_BannerViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_BannerViewExample.framework; path = "Pods-BannerViewExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 55EAE9B8D9B1A64252D5612D97B91E5F /* Pods-BannerView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BannerView.debug.xcconfig"; sourceTree = ""; }; 53 | 5766E92EEB75391A02B69A117AD3DFFE /* Pods-BannerViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BannerViewExample.debug.xcconfig"; sourceTree = ""; }; 54 | 5D2C76919097D82B25F5425B3A18AB43 /* UINib.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UINib.swift; path = Reusable/UINib.swift; sourceTree = ""; }; 55 | 6F727E3EDD6F0C3FDD3AE75D97B24D6C /* RSReusable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RSReusable.xcconfig; sourceTree = ""; }; 56 | 753F04C6C6936C1129D9BB4F88BD78C9 /* Reusable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reusable.swift; path = Reusable/Reusable.swift; sourceTree = ""; }; 57 | 77180D62FE1C364EA28BBE17FC3D1548 /* Reusable.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Reusable.h; path = Reusable/Reusable.h; sourceTree = ""; }; 58 | 78A11F97A7994550040D6366F97E08F2 /* Pods-BannerViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BannerViewExample-acknowledgements.markdown"; sourceTree = ""; }; 59 | 7B79CC53201FF4A4952C12FA32636E45 /* BaseTableHeaderFooterView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BaseTableHeaderFooterView.swift; path = Reusable/BaseTableHeaderFooterView.swift; sourceTree = ""; }; 60 | 88D2817EF9E793287557AE7734D4E8A1 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 8C1AF939A6C8DAE161D3854A3E11F312 /* Pods-BannerView-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BannerView-acknowledgements.markdown"; sourceTree = ""; }; 62 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 63 | A1483424FD92B74A581CECF3406B4A2D /* RSReusable.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RSReusable.modulemap; sourceTree = ""; }; 64 | A7FD07D53438F8CA730BE181D3F63D92 /* RSReusable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RSReusable-dummy.m"; sourceTree = ""; }; 65 | AC09AC0F231708BA27BC0DA112652042 /* Pods-BannerView-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BannerView-acknowledgements.plist"; sourceTree = ""; }; 66 | B90C0B9EC5629EEDDB2FE8DE7EFBFCE6 /* Pods-BannerViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BannerViewExample-dummy.m"; sourceTree = ""; }; 67 | C3C55BAD44369335EB8837272688F697 /* Pods-BannerView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-BannerView.modulemap"; sourceTree = ""; }; 68 | CA7747D22CD6C38B939D9F5159DEA74E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 70 | E159090F133D3F0F53EE3A75CD8A51CD /* Pods-BannerView-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-BannerView-resources.sh"; sourceTree = ""; }; 71 | E1D905950CD14B4D2BAF53D137F47619 /* Pods-BannerView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-BannerView-umbrella.h"; sourceTree = ""; }; 72 | E24D1BB7C821207B950B3D9BEBEF90F2 /* UITableView+Dequeueable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITableView+Dequeueable.swift"; path = "Reusable/UITableView+Dequeueable.swift"; sourceTree = ""; }; 73 | EDD6166BA35A7355C3E3936FC026FBC7 /* RSReusable-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RSReusable-umbrella.h"; sourceTree = ""; }; 74 | EE6F8D7FA66513CC0A1415DDF9C254AB /* Pods-BannerViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BannerViewExample-acknowledgements.plist"; sourceTree = ""; }; 75 | FF9DB8A590472B9274696C14428E0905 /* UICollectionView+Dequeueable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UICollectionView+Dequeueable.swift"; path = "Reusable/UICollectionView+Dequeueable.swift"; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | 6D32F4DDA6B548BC87BC23DAFB39A69F /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 7F4F82149BD5E6807105BF303045D354 /* Foundation.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | 774848E8AD27222379265EBED8A46310 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | 138CF08BE82B6B72B7CEBD61179DD990 /* Foundation.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | EB4F6633FC4DB932AD65EA58CC697AF5 /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | 51FB5C739688E2D0D7EC6BA13D657C54 /* Foundation.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | /* End PBXFrameworksBuildPhase section */ 104 | 105 | /* Begin PBXGroup section */ 106 | 033CA3655B1F859A627D0DCA99A48B8D /* Pods-BannerViewExample */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 18C91C3D7AEA0B89D964510179BCD5B1 /* Info.plist */, 110 | 51F3AA6691DE3157807691ECB786C4B1 /* Pods-BannerViewExample.modulemap */, 111 | 78A11F97A7994550040D6366F97E08F2 /* Pods-BannerViewExample-acknowledgements.markdown */, 112 | EE6F8D7FA66513CC0A1415DDF9C254AB /* Pods-BannerViewExample-acknowledgements.plist */, 113 | B90C0B9EC5629EEDDB2FE8DE7EFBFCE6 /* Pods-BannerViewExample-dummy.m */, 114 | 464BDA2A642A5D8542FADD8E82F403A1 /* Pods-BannerViewExample-frameworks.sh */, 115 | 00F8B0D7F0D1948A434F9BBE4D27E517 /* Pods-BannerViewExample-resources.sh */, 116 | 23EF7D2AB35169D2B53F1C86F4A9FF75 /* Pods-BannerViewExample-umbrella.h */, 117 | 5766E92EEB75391A02B69A117AD3DFFE /* Pods-BannerViewExample.debug.xcconfig */, 118 | 3D439D11E6B3A492AC071280019B0307 /* Pods-BannerViewExample.release.xcconfig */, 119 | ); 120 | name = "Pods-BannerViewExample"; 121 | path = "Target Support Files/Pods-BannerViewExample"; 122 | sourceTree = ""; 123 | }; 124 | 16051970295235B9F8322623573A399E /* Products */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 2693DE3B4171A4D8E51EE36BD7B28B96 /* Pods_BannerView.framework */, 128 | 554163D81732B82B5C1E2FACFE66C368 /* Pods_BannerViewExample.framework */, 129 | 0DB40DD584AC0BC5416B9BCB00869852 /* Reusable.framework */, 130 | ); 131 | name = Products; 132 | sourceTree = ""; 133 | }; 134 | 2413F287B84ADA152E6115AE77731168 /* RSReusable */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 7B79CC53201FF4A4952C12FA32636E45 /* BaseTableHeaderFooterView.swift */, 138 | 4310CAFE0B892EEB15A3F6C67B2F4FD9 /* NibLoadableView.swift */, 139 | 77180D62FE1C364EA28BBE17FC3D1548 /* Reusable.h */, 140 | 753F04C6C6936C1129D9BB4F88BD78C9 /* Reusable.swift */, 141 | FF9DB8A590472B9274696C14428E0905 /* UICollectionView+Dequeueable.swift */, 142 | 5D2C76919097D82B25F5425B3A18AB43 /* UINib.swift */, 143 | E24D1BB7C821207B950B3D9BEBEF90F2 /* UITableView+Dequeueable.swift */, 144 | FBBEF45F5EE6DB77C9E2CBDBD550BD71 /* Support Files */, 145 | ); 146 | name = RSReusable; 147 | path = RSReusable; 148 | sourceTree = ""; 149 | }; 150 | 25D26149B29E47E65F5AF02B3C19E4CB /* Targets Support Files */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | AE26BD31A8C97DC69F225DEAF9C241E6 /* Pods-BannerView */, 154 | 033CA3655B1F859A627D0DCA99A48B8D /* Pods-BannerViewExample */, 155 | ); 156 | name = "Targets Support Files"; 157 | sourceTree = ""; 158 | }; 159 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 163 | ); 164 | name = iOS; 165 | sourceTree = ""; 166 | }; 167 | 7DB346D0F39D3F0E887471402A8071AB = { 168 | isa = PBXGroup; 169 | children = ( 170 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 171 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 172 | BCACAE3E2BE296A1EED0B4EB89B1840D /* Pods */, 173 | 16051970295235B9F8322623573A399E /* Products */, 174 | 25D26149B29E47E65F5AF02B3C19E4CB /* Targets Support Files */, 175 | ); 176 | sourceTree = ""; 177 | }; 178 | AE26BD31A8C97DC69F225DEAF9C241E6 /* Pods-BannerView */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | CA7747D22CD6C38B939D9F5159DEA74E /* Info.plist */, 182 | C3C55BAD44369335EB8837272688F697 /* Pods-BannerView.modulemap */, 183 | 8C1AF939A6C8DAE161D3854A3E11F312 /* Pods-BannerView-acknowledgements.markdown */, 184 | AC09AC0F231708BA27BC0DA112652042 /* Pods-BannerView-acknowledgements.plist */, 185 | 0C1E5F143D007964A0925FBA8FECF563 /* Pods-BannerView-dummy.m */, 186 | E159090F133D3F0F53EE3A75CD8A51CD /* Pods-BannerView-resources.sh */, 187 | E1D905950CD14B4D2BAF53D137F47619 /* Pods-BannerView-umbrella.h */, 188 | 55EAE9B8D9B1A64252D5612D97B91E5F /* Pods-BannerView.debug.xcconfig */, 189 | 185110DC455443A948B93B39113BE1D6 /* Pods-BannerView.release.xcconfig */, 190 | ); 191 | name = "Pods-BannerView"; 192 | path = "Target Support Files/Pods-BannerView"; 193 | sourceTree = ""; 194 | }; 195 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 199 | ); 200 | name = Frameworks; 201 | sourceTree = ""; 202 | }; 203 | BCACAE3E2BE296A1EED0B4EB89B1840D /* Pods */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 2413F287B84ADA152E6115AE77731168 /* RSReusable */, 207 | ); 208 | name = Pods; 209 | sourceTree = ""; 210 | }; 211 | FBBEF45F5EE6DB77C9E2CBDBD550BD71 /* Support Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 88D2817EF9E793287557AE7734D4E8A1 /* Info.plist */, 215 | A1483424FD92B74A581CECF3406B4A2D /* RSReusable.modulemap */, 216 | 6F727E3EDD6F0C3FDD3AE75D97B24D6C /* RSReusable.xcconfig */, 217 | A7FD07D53438F8CA730BE181D3F63D92 /* RSReusable-dummy.m */, 218 | 4CBF75C6832A57C8C31CFB02C546989A /* RSReusable-prefix.pch */, 219 | EDD6166BA35A7355C3E3936FC026FBC7 /* RSReusable-umbrella.h */, 220 | ); 221 | name = "Support Files"; 222 | path = "../Target Support Files/RSReusable"; 223 | sourceTree = ""; 224 | }; 225 | /* End PBXGroup section */ 226 | 227 | /* Begin PBXHeadersBuildPhase section */ 228 | 4758CD7878CF88E887AADF6AC109F21D /* Headers */ = { 229 | isa = PBXHeadersBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 4AFD122E70B74914FF75CCE31D114B5D /* Reusable.h in Headers */, 233 | 7C277394AECB1E74DCDF441A7C2DF4B4 /* RSReusable-umbrella.h in Headers */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | 4802ED3615FA49AD9B802EF9EC9FC767 /* Headers */ = { 238 | isa = PBXHeadersBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | B95EB93FC60228641CD9864FB9E970DF /* Pods-BannerView-umbrella.h in Headers */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | F0493E0CD6256A57BB9CFF7BD4F2F5AD /* Headers */ = { 246 | isa = PBXHeadersBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | DC343827F2DBA7215FF1C6E2CC1BE73D /* Pods-BannerViewExample-umbrella.h in Headers */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXHeadersBuildPhase section */ 254 | 255 | /* Begin PBXNativeTarget section */ 256 | 03DD2C4EDABE63BBE55505ED4ECE9143 /* Pods-BannerViewExample */ = { 257 | isa = PBXNativeTarget; 258 | buildConfigurationList = 16347EF965D646BABAA247DC8BA9A45F /* Build configuration list for PBXNativeTarget "Pods-BannerViewExample" */; 259 | buildPhases = ( 260 | E1362E59EE74120D32081D7725760E42 /* Sources */, 261 | EB4F6633FC4DB932AD65EA58CC697AF5 /* Frameworks */, 262 | F0493E0CD6256A57BB9CFF7BD4F2F5AD /* Headers */, 263 | ); 264 | buildRules = ( 265 | ); 266 | dependencies = ( 267 | 0503987AAEDE8E3E950139865DBCA9D8 /* PBXTargetDependency */, 268 | ); 269 | name = "Pods-BannerViewExample"; 270 | productName = "Pods-BannerViewExample"; 271 | productReference = 554163D81732B82B5C1E2FACFE66C368 /* Pods_BannerViewExample.framework */; 272 | productType = "com.apple.product-type.framework"; 273 | }; 274 | C28677801FA044FC63206B1FB6AE7063 /* RSReusable */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = F14651492728129C3732B9CDAC4F700C /* Build configuration list for PBXNativeTarget "RSReusable" */; 277 | buildPhases = ( 278 | 59CCDE1BC4CE899A403FCC779786D2D5 /* Sources */, 279 | 774848E8AD27222379265EBED8A46310 /* Frameworks */, 280 | 4758CD7878CF88E887AADF6AC109F21D /* Headers */, 281 | ); 282 | buildRules = ( 283 | ); 284 | dependencies = ( 285 | ); 286 | name = RSReusable; 287 | productName = RSReusable; 288 | productReference = 0DB40DD584AC0BC5416B9BCB00869852 /* Reusable.framework */; 289 | productType = "com.apple.product-type.framework"; 290 | }; 291 | E8594A98A66BE9297D7CCF0A6BF02479 /* Pods-BannerView */ = { 292 | isa = PBXNativeTarget; 293 | buildConfigurationList = 581BE854DBB60C3858C849FE58B89634 /* Build configuration list for PBXNativeTarget "Pods-BannerView" */; 294 | buildPhases = ( 295 | 5161B2D47F487305B05D225A4CB6C7E4 /* Sources */, 296 | 6D32F4DDA6B548BC87BC23DAFB39A69F /* Frameworks */, 297 | 4802ED3615FA49AD9B802EF9EC9FC767 /* Headers */, 298 | ); 299 | buildRules = ( 300 | ); 301 | dependencies = ( 302 | ); 303 | name = "Pods-BannerView"; 304 | productName = "Pods-BannerView"; 305 | productReference = 2693DE3B4171A4D8E51EE36BD7B28B96 /* Pods_BannerView.framework */; 306 | productType = "com.apple.product-type.framework"; 307 | }; 308 | /* End PBXNativeTarget section */ 309 | 310 | /* Begin PBXProject section */ 311 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 312 | isa = PBXProject; 313 | attributes = { 314 | LastSwiftUpdateCheck = 0730; 315 | LastUpgradeCheck = 0700; 316 | }; 317 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 318 | compatibilityVersion = "Xcode 3.2"; 319 | developmentRegion = English; 320 | hasScannedForEncodings = 0; 321 | knownRegions = ( 322 | en, 323 | ); 324 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 325 | productRefGroup = 16051970295235B9F8322623573A399E /* Products */; 326 | projectDirPath = ""; 327 | projectRoot = ""; 328 | targets = ( 329 | E8594A98A66BE9297D7CCF0A6BF02479 /* Pods-BannerView */, 330 | 03DD2C4EDABE63BBE55505ED4ECE9143 /* Pods-BannerViewExample */, 331 | C28677801FA044FC63206B1FB6AE7063 /* RSReusable */, 332 | ); 333 | }; 334 | /* End PBXProject section */ 335 | 336 | /* Begin PBXSourcesBuildPhase section */ 337 | 5161B2D47F487305B05D225A4CB6C7E4 /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | BC550760BBDCDD469A0BF9904C6341E5 /* Pods-BannerView-dummy.m in Sources */, 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | 59CCDE1BC4CE899A403FCC779786D2D5 /* Sources */ = { 346 | isa = PBXSourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | 3F640595247A7CC4DE6DC30C017C551D /* BaseTableHeaderFooterView.swift in Sources */, 350 | A04D090F58FF13C20742008E4039B2EB /* NibLoadableView.swift in Sources */, 351 | 469647D9E0E5D465B6419784421FD046 /* Reusable.swift in Sources */, 352 | D018549F56B8ABB13F21D3C8E6ECA01C /* RSReusable-dummy.m in Sources */, 353 | D91FA5366E59BF9D2EF2CD6457235920 /* UICollectionView+Dequeueable.swift in Sources */, 354 | D692FCDEB61102AF88159141B1D367E5 /* UINib.swift in Sources */, 355 | 51B66E80C321DC21EA722D1B3549504A /* UITableView+Dequeueable.swift in Sources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | E1362E59EE74120D32081D7725760E42 /* Sources */ = { 360 | isa = PBXSourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | EFA3E528DFB1B0D36B89FB73E7D9DE5F /* Pods-BannerViewExample-dummy.m in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | /* End PBXSourcesBuildPhase section */ 368 | 369 | /* Begin PBXTargetDependency section */ 370 | 0503987AAEDE8E3E950139865DBCA9D8 /* PBXTargetDependency */ = { 371 | isa = PBXTargetDependency; 372 | name = RSReusable; 373 | target = C28677801FA044FC63206B1FB6AE7063 /* RSReusable */; 374 | targetProxy = 32D9422A6E7885DAEB22668C56693481 /* PBXContainerItemProxy */; 375 | }; 376 | /* End PBXTargetDependency section */ 377 | 378 | /* Begin XCBuildConfiguration section */ 379 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ALWAYS_SEARCH_USER_PATHS = NO; 383 | CLANG_ANALYZER_NONNULL = YES; 384 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 385 | CLANG_CXX_LIBRARY = "libc++"; 386 | CLANG_ENABLE_MODULES = YES; 387 | CLANG_ENABLE_OBJC_ARC = YES; 388 | CLANG_WARN_BOOL_CONVERSION = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 395 | CLANG_WARN_UNREACHABLE_CODE = YES; 396 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 397 | CODE_SIGNING_REQUIRED = NO; 398 | COPY_PHASE_STRIP = NO; 399 | ENABLE_TESTABILITY = YES; 400 | GCC_C_LANGUAGE_STANDARD = gnu99; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_OPTIMIZATION_LEVEL = 0; 403 | GCC_PREPROCESSOR_DEFINITIONS = ( 404 | "POD_CONFIGURATION_DEBUG=1", 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 416 | ONLY_ACTIVE_ARCH = YES; 417 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 418 | STRIP_INSTALLED_PRODUCT = NO; 419 | SYMROOT = "${SRCROOT}/../build"; 420 | }; 421 | name = Debug; 422 | }; 423 | 10C567086B1A70ADB482269998759AB6 /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = 5766E92EEB75391A02B69A117AD3DFFE /* Pods-BannerViewExample.debug.xcconfig */; 426 | buildSettings = { 427 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 428 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 429 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 430 | CURRENT_PROJECT_VERSION = 1; 431 | DEBUG_INFORMATION_FORMAT = dwarf; 432 | DEFINES_MODULE = YES; 433 | DYLIB_COMPATIBILITY_VERSION = 1; 434 | DYLIB_CURRENT_VERSION = 1; 435 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 436 | ENABLE_STRICT_OBJC_MSGSEND = YES; 437 | GCC_NO_COMMON_BLOCKS = YES; 438 | INFOPLIST_FILE = "Target Support Files/Pods-BannerViewExample/Info.plist"; 439 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 440 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 442 | MACH_O_TYPE = staticlib; 443 | MODULEMAP_FILE = "Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.modulemap"; 444 | MTL_ENABLE_DEBUG_INFO = YES; 445 | OTHER_LDFLAGS = ""; 446 | OTHER_LIBTOOLFLAGS = ""; 447 | PODS_ROOT = "$(SRCROOT)"; 448 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 449 | PRODUCT_NAME = Pods_BannerViewExample; 450 | SDKROOT = iphoneos; 451 | SKIP_INSTALL = YES; 452 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | VERSION_INFO_PREFIX = ""; 456 | }; 457 | name = Debug; 458 | }; 459 | 2D382703B5C01EA8417249BD161F51CC /* Release */ = { 460 | isa = XCBuildConfiguration; 461 | baseConfigurationReference = 185110DC455443A948B93B39113BE1D6 /* Pods-BannerView.release.xcconfig */; 462 | buildSettings = { 463 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 464 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 465 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 466 | CURRENT_PROJECT_VERSION = 1; 467 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 468 | DEFINES_MODULE = YES; 469 | DYLIB_COMPATIBILITY_VERSION = 1; 470 | DYLIB_CURRENT_VERSION = 1; 471 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 472 | ENABLE_STRICT_OBJC_MSGSEND = YES; 473 | GCC_NO_COMMON_BLOCKS = YES; 474 | INFOPLIST_FILE = "Target Support Files/Pods-BannerView/Info.plist"; 475 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 476 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 478 | MACH_O_TYPE = staticlib; 479 | MODULEMAP_FILE = "Target Support Files/Pods-BannerView/Pods-BannerView.modulemap"; 480 | MTL_ENABLE_DEBUG_INFO = NO; 481 | OTHER_LDFLAGS = ""; 482 | OTHER_LIBTOOLFLAGS = ""; 483 | PODS_ROOT = "$(SRCROOT)"; 484 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 485 | PRODUCT_NAME = Pods_BannerView; 486 | SDKROOT = iphoneos; 487 | SKIP_INSTALL = YES; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | VERSIONING_SYSTEM = "apple-generic"; 490 | VERSION_INFO_PREFIX = ""; 491 | }; 492 | name = Release; 493 | }; 494 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | ALWAYS_SEARCH_USER_PATHS = NO; 498 | CLANG_ANALYZER_NONNULL = YES; 499 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 500 | CLANG_CXX_LIBRARY = "libc++"; 501 | CLANG_ENABLE_MODULES = YES; 502 | CLANG_ENABLE_OBJC_ARC = YES; 503 | CLANG_WARN_BOOL_CONVERSION = YES; 504 | CLANG_WARN_CONSTANT_CONVERSION = YES; 505 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 506 | CLANG_WARN_EMPTY_BODY = YES; 507 | CLANG_WARN_ENUM_CONVERSION = YES; 508 | CLANG_WARN_INT_CONVERSION = YES; 509 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 510 | CLANG_WARN_UNREACHABLE_CODE = YES; 511 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 512 | CODE_SIGNING_REQUIRED = NO; 513 | COPY_PHASE_STRIP = YES; 514 | ENABLE_NS_ASSERTIONS = NO; 515 | GCC_C_LANGUAGE_STANDARD = gnu99; 516 | GCC_PREPROCESSOR_DEFINITIONS = ( 517 | "POD_CONFIGURATION_RELEASE=1", 518 | "$(inherited)", 519 | ); 520 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 521 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 522 | GCC_WARN_UNDECLARED_SELECTOR = YES; 523 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 524 | GCC_WARN_UNUSED_FUNCTION = YES; 525 | GCC_WARN_UNUSED_VARIABLE = YES; 526 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 527 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 528 | STRIP_INSTALLED_PRODUCT = NO; 529 | SYMROOT = "${SRCROOT}/../build"; 530 | VALIDATE_PRODUCT = YES; 531 | }; 532 | name = Release; 533 | }; 534 | 521B165B0DA4422F1CD4762CF1DC4E84 /* Release */ = { 535 | isa = XCBuildConfiguration; 536 | baseConfigurationReference = 3D439D11E6B3A492AC071280019B0307 /* Pods-BannerViewExample.release.xcconfig */; 537 | buildSettings = { 538 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 539 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 540 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 541 | CURRENT_PROJECT_VERSION = 1; 542 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 543 | DEFINES_MODULE = YES; 544 | DYLIB_COMPATIBILITY_VERSION = 1; 545 | DYLIB_CURRENT_VERSION = 1; 546 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 547 | ENABLE_STRICT_OBJC_MSGSEND = YES; 548 | GCC_NO_COMMON_BLOCKS = YES; 549 | INFOPLIST_FILE = "Target Support Files/Pods-BannerViewExample/Info.plist"; 550 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 551 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 552 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 553 | MACH_O_TYPE = staticlib; 554 | MODULEMAP_FILE = "Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.modulemap"; 555 | MTL_ENABLE_DEBUG_INFO = NO; 556 | OTHER_LDFLAGS = ""; 557 | OTHER_LIBTOOLFLAGS = ""; 558 | PODS_ROOT = "$(SRCROOT)"; 559 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 560 | PRODUCT_NAME = Pods_BannerViewExample; 561 | SDKROOT = iphoneos; 562 | SKIP_INSTALL = YES; 563 | TARGETED_DEVICE_FAMILY = "1,2"; 564 | VERSIONING_SYSTEM = "apple-generic"; 565 | VERSION_INFO_PREFIX = ""; 566 | }; 567 | name = Release; 568 | }; 569 | 5CEBA9D792203C29D71EE929F22DFD26 /* Debug */ = { 570 | isa = XCBuildConfiguration; 571 | baseConfigurationReference = 55EAE9B8D9B1A64252D5612D97B91E5F /* Pods-BannerView.debug.xcconfig */; 572 | buildSettings = { 573 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 574 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 575 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 576 | CURRENT_PROJECT_VERSION = 1; 577 | DEBUG_INFORMATION_FORMAT = dwarf; 578 | DEFINES_MODULE = YES; 579 | DYLIB_COMPATIBILITY_VERSION = 1; 580 | DYLIB_CURRENT_VERSION = 1; 581 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 582 | ENABLE_STRICT_OBJC_MSGSEND = YES; 583 | GCC_NO_COMMON_BLOCKS = YES; 584 | INFOPLIST_FILE = "Target Support Files/Pods-BannerView/Info.plist"; 585 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 586 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 587 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 588 | MACH_O_TYPE = staticlib; 589 | MODULEMAP_FILE = "Target Support Files/Pods-BannerView/Pods-BannerView.modulemap"; 590 | MTL_ENABLE_DEBUG_INFO = YES; 591 | OTHER_LDFLAGS = ""; 592 | OTHER_LIBTOOLFLAGS = ""; 593 | PODS_ROOT = "$(SRCROOT)"; 594 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 595 | PRODUCT_NAME = Pods_BannerView; 596 | SDKROOT = iphoneos; 597 | SKIP_INSTALL = YES; 598 | TARGETED_DEVICE_FAMILY = "1,2"; 599 | VERSIONING_SYSTEM = "apple-generic"; 600 | VERSION_INFO_PREFIX = ""; 601 | }; 602 | name = Debug; 603 | }; 604 | B28BA9096820BF240A9DA89DCB0884A6 /* Release */ = { 605 | isa = XCBuildConfiguration; 606 | baseConfigurationReference = 6F727E3EDD6F0C3FDD3AE75D97B24D6C /* RSReusable.xcconfig */; 607 | buildSettings = { 608 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 609 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 610 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 611 | CURRENT_PROJECT_VERSION = 1; 612 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 613 | DEFINES_MODULE = YES; 614 | DYLIB_COMPATIBILITY_VERSION = 1; 615 | DYLIB_CURRENT_VERSION = 1; 616 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 617 | ENABLE_STRICT_OBJC_MSGSEND = YES; 618 | GCC_NO_COMMON_BLOCKS = YES; 619 | GCC_PREFIX_HEADER = "Target Support Files/RSReusable/RSReusable-prefix.pch"; 620 | INFOPLIST_FILE = "Target Support Files/RSReusable/Info.plist"; 621 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 622 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 623 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 624 | MODULEMAP_FILE = "Target Support Files/RSReusable/RSReusable.modulemap"; 625 | MTL_ENABLE_DEBUG_INFO = NO; 626 | PRODUCT_NAME = Reusable; 627 | SDKROOT = iphoneos; 628 | SKIP_INSTALL = YES; 629 | SWIFT_VERSION = 3.0; 630 | TARGETED_DEVICE_FAMILY = "1,2"; 631 | VERSIONING_SYSTEM = "apple-generic"; 632 | VERSION_INFO_PREFIX = ""; 633 | }; 634 | name = Release; 635 | }; 636 | D85A90E82FEF5BE9751ADE02B35B7B9B /* Debug */ = { 637 | isa = XCBuildConfiguration; 638 | baseConfigurationReference = 6F727E3EDD6F0C3FDD3AE75D97B24D6C /* RSReusable.xcconfig */; 639 | buildSettings = { 640 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 641 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 642 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 643 | CURRENT_PROJECT_VERSION = 1; 644 | DEBUG_INFORMATION_FORMAT = dwarf; 645 | DEFINES_MODULE = YES; 646 | DYLIB_COMPATIBILITY_VERSION = 1; 647 | DYLIB_CURRENT_VERSION = 1; 648 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 649 | ENABLE_STRICT_OBJC_MSGSEND = YES; 650 | GCC_NO_COMMON_BLOCKS = YES; 651 | GCC_PREFIX_HEADER = "Target Support Files/RSReusable/RSReusable-prefix.pch"; 652 | INFOPLIST_FILE = "Target Support Files/RSReusable/Info.plist"; 653 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 654 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 655 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 656 | MODULEMAP_FILE = "Target Support Files/RSReusable/RSReusable.modulemap"; 657 | MTL_ENABLE_DEBUG_INFO = YES; 658 | PRODUCT_NAME = Reusable; 659 | SDKROOT = iphoneos; 660 | SKIP_INSTALL = YES; 661 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 662 | SWIFT_VERSION = 3.0; 663 | TARGETED_DEVICE_FAMILY = "1,2"; 664 | VERSIONING_SYSTEM = "apple-generic"; 665 | VERSION_INFO_PREFIX = ""; 666 | }; 667 | name = Debug; 668 | }; 669 | /* End XCBuildConfiguration section */ 670 | 671 | /* Begin XCConfigurationList section */ 672 | 16347EF965D646BABAA247DC8BA9A45F /* Build configuration list for PBXNativeTarget "Pods-BannerViewExample" */ = { 673 | isa = XCConfigurationList; 674 | buildConfigurations = ( 675 | 10C567086B1A70ADB482269998759AB6 /* Debug */, 676 | 521B165B0DA4422F1CD4762CF1DC4E84 /* Release */, 677 | ); 678 | defaultConfigurationIsVisible = 0; 679 | defaultConfigurationName = Release; 680 | }; 681 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 682 | isa = XCConfigurationList; 683 | buildConfigurations = ( 684 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, 685 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, 686 | ); 687 | defaultConfigurationIsVisible = 0; 688 | defaultConfigurationName = Release; 689 | }; 690 | 581BE854DBB60C3858C849FE58B89634 /* Build configuration list for PBXNativeTarget "Pods-BannerView" */ = { 691 | isa = XCConfigurationList; 692 | buildConfigurations = ( 693 | 5CEBA9D792203C29D71EE929F22DFD26 /* Debug */, 694 | 2D382703B5C01EA8417249BD161F51CC /* Release */, 695 | ); 696 | defaultConfigurationIsVisible = 0; 697 | defaultConfigurationName = Release; 698 | }; 699 | F14651492728129C3732B9CDAC4F700C /* Build configuration list for PBXNativeTarget "RSReusable" */ = { 700 | isa = XCConfigurationList; 701 | buildConfigurations = ( 702 | D85A90E82FEF5BE9751ADE02B35B7B9B /* Debug */, 703 | B28BA9096820BF240A9DA89DCB0884A6 /* Release */, 704 | ); 705 | defaultConfigurationIsVisible = 0; 706 | defaultConfigurationName = Release; 707 | }; 708 | /* End XCConfigurationList section */ 709 | }; 710 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 711 | } 712 | -------------------------------------------------------------------------------- /Pods/RSReusable/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Roman Sorochak 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/RSReusable/README.md: -------------------------------------------------------------------------------- 1 | # Reusable 2 | Easy way to setup custom cells with xib 3 | 4 | ## Contents 5 | - [Requirements](#requirements) 6 | - [Installation](#installation) 7 | - [Usage](#usage) 8 | - [License](#license) 9 | 10 | ## Requirements 11 | 12 | - iOS 9.0+ 13 | - Xcode 8.0+ 14 | - Swift 3.0+ 15 | 16 | ## Installation 17 | 18 | ### CocoaPods 19 | 20 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: 21 | 22 | ```bash 23 | $ gem install cocoapods 24 | ``` 25 | 26 | > CocoaPods 1.1.0+ is required to build Reusable 1.0.0+. 27 | 28 | To integrate Reusable into your Xcode project using CocoaPods, specify it in your `Podfile`: 29 | 30 | ```ruby 31 | source 'https://github.com/CocoaPods/Specs.git' 32 | platform :ios, '9.0' 33 | use_frameworks! 34 | 35 | target '' do 36 | pod 'RSReusable' 37 | end 38 | ``` 39 | 40 | Then, run the following command: 41 | 42 | ```bash 43 | $ pod install 44 | ``` 45 | 46 | ## Usage 47 | 48 | Make sure you name your cell's class and xib with the same names 49 | 50 | - MyCell.swift: 51 | ```swift 52 | class MyCell: UITableViewCell, Reusable { 53 | ``` 54 | 55 | - MyCell.xib 56 | 57 | ### UITableViewCell 58 | #### Custom table cell with xib 59 | 1) Make cell to implement Reusable protocol 60 | ```swift 61 | import Reusable 62 | //... 63 | class MyCell: UITableViewCell, Reusable { 64 | ``` 65 | 2) (optional) Make cusom xib cell and set cell's class to MyCell 66 | 3) Dequeue cell 67 | ```swift 68 | import Reusable 69 | //... 70 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 71 | let cell = tableView.dequeue(forIndexPath: indexPath) as MyCell 72 | 73 | //setup cell ... 74 | 75 | return cell 76 | } 77 | ``` 78 | #### Custom table header (footer) with xib 79 | 1) Make header (footer) to inherit from BaseTableSectionHeaderFooterView class 80 | ```swift 81 | import Reusable 82 | //... 83 | class MySectionHeaderView: BaseTableSectionHeaderFooterView { 84 | ``` 85 | 2) (optional) Make cusom xib view and set file's owner to your class name - MySectionHeaderView 86 | 3) Dequeue header (footer) view 87 | ```swift 88 | import Reusable 89 | //... 90 | func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { 91 | let header = tableView.dequeueHeaderFooterView() as MySectionHeaderView 92 | 93 | //setup header ... 94 | 95 | return header 96 | } 97 | ``` 98 | 99 | ### UICollectionViewCell 100 | #### Custom collection cell with xib 101 | 1) Make cell to implement Reusable protocol 102 | ```swift 103 | import Reusable 104 | //... 105 | class MyCollectionCell: UICollectionViewCell, Reusable { 106 | ``` 107 | 2) (optional) Make cusom xib cell and set cell's class to MyCollectionCell 108 | 3) Dequeue cell 109 | ```swift 110 | import Reusable 111 | //... 112 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 113 | let cell = collectionView.dequeueCell(for: indexPath) as MyCollectionCell 114 | 115 | //setup cell ... 116 | 117 | return cell 118 | } 119 | ``` 120 | #### Custom collection header with xib 121 | 1) Make header (footer) to implement Reusable protocol 122 | ```swift 123 | import Reusable 124 | //... 125 | class CollectionHeaderView: UICollectionReusableView, Reusable { 126 | ``` 127 | 2) (optional) Make cusom xib view (UICollectionReusableView) and set it's class to CollectionHeaderView 128 | 3) Dequeue view 129 | ```swift 130 | import Reusable 131 | //... 132 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 133 | let cell = collectionView.dequeueCell(for: indexPath) as CollectionHeaderView 134 | 135 | //setup header ... 136 | 137 | return header 138 | } 139 | ``` 140 | 141 | ## Author 142 | Roman Sorochak - iOS developer - roman.sorochak@gmail.com 143 | 144 | ## License 145 | 146 | Reusable is released under the MIT license. See [LICENSE](https://github.com/romansorochak/Reusable/blob/master/LICENSE) for details. 147 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/BaseTableHeaderFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseTableHeaderFooterView.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | open class BaseTableSectionHeaderFooterView: UITableViewHeaderFooterView, Reusable, NibLoadableView { 13 | 14 | public var nibView: UIView? 15 | 16 | 17 | open override var contentView: UIView { 18 | //we use loaded view instead of super.contentView 19 | guard let view = self.nibView else { 20 | return super.contentView 21 | } 22 | return view 23 | } 24 | 25 | var nibName: String { 26 | return type(of: self).nibName 27 | } 28 | 29 | override open func awakeFromNib() { 30 | super.awakeFromNib() 31 | 32 | xibSetup() 33 | } 34 | 35 | override public init(reuseIdentifier: String?) { 36 | super.init(reuseIdentifier: reuseIdentifier) 37 | 38 | xibSetup() 39 | } 40 | 41 | required public init?(coder aDecoder: NSCoder) { 42 | super.init(coder: aDecoder) 43 | 44 | xibSetup() 45 | } 46 | 47 | public func viewDidLoad() { } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/NibLoadableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NibLoadableView.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | public protocol NibLoadableView: NibNameProtocol { 13 | 14 | var nibView: UIView? { get set } 15 | 16 | func viewDidLoad() 17 | } 18 | 19 | 20 | extension NibLoadableView where Self: UIView { 21 | 22 | func xibSetup() { 23 | if let view = loadViewFromNib() { 24 | // use bounds not frame or it'll be offset 25 | view.frame = bounds 26 | 27 | // Make the view stretch with containing view 28 | view.autoresizingMask = [ 29 | UIViewAutoresizing.flexibleWidth, 30 | UIViewAutoresizing.flexibleHeight 31 | ] 32 | 33 | addSubview(view) 34 | 35 | self.nibView = view 36 | } 37 | 38 | viewDidLoad() 39 | } 40 | 41 | private func loadViewFromNib() -> UIView? { 42 | let type = type(of: self) 43 | let bundle = Bundle(for: type) 44 | let nib = UINib.loadIfExists(nibName: type.nibName, 45 | bundle: bundle) 46 | 47 | let view = nib?.instantiate(withOwner: self, options: nil)[0] as? UIView 48 | 49 | return view 50 | } 51 | } 52 | 53 | 54 | @IBDesignable 55 | open class BaseNibView: UIView, NibLoadableView { 56 | 57 | public var nibView: UIView? 58 | 59 | open override func awakeFromNib() { 60 | super.awakeFromNib() 61 | 62 | xibSetup() 63 | } 64 | 65 | public override init(frame: CGRect) { 66 | super.init(frame: frame) 67 | 68 | xibSetup() 69 | } 70 | 71 | public required init?(coder aDecoder: NSCoder) { 72 | super.init(coder: aDecoder) 73 | 74 | xibSetup() 75 | } 76 | 77 | 78 | open func viewDidLoad() { } 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/Reusable.h: -------------------------------------------------------------------------------- 1 | // 2 | // Reusable.h 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Reusable. 12 | FOUNDATION_EXPORT double ReusableVersionNumber; 13 | 14 | //! Project version string for Reusable. 15 | FOUNDATION_EXPORT const unsigned char ReusableVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/Reusable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Reusable.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | public protocol ReusableView: class {} 13 | 14 | public extension ReusableView where Self: UIView { 15 | 16 | public static var reuseIdentifier: String { 17 | return String(describing: self) 18 | } 19 | } 20 | 21 | 22 | public protocol NibNameProtocol: class { } 23 | 24 | public extension NibNameProtocol where Self: UIView { 25 | 26 | public static var nibName: String { 27 | return String(describing: self) 28 | } 29 | } 30 | 31 | 32 | public protocol Reusable: ReusableView, NibNameProtocol { } 33 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/UICollectionView+Dequeueable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView+Dequeueable.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | extension UICollectionView { 13 | 14 | //MARK: headers 15 | 16 | func register(_ : T.Type, viewKind: String) where T: Reusable { 17 | if let nib = UINib.loadIfExists(nibName: T.nibName, bundle: Bundle.main) { 18 | register( 19 | nib, 20 | forSupplementaryViewOfKind: viewKind, 21 | withReuseIdentifier: T.reuseIdentifier 22 | ) 23 | } else { 24 | register( 25 | T.self, 26 | forSupplementaryViewOfKind: viewKind, 27 | withReuseIdentifier: T.reuseIdentifier 28 | ) 29 | } 30 | } 31 | 32 | public func dequeueSupplementaryView( 33 | for indexPath: IndexPath, 34 | viewKind: String) -> T where T: Reusable { 35 | 36 | register(T.self, viewKind: viewKind) 37 | 38 | return dequeueReusableSupplementaryView( 39 | ofKind: viewKind, 40 | withReuseIdentifier: T.reuseIdentifier, 41 | for: indexPath) as! T 42 | } 43 | 44 | 45 | //MARK: cells 46 | 47 | func register(_: T.Type) where T: Reusable { 48 | if let nib = UINib.loadIfExists(nibName: T.nibName, bundle: Bundle.main) { 49 | register(nib, forCellWithReuseIdentifier: T.reuseIdentifier) 50 | } else { 51 | register(T.self, forCellWithReuseIdentifier: T.reuseIdentifier) 52 | } 53 | } 54 | 55 | public func dequeueCell(for indexPath: IndexPath) -> T where T: Reusable { 56 | 57 | register(T.self) 58 | 59 | return dequeueReusableCell(withReuseIdentifier: T.reuseIdentifier, for: indexPath) as! T 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/UINib.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UINib.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | extension UINib { 13 | 14 | class func loadIfExists(nibName name: String, bundle: Bundle) -> UINib? { 15 | if bundle.path(forResource: name, ofType: "nib") == nil { 16 | return nil 17 | } else { 18 | return UINib(nibName: name, bundle: bundle) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Pods/RSReusable/Reusable/UITableView+Dequeueable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+Dequeueable.swift 3 | // Reusable 4 | // 5 | // Created by Roman Sorochak on 6/21/17. 6 | // Copyright © 2017 MagicLab. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | public extension UITableView { 13 | 14 | //MARK: headers 15 | 16 | func register(_: T.Type) where T: Reusable { 17 | if let nib = UINib.loadIfExists(nibName: T.nibName, bundle: Bundle.main) { 18 | register(nib, forHeaderFooterViewReuseIdentifier: T.reuseIdentifier) 19 | } else { 20 | register(T.self, forHeaderFooterViewReuseIdentifier: T.reuseIdentifier) 21 | } 22 | register(T.self, forHeaderFooterViewReuseIdentifier: T.reuseIdentifier) 23 | } 24 | 25 | public func dequeueHeaderFooterView() -> T where T: Reusable { 26 | register(T.self) 27 | 28 | return dequeueReusableHeaderFooterView(withIdentifier: T.reuseIdentifier) as! T 29 | } 30 | 31 | //MARK: cells 32 | 33 | func register(_: T.Type) where T: Reusable { 34 | if let nib = UINib.loadIfExists(nibName: T.nibName, bundle: Bundle.main) { 35 | register(nib, forCellReuseIdentifier: T.reuseIdentifier) 36 | } else { 37 | register(T.self, forCellReuseIdentifier: T.reuseIdentifier) 38 | } 39 | } 40 | 41 | public func dequeue(forIndexPath indexPath: IndexPath) -> T where T: Reusable { 42 | register(T.self) 43 | 44 | return dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T 45 | } 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BannerView : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BannerView 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_BannerViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_BannerViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BannerView { 2 | umbrella header "Pods-BannerView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerView/Pods-BannerView.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' 3 | PODS_BUILD_DIR = $BUILD_DIR 4 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## RSReusable 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Roman Sorochak 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2017 Roman Sorochak <roman.sorochak@gmail.com> 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | RSReusable 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BannerViewExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BannerViewExample 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/RSReusable/Reusable.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/RSReusable/Reusable.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_BannerViewExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_BannerViewExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RSReusable" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RSReusable/Reusable.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Reusable" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BannerViewExample { 2 | umbrella header "Pods-BannerViewExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BannerViewExample/Pods-BannerViewExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RSReusable" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/RSReusable/Reusable.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Reusable" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.11 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/RSReusable-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_RSReusable : NSObject 3 | @end 4 | @implementation PodsDummy_RSReusable 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/RSReusable-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/RSReusable-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "Reusable.h" 14 | 15 | FOUNDATION_EXPORT double ReusableVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char ReusableVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/RSReusable.modulemap: -------------------------------------------------------------------------------- 1 | framework module Reusable { 2 | umbrella header "RSReusable-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/RSReusable/RSReusable.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RSReusable 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RSReusable 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BannerView 2 | Simple Banner View that automatically scrolls. 3 | 4 | | English localization | Arabic localization | 5 | |--------------------------------------|--------------------------------------| 6 | |![Demo](https://github.com/MagicLab-team/BannerView/blob/master/BannerViewExample/Demo_en.gif)|![Demo](https://github.com/MagicLab-team/BannerView/blob/master/BannerViewExample/Demo_ar.gif)| 7 | 8 | ## Contents 9 | - [Requirements](#requirements) 10 | - [Installation](#installation) 11 | - [Usage](#usage) 12 | - [License](#license) 13 | 14 | ## Requirements 15 | 16 | - iOS 8.0+ 17 | - Xcode 8.0+ 18 | - Swift 3.0+ 19 | 20 | ## Installation 21 | 22 | ### CocoaPods 23 | 24 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: 25 | 26 | ```bash 27 | $ gem install cocoapods 28 | ``` 29 | 30 | > CocoaPods 1.1.0+ is required to build Reusable 1.0.0+. 31 | 32 | To integrate BannerView into your Xcode project using CocoaPods, specify it in your `Podfile`: 33 | 34 | ```ruby 35 | source 'https://github.com/CocoaPods/Specs.git' 36 | platform :ios, '8.0' 37 | use_frameworks! 38 | 39 | target '' do 40 | pod 'MLBannerView' 41 | end 42 | ``` 43 | 44 | Then, run the following command: 45 | 46 | ```bash 47 | $ pod install 48 | ``` 49 | 50 | # Usage 51 | 52 | To add BannerView you may set class to view as BannerView in storyboard or create it manually from code. 53 | 54 | ## Setup banner view: 55 | 56 | ```swift 57 | bannerView.setup( 58 | type: BannerViewScrollType.fromStart, 59 | timeForOneItem: 1, 60 | bannerItems: [ 61 | BannerItem(image: UIImage(named: "banner_1")), 62 | BannerItem(image: UIImage(named: "banner_2")), 63 | BannerItem(image: UIImage(named: "banner_3")) 64 | ], 65 | delegate: self 66 | ) 67 | ``` 68 | 69 | ## BannerViewDelegate 70 | 71 | BannerViewDelegate allows you to be notifed when banner scrolls to next item or when user clicks on item. 72 | ```swift 73 | /** 74 | BannerViewDelegate. 75 | */ 76 | @objc public protocol BannerViewDelegate { 77 | /** 78 | Notifies when banner view scrolls to the next item. 79 | */ 80 | @objc optional func bannerView(bannerView: BannerView, didScrollTo: BannerItem, with index: Int) 81 | 82 | /** 83 | Notifies when user selects item. 84 | */ 85 | @objc optional func bannerView(bannerView: BannerView, didSelectItem: BannerItem, with index: Int) 86 | 87 | /** 88 | Allows to use custom cell. 89 | */ 90 | @objc optional func bannerView(bannerView: BannerView, 91 | collectionView: UICollectionView, 92 | cellForItemAt indexPath: IndexPath) -> UICollectionViewCell? 93 | } 94 | ``` 95 | 96 | ## There are three possible scroll types 97 | 98 | ```swift 99 | /** 100 | BannerViewScrollType contains different scroll types. 101 | */ 102 | public enum BannerViewScrollType { 103 | /** 104 | BannerView scrolls to the start after the last item. 105 | */ 106 | case fromStart 107 | /** 108 | BannerView scrolls to the end item and then to the first item through all items. 109 | */ 110 | case reverse 111 | /** 112 | BannerView always scrolls forward. 113 | */ 114 | case alwaysForward 115 | } 116 | ``` 117 | 118 | | .fromStart | .reverse | .alwaysForward | 119 | |---------------------------------|-------------------------------------------|-------------------------------------------| 120 | |![Demo](https://github.com/MagicLab-team/BannerView/blob/master/BannerViewExample/Demo_fromStart.gif)|![Demo](https://github.com/MagicLab-team/BannerView/blob/master/BannerViewExample/Demo_reverse.gif)|![Demo](https://github.com/MagicLab-team/BannerView/blob/master/BannerViewExample/Demo_alwaysForward.gif)| 121 | 122 | ## BannerPageControl 123 | 124 | You may access bannerPageControl through public property 125 | 126 | ```swift 127 | bannerView.pageControl.color = UIColor.black 128 | bannerView.pageControl.currentPageColor = UIColor.green 129 | ``` 130 | 131 | ## See more about localization 132 | [Localizable](https://github.com/romansorochak/Localizable) 133 | 134 | ## License 135 | 136 | BannerView is released under the MIT license. See [LICENSE](https://github.com/MagicLab-team/BannerView/blob/master/LICENSE) for details. 137 | --------------------------------------------------------------------------------