├── DMPagerViewController.podspec ├── Example ├── DMPagerViewController.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── DMPagerViewController-Example.xcscheme │ └── xcuserdata │ │ └── daniele.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── DMPagerViewController.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── daniele.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── DMPagerViewController │ ├── DMAppDelegate.h │ ├── DMAppDelegate.m │ ├── DMPagerViewController-Info.plist │ ├── DMPagerViewController-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── LaunchImage-2.launchimage │ │ │ └── Contents.json │ │ ├── chat_full.imageset │ │ │ ├── Contents.json │ │ │ ├── chat_full.png │ │ │ └── chat_full@2x.png │ │ ├── gear.imageset │ │ │ ├── Contents.json │ │ │ ├── gear.png │ │ │ └── gear@2x.png │ │ └── rchat.imageset │ │ │ ├── Contents.json │ │ │ ├── rchat.png │ │ │ └── rchat@2x.png │ ├── LaunchScreen.xib │ ├── TestViewController.h │ ├── TestViewController.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Demo.gif ├── Podfile ├── Podfile.lock ├── Pods │ ├── Headers │ │ ├── Private │ │ │ └── DMPagerViewController │ │ │ │ ├── DMPagerNavigationBar.h │ │ │ │ └── DMPagerViewController.h │ │ └── Public │ │ │ └── DMPagerViewController │ │ │ ├── DMPagerNavigationBar.h │ │ │ └── DMPagerViewController.h │ ├── Local Podspecs │ │ └── DMPagerViewController.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ │ └── daniele.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController.xcscheme │ │ │ ├── Pods-DMPagerViewController-DMPagerViewController.xcscheme │ │ │ ├── Pods-DMPagerViewController.xcscheme │ │ │ └── xcschememanagement.plist │ └── Target Support Files │ │ ├── Pods-DMPagerViewController-DMPagerViewController │ │ ├── Pods-DMPagerViewController-DMPagerViewController-Private.xcconfig │ │ ├── Pods-DMPagerViewController-DMPagerViewController-dummy.m │ │ ├── Pods-DMPagerViewController-DMPagerViewController-prefix.pch │ │ └── Pods-DMPagerViewController-DMPagerViewController.xcconfig │ │ └── Pods-DMPagerViewController │ │ ├── Pods-DMPagerViewController-acknowledgements.markdown │ │ ├── Pods-DMPagerViewController-acknowledgements.plist │ │ ├── Pods-DMPagerViewController-dummy.m │ │ ├── Pods-DMPagerViewController-environment.h │ │ ├── Pods-DMPagerViewController-resources.sh │ │ ├── Pods-DMPagerViewController.debug.xcconfig │ │ └── Pods-DMPagerViewController.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── DMPagerNavigationBar.h │ ├── DMPagerNavigationBar.m │ ├── DMPagerViewController.h │ └── DMPagerViewController.m └── README.md /DMPagerViewController.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint DMPagerViewController.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "DMPagerViewController" 12 | s.version = "0.1.0" 13 | s.summary = "DMPagerViewController is page navigation controller like the one used in Twitter or Tinder" 14 | s.description = <<-DESC 15 | DMPagerViewController page navigation controller which aims to mimics the one used in Twitter or Tinder with navigation bar on top and a parallax effect on scrolling. 16 | DESC 17 | s.homepage = "https://github.com/malcommac/DMPagerViewController" 18 | s.license = 'MIT' 19 | s.author = { "Daniele Margutti" => "me@danielemargutti.com" } 20 | s.source = { :git => "https://github.com/malcommac/DMPagerViewController.git", :tag => s.version.to_s } 21 | s.social_media_url = 'https://twitter.com/danielemargutti' 22 | 23 | s.platform = :ios, '7.0' 24 | s.requires_arc = true 25 | 26 | s.source_files = 'Pod/Classes' 27 | s.resource_bundles = { 28 | 'DMPagerViewController' => ['Pod/Assets/*.png'] 29 | } 30 | 31 | s.frameworks = 'UIKit' 32 | end 33 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2675231029812204E3B65BFE /* libPods-DMPagerViewController.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 85CDD76C018994465A924D73 /* libPods-DMPagerViewController.a */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* DMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* DMAppDelegate.m */; }; 17 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 18 | 64F016931A63D4AF00AAE66A /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 64F016921A63D4AF00AAE66A /* TestViewController.m */; }; 19 | 64F016951A63D6F800AAE66A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 64F016941A63D6F800AAE66A /* LaunchScreen.xib */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 00E016861892C6D2153E76BE /* Pods-DMPagerViewController.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DMPagerViewController.release.xcconfig"; path = "Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController.release.xcconfig"; sourceTree = ""; }; 24 | 0E0C33ABD6B86EFBF5B68750 /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = ""; }; 25 | 22FA8B47137AEE1BDF8D3FF4 /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = ""; }; 26 | 45F6157AB51EF3C2D6D45510 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 6003F58A195388D20070C39A /* DMPagerViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DMPagerViewController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 31 | 6003F595195388D20070C39A /* DMPagerViewController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DMPagerViewController-Info.plist"; sourceTree = ""; }; 32 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 6003F59B195388D20070C39A /* DMPagerViewController-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DMPagerViewController-Prefix.pch"; sourceTree = ""; }; 35 | 6003F59C195388D20070C39A /* DMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DMAppDelegate.h; sourceTree = ""; }; 36 | 6003F59D195388D20070C39A /* DMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DMAppDelegate.m; sourceTree = ""; }; 37 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 38 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 39 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 40 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 41 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 42 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 43 | 64F016911A63D4AF00AAE66A /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = ""; }; 44 | 64F016921A63D4AF00AAE66A /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = ""; }; 45 | 64F016941A63D6F800AAE66A /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; 46 | 6C46CE1331FF19AE4BE04132 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 47 | 7680A0A05838EE6D166C214C /* DMPagerViewController.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = DMPagerViewController.podspec; path = ../DMPagerViewController.podspec; sourceTree = ""; }; 48 | 85CDD76C018994465A924D73 /* libPods-DMPagerViewController.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DMPagerViewController.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | ECEE5CBBF1CEB00E0FA6A80F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 50 | F1EDC1070535734F9A93A865 /* Pods-DMPagerViewController.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DMPagerViewController.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController.debug.xcconfig"; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 6003F587195388D20070C39A /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 59 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 60 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 61 | 2675231029812204E3B65BFE /* libPods-DMPagerViewController.a in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 6003F581195388D10070C39A = { 69 | isa = PBXGroup; 70 | children = ( 71 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 72 | 6003F593195388D20070C39A /* DMPagerViewController */, 73 | 6003F5B5195388D20070C39A /* Tests */, 74 | 6003F58C195388D20070C39A /* Frameworks */, 75 | 6003F58B195388D20070C39A /* Products */, 76 | 73FD7CAEDA4058BDE1391D9B /* Pods */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 6003F58B195388D20070C39A /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 6003F58A195388D20070C39A /* DMPagerViewController.app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 6003F58C195388D20070C39A /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 6003F58D195388D20070C39A /* Foundation.framework */, 92 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 93 | 6003F591195388D20070C39A /* UIKit.framework */, 94 | 6003F5AF195388D20070C39A /* XCTest.framework */, 95 | 85CDD76C018994465A924D73 /* libPods-DMPagerViewController.a */, 96 | 45F6157AB51EF3C2D6D45510 /* libPods-Tests.a */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | 6003F593195388D20070C39A /* DMPagerViewController */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 6003F59C195388D20070C39A /* DMAppDelegate.h */, 105 | 6003F59D195388D20070C39A /* DMAppDelegate.m */, 106 | 64F016911A63D4AF00AAE66A /* TestViewController.h */, 107 | 64F016921A63D4AF00AAE66A /* TestViewController.m */, 108 | 64F016941A63D6F800AAE66A /* LaunchScreen.xib */, 109 | 6003F5A8195388D20070C39A /* Images.xcassets */, 110 | 6003F594195388D20070C39A /* Supporting Files */, 111 | ); 112 | path = DMPagerViewController; 113 | sourceTree = ""; 114 | }; 115 | 6003F594195388D20070C39A /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 6003F595195388D20070C39A /* DMPagerViewController-Info.plist */, 119 | 6003F596195388D20070C39A /* InfoPlist.strings */, 120 | 6003F599195388D20070C39A /* main.m */, 121 | 6003F59B195388D20070C39A /* DMPagerViewController-Prefix.pch */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | 6003F5B5195388D20070C39A /* Tests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 6003F5BB195388D20070C39A /* Tests.m */, 130 | 6003F5B6195388D20070C39A /* Supporting Files */, 131 | ); 132 | path = Tests; 133 | sourceTree = ""; 134 | }; 135 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 139 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 140 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 141 | ); 142 | name = "Supporting Files"; 143 | sourceTree = ""; 144 | }; 145 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 7680A0A05838EE6D166C214C /* DMPagerViewController.podspec */, 149 | 6C46CE1331FF19AE4BE04132 /* README.md */, 150 | ECEE5CBBF1CEB00E0FA6A80F /* LICENSE */, 151 | ); 152 | name = "Podspec Metadata"; 153 | sourceTree = ""; 154 | }; 155 | 73FD7CAEDA4058BDE1391D9B /* Pods */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | F1EDC1070535734F9A93A865 /* Pods-DMPagerViewController.debug.xcconfig */, 159 | 00E016861892C6D2153E76BE /* Pods-DMPagerViewController.release.xcconfig */, 160 | 22FA8B47137AEE1BDF8D3FF4 /* Pods-Tests.debug.xcconfig */, 161 | 0E0C33ABD6B86EFBF5B68750 /* Pods-Tests.release.xcconfig */, 162 | ); 163 | name = Pods; 164 | sourceTree = ""; 165 | }; 166 | /* End PBXGroup section */ 167 | 168 | /* Begin PBXNativeTarget section */ 169 | 6003F589195388D20070C39A /* DMPagerViewController */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "DMPagerViewController" */; 172 | buildPhases = ( 173 | 1466E47F4BA982CEC5E2D034 /* Check Pods Manifest.lock */, 174 | 6003F586195388D20070C39A /* Sources */, 175 | 6003F587195388D20070C39A /* Frameworks */, 176 | 6003F588195388D20070C39A /* Resources */, 177 | 15B04C66F82A06211278A6F5 /* Copy Pods Resources */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | ); 183 | name = DMPagerViewController; 184 | productName = DMPagerViewController; 185 | productReference = 6003F58A195388D20070C39A /* DMPagerViewController.app */; 186 | productType = "com.apple.product-type.application"; 187 | }; 188 | /* End PBXNativeTarget section */ 189 | 190 | /* Begin PBXProject section */ 191 | 6003F582195388D10070C39A /* Project object */ = { 192 | isa = PBXProject; 193 | attributes = { 194 | CLASSPREFIX = DM; 195 | LastUpgradeCheck = 0510; 196 | ORGANIZATIONNAME = "Daniele Margutti"; 197 | }; 198 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "DMPagerViewController" */; 199 | compatibilityVersion = "Xcode 3.2"; 200 | developmentRegion = English; 201 | hasScannedForEncodings = 0; 202 | knownRegions = ( 203 | en, 204 | Base, 205 | ); 206 | mainGroup = 6003F581195388D10070C39A; 207 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 208 | projectDirPath = ""; 209 | projectRoot = ""; 210 | targets = ( 211 | 6003F589195388D20070C39A /* DMPagerViewController */, 212 | ); 213 | }; 214 | /* End PBXProject section */ 215 | 216 | /* Begin PBXResourcesBuildPhase section */ 217 | 6003F588195388D20070C39A /* Resources */ = { 218 | isa = PBXResourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 222 | 64F016951A63D6F800AAE66A /* LaunchScreen.xib in Resources */, 223 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXShellScriptBuildPhase section */ 230 | 1466E47F4BA982CEC5E2D034 /* Check Pods Manifest.lock */ = { 231 | isa = PBXShellScriptBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | inputPaths = ( 236 | ); 237 | name = "Check Pods Manifest.lock"; 238 | outputPaths = ( 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | shellPath = /bin/sh; 242 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 243 | showEnvVarsInLog = 0; 244 | }; 245 | 15B04C66F82A06211278A6F5 /* Copy Pods Resources */ = { 246 | isa = PBXShellScriptBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | ); 250 | inputPaths = ( 251 | ); 252 | name = "Copy Pods Resources"; 253 | outputPaths = ( 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | shellPath = /bin/sh; 257 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-resources.sh\"\n"; 258 | showEnvVarsInLog = 0; 259 | }; 260 | /* End PBXShellScriptBuildPhase section */ 261 | 262 | /* Begin PBXSourcesBuildPhase section */ 263 | 6003F586195388D20070C39A /* Sources */ = { 264 | isa = PBXSourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 64F016931A63D4AF00AAE66A /* TestViewController.m in Sources */, 268 | 6003F59E195388D20070C39A /* DMAppDelegate.m in Sources */, 269 | 6003F59A195388D20070C39A /* main.m in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXSourcesBuildPhase section */ 274 | 275 | /* Begin PBXVariantGroup section */ 276 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 277 | isa = PBXVariantGroup; 278 | children = ( 279 | 6003F597195388D20070C39A /* en */, 280 | ); 281 | name = InfoPlist.strings; 282 | sourceTree = ""; 283 | }; 284 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 285 | isa = PBXVariantGroup; 286 | children = ( 287 | 6003F5B9195388D20070C39A /* en */, 288 | ); 289 | name = InfoPlist.strings; 290 | sourceTree = ""; 291 | }; 292 | /* End PBXVariantGroup section */ 293 | 294 | /* Begin XCBuildConfiguration section */ 295 | 6003F5BD195388D20070C39A /* Debug */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ALWAYS_SEARCH_USER_PATHS = NO; 299 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 300 | CLANG_CXX_LIBRARY = "libc++"; 301 | CLANG_ENABLE_MODULES = YES; 302 | CLANG_ENABLE_OBJC_ARC = YES; 303 | CLANG_WARN_BOOL_CONVERSION = YES; 304 | CLANG_WARN_CONSTANT_CONVERSION = YES; 305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 306 | CLANG_WARN_EMPTY_BODY = YES; 307 | CLANG_WARN_ENUM_CONVERSION = YES; 308 | CLANG_WARN_INT_CONVERSION = YES; 309 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 310 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 311 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 312 | COPY_PHASE_STRIP = NO; 313 | GCC_C_LANGUAGE_STANDARD = gnu99; 314 | GCC_DYNAMIC_NO_PIC = NO; 315 | GCC_OPTIMIZATION_LEVEL = 0; 316 | GCC_PREPROCESSOR_DEFINITIONS = ( 317 | "DEBUG=1", 318 | "$(inherited)", 319 | ); 320 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 323 | GCC_WARN_UNDECLARED_SELECTOR = YES; 324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 325 | GCC_WARN_UNUSED_FUNCTION = YES; 326 | GCC_WARN_UNUSED_VARIABLE = YES; 327 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 328 | ONLY_ACTIVE_ARCH = YES; 329 | SDKROOT = iphoneos; 330 | TARGETED_DEVICE_FAMILY = "1,2"; 331 | }; 332 | name = Debug; 333 | }; 334 | 6003F5BE195388D20070C39A /* Release */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_EMPTY_BODY = YES; 346 | CLANG_WARN_ENUM_CONVERSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 350 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 351 | COPY_PHASE_STRIP = YES; 352 | ENABLE_NS_ASSERTIONS = NO; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 361 | SDKROOT = iphoneos; 362 | TARGETED_DEVICE_FAMILY = "1,2"; 363 | VALIDATE_PRODUCT = YES; 364 | }; 365 | name = Release; 366 | }; 367 | 6003F5C0195388D20070C39A /* Debug */ = { 368 | isa = XCBuildConfiguration; 369 | baseConfigurationReference = F1EDC1070535734F9A93A865 /* Pods-DMPagerViewController.debug.xcconfig */; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 373 | GCC_PREFIX_HEADER = "DMPagerViewController/DMPagerViewController-Prefix.pch"; 374 | INFOPLIST_FILE = "DMPagerViewController/DMPagerViewController-Info.plist"; 375 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 376 | PRODUCT_NAME = "$(TARGET_NAME)"; 377 | TARGETED_DEVICE_FAMILY = 1; 378 | WRAPPER_EXTENSION = app; 379 | }; 380 | name = Debug; 381 | }; 382 | 6003F5C1195388D20070C39A /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | baseConfigurationReference = 00E016861892C6D2153E76BE /* Pods-DMPagerViewController.release.xcconfig */; 385 | buildSettings = { 386 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 387 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 388 | GCC_PREFIX_HEADER = "DMPagerViewController/DMPagerViewController-Prefix.pch"; 389 | INFOPLIST_FILE = "DMPagerViewController/DMPagerViewController-Info.plist"; 390 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 391 | PRODUCT_NAME = "$(TARGET_NAME)"; 392 | TARGETED_DEVICE_FAMILY = 1; 393 | WRAPPER_EXTENSION = app; 394 | }; 395 | name = Release; 396 | }; 397 | /* End XCBuildConfiguration section */ 398 | 399 | /* Begin XCConfigurationList section */ 400 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "DMPagerViewController" */ = { 401 | isa = XCConfigurationList; 402 | buildConfigurations = ( 403 | 6003F5BD195388D20070C39A /* Debug */, 404 | 6003F5BE195388D20070C39A /* Release */, 405 | ); 406 | defaultConfigurationIsVisible = 0; 407 | defaultConfigurationName = Release; 408 | }; 409 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "DMPagerViewController" */ = { 410 | isa = XCConfigurationList; 411 | buildConfigurations = ( 412 | 6003F5C0195388D20070C39A /* Debug */, 413 | 6003F5C1195388D20070C39A /* Release */, 414 | ); 415 | defaultConfigurationIsVisible = 0; 416 | defaultConfigurationName = Release; 417 | }; 418 | /* End XCConfigurationList section */ 419 | }; 420 | rootObject = 6003F582195388D10070C39A /* Project object */; 421 | } 422 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcodeproj/xcshareddata/xcschemes/DMPagerViewController-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcodeproj/xcuserdata/daniele.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SuppressBuildableAutocreation 6 | 7 | 6003F589195388D20070C39A 8 | 9 | primary 10 | 11 | 12 | 6003F5AD195388D20070C39A 13 | 14 | primary 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/DMPagerViewController.xcworkspace/xcuserdata/daniele.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController.xcworkspace/xcuserdata/daniele.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/DMPagerViewController/DMAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DMAppDelegate.h 3 | // DMPagerViewController 4 | // 5 | // Created by CocoaPods on 01/12/2015. 6 | // Copyright (c) 2014 Daniele Margutti. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import "TestViewController.h" 13 | 14 | @interface DMAppDelegate : UIResponder 15 | 16 | @property (strong, nonatomic) UIWindow *window; 17 | @property (strong, nonatomic) DMPagerViewController *pagerController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/DMAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // DMAppDelegate.m 3 | // DMPagerViewController 4 | // 5 | // Created by CocoaPods on 01/12/2015. 6 | // Copyright (c) 2014 Daniele Margutti. All rights reserved. 7 | // 8 | 9 | #import "DMAppDelegate.h" 10 | 11 | @implementation DMAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | 17 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 18 | 19 | NSDictionary *textAttributes = @{ NSFontAttributeName : [UIFont systemFontOfSize:12.0f], 20 | NSForegroundColorAttributeName : [UIColor blackColor]}; 21 | 22 | UIColor *bkVC1 = [UIColor colorWithRed:0.000 green:0.475 blue:0.647 alpha:1.000]; 23 | UIColor *bkVC2 = [UIColor colorWithRed:0.000 green:0.729 blue:0.984 alpha:1.000]; 24 | UIColor *bkVC3 = [UIColor colorWithRed:0.753 green:0.929 blue:0.996 alpha:1.000]; 25 | 26 | TestViewController *vc1 = [[TestViewController alloc] initWithText:@"Page #1" backgroundColor:bkVC1]; 27 | vc1.pagerObj = [DMPagerNavigationBarItem newItemWithText: [[NSAttributedString alloc] initWithString:@"HOME" attributes:textAttributes] 28 | andIcon: [UIImage imageNamed:@"rchat"]]; 29 | vc1.pagerObj.renderingMode = DMPagerNavigationBarItemModeTextAndImage; 30 | 31 | 32 | TestViewController *vc2 = [[TestViewController alloc] initWithText:@"Page #2" backgroundColor:bkVC2]; 33 | vc2.pagerObj = [DMPagerNavigationBarItem newItemWithText: [[NSAttributedString alloc] initWithString:@"DISCOVER" attributes:textAttributes] 34 | andIcon: [UIImage imageNamed:@"gear"]]; 35 | vc2.pagerItem.renderingMode = DMPagerNavigationBarItemModeOnlyImage; 36 | 37 | TestViewController *vc3 = [[TestViewController alloc] initWithText:@"Page #3" backgroundColor:bkVC3]; 38 | vc3.pagerObj = [DMPagerNavigationBarItem newItemWithText: [[NSAttributedString alloc] initWithString:@"CHAT" attributes:textAttributes] 39 | andIcon: [UIImage imageNamed:@"chat_full"]]; 40 | vc3.pagerObj.renderingMode = DMPagerNavigationBarItemModeOnlyText; 41 | 42 | // Create pager with items 43 | self.pagerController = [[DMPagerViewController alloc] initWithViewControllers: @[vc1,vc2,vc3]]; 44 | //self.pagerController.useNavigationBar = NO; 45 | 46 | // Setup pager's navigation bar colors 47 | UIColor *activeColor = [UIColor colorWithRed:0.000 green:0.235 blue:0.322 alpha:1.000]; 48 | UIColor *inactiveColor = [UIColor colorWithRed:.84 green:.84 blue:.84 alpha:1.0]; 49 | self.pagerController.navigationBar.inactiveItemColor = inactiveColor; 50 | self.pagerController.navigationBar.activeItemColor = activeColor; 51 | 52 | self.window.rootViewController = self.pagerController; 53 | [self.window makeKeyAndVisible]; 54 | 55 | return YES; 56 | } 57 | 58 | - (void)applicationWillResignActive:(UIApplication *)application 59 | { 60 | // 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. 61 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 62 | } 63 | 64 | - (void)applicationDidEnterBackground:(UIApplication *)application 65 | { 66 | // 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. 67 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 68 | } 69 | 70 | - (void)applicationWillEnterForeground:(UIApplication *)application 71 | { 72 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 73 | } 74 | 75 | - (void)applicationDidBecomeActive:(UIApplication *)application 76 | { 77 | // 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. 78 | } 79 | 80 | - (void)applicationWillTerminate:(UIApplication *)application 81 | { 82 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/DMPagerViewController-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/DMPagerViewController-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "29x29", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "40x40", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "76x76", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/LaunchImage-2.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/chat_full.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "chat_full.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "chat_full@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/chat_full.imageset/chat_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/chat_full.imageset/chat_full.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/chat_full.imageset/chat_full@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/chat_full.imageset/chat_full@2x.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/gear.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "gear.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "gear@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/gear.imageset/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/gear.imageset/gear.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/gear.imageset/gear@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/gear.imageset/gear@2x.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/rchat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "rchat.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "rchat@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/rchat.imageset/rchat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/rchat.imageset/rchat.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/Images.xcassets/rchat.imageset/rchat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/DMPagerViewController/Images.xcassets/rchat.imageset/rchat@2x.png -------------------------------------------------------------------------------- /Example/DMPagerViewController/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/TestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestViewController.h 3 | // Example 4 | // 5 | // Created by daniele on 11/01/15. 6 | // Copyright (c) 2015 danielemargutti. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DMPagerViewController.h" 12 | 13 | @class DMPagerNavigationBarItem; 14 | 15 | @interface TestViewController : UIViewController 16 | 17 | @property (nonatomic,strong) DMPagerNavigationBarItem *pagerObj; 18 | 19 | - (instancetype)initWithText:(NSString *) aText backgroundColor:(UIColor *) aBkgColor; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/TestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestViewController.m 3 | // Example 4 | // 5 | // Created by daniele on 11/01/15. 6 | // Copyright (c) 2015 danielemargutti. All rights reserved. 7 | // 8 | 9 | #import "TestViewController.h" 10 | 11 | @interface TestViewController () 12 | 13 | @end 14 | 15 | @implementation TestViewController 16 | 17 | - (instancetype)initWithText:(NSString *) aText backgroundColor:(UIColor *) aBkgColor { 18 | self = [super init]; 19 | if (self) { 20 | self.view = [[UIView alloc] initWithFrame:CGRectZero]; 21 | self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 22 | self.view.backgroundColor = aBkgColor; 23 | 24 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; 25 | label.text = aText; 26 | label.font = [UIFont boldSystemFontOfSize:40]; 27 | label.numberOfLines = 1; 28 | label.textAlignment = NSTextAlignmentCenter; 29 | label.backgroundColor = [UIColor clearColor]; 30 | label.textColor = [UIColor whiteColor]; 31 | label.autoresizingMask = (UIViewAutoresizingFlexibleWidth | 32 | UIViewAutoresizingFlexibleTopMargin | 33 | UIViewAutoresizingFlexibleBottomMargin); 34 | [self.view addSubview:label]; 35 | 36 | CGSize bestSize = [label.attributedText boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) 37 | options:NSStringDrawingTruncatesLastVisibleLine 38 | context:NULL].size; 39 | label.frame = CGRectMake(0, 40 | ((CGRectGetHeight(self.view.frame)-bestSize.height)/2.0f), 41 | CGRectGetWidth(self.view.frame), 42 | bestSize.height); 43 | 44 | } 45 | return self; 46 | } 47 | 48 | - (DMPagerNavigationBarItem *)pagerItem { 49 | return self.pagerObj; 50 | } 51 | 52 | - (void)viewDidLoad { 53 | [super viewDidLoad]; 54 | // Do any additional setup after loading the view. 55 | } 56 | 57 | - (void)didReceiveMemoryWarning { 58 | [super didReceiveMemoryWarning]; 59 | // Dispose of any resources that can be recreated. 60 | } 61 | 62 | /* 63 | #pragma mark - Navigation 64 | 65 | // In a storyboard-based application, you will often want to do a little preparation before navigation 66 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 67 | // Get the new view controller using [segue destinationViewController]. 68 | // Pass the selected object to the new view controller. 69 | } 70 | */ 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/DMPagerViewController/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DMPagerViewController 4 | // 5 | // Created by Daniele Margutti on 01/12/2015. 6 | // Copyright (c) 2014 Daniele Margutti. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DMAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([DMAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/Demo.gif -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | target 'DMPagerViewController', :exclusive => true do 4 | pod "DMPagerViewController", :path => "../" 5 | end -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DMPagerViewController (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - DMPagerViewController (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | DMPagerViewController: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | DMPagerViewController: de3021719d85c86d45ede8da154cd958f2ff49ad 13 | 14 | COCOAPODS: 0.36.0.beta.1 15 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/DMPagerViewController/DMPagerNavigationBar.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/DMPagerNavigationBar.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/DMPagerViewController/DMPagerViewController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/DMPagerViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/DMPagerViewController/DMPagerNavigationBar.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/DMPagerNavigationBar.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/DMPagerViewController/DMPagerViewController.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/DMPagerViewController.h -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/DMPagerViewController.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DMPagerViewController", 3 | "version": "0.1.0", 4 | "summary": "A short description of DMPagerViewController.", 5 | "description": " An optional longer description of DMPagerViewController\n\n * Markdown format.\n * Don't worry about the indent, we strip it!\n", 6 | "homepage": "https://github.com//DMPagerViewController", 7 | "license": "MIT", 8 | "authors": { 9 | "Daniele Margutti": "me@danielemargutti.com" 10 | }, 11 | "source": { 12 | "git": "https://github.com//DMPagerViewController.git", 13 | "tag": "0.1.0" 14 | }, 15 | "platforms": { 16 | "ios": "7.0" 17 | }, 18 | "requires_arc": true, 19 | "source_files": "Pod/Classes", 20 | "resource_bundles": { 21 | "DMPagerViewController": [ 22 | "Pod/Assets/*.png" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - DMPagerViewController (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - DMPagerViewController (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | DMPagerViewController: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | DMPagerViewController: de3021719d85c86d45ede8da154cd958f2ff49ad 13 | 14 | COCOAPODS: 0.36.0.beta.1 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 079B5B0F1F30A562AC7FC34C 14 | 15 | isa 16 | PBXFileReference 17 | lastKnownFileType 18 | wrapper.framework 19 | name 20 | Foundation.framework 21 | path 22 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework 23 | sourceTree 24 | DEVELOPER_DIR 25 | 26 | 07F53B041DC6DBCA9D6537FC 27 | 28 | includeInIndex 29 | 1 30 | isa 31 | PBXFileReference 32 | lastKnownFileType 33 | text 34 | name 35 | Podfile 36 | path 37 | ../Podfile 38 | sourceTree 39 | SOURCE_ROOT 40 | xcLanguageSpecificationIdentifier 41 | xcode.lang.ruby 42 | 43 | 07FE115CC04C8D446C77DA62 44 | 45 | includeInIndex 46 | 1 47 | isa 48 | PBXFileReference 49 | lastKnownFileType 50 | sourcecode.c.h 51 | path 52 | DMPagerViewController.h 53 | sourceTree 54 | <group> 55 | 56 | 0865C082A57AE603E8A88BB0 57 | 58 | buildActionMask 59 | 2147483647 60 | files 61 | 62 | isa 63 | PBXFrameworksBuildPhase 64 | runOnlyForDeploymentPostprocessing 65 | 0 66 | 67 | 08A52BB56E7E9A5F30191A09 68 | 69 | buildActionMask 70 | 2147483647 71 | files 72 | 73 | isa 74 | PBXSourcesBuildPhase 75 | runOnlyForDeploymentPostprocessing 76 | 0 77 | 78 | 09C38CE2277D32B00D8FB580 79 | 80 | children 81 | 82 | 86F5FEF8844CECB3D645D358 83 | 84 | isa 85 | PBXGroup 86 | name 87 | Targets Support Files 88 | sourceTree 89 | <group> 90 | 91 | 0ECDA4E590F3AFC313CD46CF 92 | 93 | buildSettings 94 | 95 | ENABLE_STRICT_OBJC_MSGSEND 96 | YES 97 | PRODUCT_NAME 98 | DMPagerViewController 99 | SDKROOT 100 | iphoneos 101 | SKIP_INSTALL 102 | YES 103 | WRAPPER_EXTENSION 104 | bundle 105 | 106 | isa 107 | XCBuildConfiguration 108 | name 109 | Debug 110 | 111 | 1265A21B1C8E8265BE9B495F 112 | 113 | includeInIndex 114 | 1 115 | isa 116 | PBXFileReference 117 | lastKnownFileType 118 | text.plist.xml 119 | path 120 | Pods-DMPagerViewController-acknowledgements.plist 121 | sourceTree 122 | <group> 123 | 124 | 16BDBC7579C202E1CE15C597 125 | 126 | children 127 | 128 | CC391CC5FE9CAFB9B5952228 129 | 130 | isa 131 | PBXGroup 132 | name 133 | Development Pods 134 | sourceTree 135 | <group> 136 | 137 | 16C9FA58D927C43BE50C5E12 138 | 139 | children 140 | 141 | 9C9CD91BA7CBB44CB2134CD6 142 | 143 | isa 144 | PBXGroup 145 | name 146 | Frameworks 147 | sourceTree 148 | <group> 149 | 150 | 1D2D7C1F747B6EF844D8DF70 151 | 152 | fileRef 153 | 67BA32FB70E9E5D05CA5FBA0 154 | isa 155 | PBXBuildFile 156 | 157 | 1F00D5E0143FFCB4E1E2B2FF 158 | 159 | fileRef 160 | 8BB3E3BD85C6E525E00E530F 161 | isa 162 | PBXBuildFile 163 | 164 | 258CDF24989D3E87E6B9E76D 165 | 166 | baseConfigurationReference 167 | 9338E2C9388B93407820C865 168 | buildSettings 169 | 170 | ENABLE_STRICT_OBJC_MSGSEND 171 | YES 172 | IPHONEOS_DEPLOYMENT_TARGET 173 | 7.1 174 | MTL_ENABLE_DEBUG_INFO 175 | YES 176 | OTHER_LDFLAGS 177 | 178 | OTHER_LIBTOOLFLAGS 179 | 180 | PODS_ROOT 181 | $(SRCROOT) 182 | PRODUCT_NAME 183 | $(TARGET_NAME) 184 | SDKROOT 185 | iphoneos 186 | SKIP_INSTALL 187 | YES 188 | 189 | isa 190 | XCBuildConfiguration 191 | name 192 | Debug 193 | 194 | 27736212EEAB0986160718FC 195 | 196 | includeInIndex 197 | 1 198 | isa 199 | PBXFileReference 200 | lastKnownFileType 201 | sourcecode.c.objc 202 | path 203 | DMPagerViewController.m 204 | sourceTree 205 | <group> 206 | 207 | 288597475D9456DE16D82CD6 208 | 209 | includeInIndex 210 | 1 211 | isa 212 | PBXFileReference 213 | lastKnownFileType 214 | text 215 | path 216 | Pods-DMPagerViewController-acknowledgements.markdown 217 | sourceTree 218 | <group> 219 | 220 | 2934276F55411D6FC5C713F1 221 | 222 | containerPortal 223 | 7977AB75B72BB775BD541831 224 | isa 225 | PBXContainerItemProxy 226 | proxyType 227 | 1 228 | remoteGlobalIDString 229 | 6ACC3EB2591221E261FA34A4 230 | remoteInfo 231 | Pods-DMPagerViewController-DMPagerViewController 232 | 233 | 2C02823254DB5E36C48BB17F 234 | 235 | containerPortal 236 | 7977AB75B72BB775BD541831 237 | isa 238 | PBXContainerItemProxy 239 | proxyType 240 | 1 241 | remoteGlobalIDString 242 | E11B1FAE30B31BFE1295EA4E 243 | remoteInfo 244 | Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController 245 | 246 | 35D1D25316ADAB56DB53EB2F 247 | 248 | buildActionMask 249 | 2147483647 250 | files 251 | 252 | 4F061A71E68DBE96377BDE26 253 | 254 | isa 255 | PBXSourcesBuildPhase 256 | runOnlyForDeploymentPostprocessing 257 | 0 258 | 259 | 45DB7222A0179A16FE89F884 260 | 261 | isa 262 | PBXTargetDependency 263 | name 264 | Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController 265 | target 266 | E11B1FAE30B31BFE1295EA4E 267 | targetProxy 268 | 2C02823254DB5E36C48BB17F 269 | 270 | 4F061A71E68DBE96377BDE26 271 | 272 | fileRef 273 | A9F55409B39B1D79C6B03B17 274 | isa 275 | PBXBuildFile 276 | 277 | 51C45DBCDAAD199043941FCD 278 | 279 | explicitFileType 280 | archive.ar 281 | includeInIndex 282 | 0 283 | isa 284 | PBXFileReference 285 | name 286 | libPods-DMPagerViewController.a 287 | path 288 | libPods-DMPagerViewController.a 289 | sourceTree 290 | BUILT_PRODUCTS_DIR 291 | 292 | 56B28079408B44F5F9BD8F72 293 | 294 | children 295 | 296 | 8BB3E3BD85C6E525E00E530F 297 | 67BA32FB70E9E5D05CA5FBA0 298 | 07FE115CC04C8D446C77DA62 299 | 27736212EEAB0986160718FC 300 | 301 | isa 302 | PBXGroup 303 | name 304 | Classes 305 | path 306 | Classes 307 | sourceTree 308 | <group> 309 | 310 | 5D774E57F3DA52EBC89EB45A 311 | 312 | buildSettings 313 | 314 | ENABLE_STRICT_OBJC_MSGSEND 315 | YES 316 | PRODUCT_NAME 317 | DMPagerViewController 318 | SDKROOT 319 | iphoneos 320 | SKIP_INSTALL 321 | YES 322 | WRAPPER_EXTENSION 323 | bundle 324 | 325 | isa 326 | XCBuildConfiguration 327 | name 328 | Release 329 | 330 | 6297FB7AAB7770CBC7945224 331 | 332 | includeInIndex 333 | 1 334 | isa 335 | PBXFileReference 336 | lastKnownFileType 337 | sourcecode.c.objc 338 | path 339 | Pods-DMPagerViewController-DMPagerViewController-dummy.m 340 | sourceTree 341 | <group> 342 | 343 | 63E451FB5FB3D0E229172B08 344 | 345 | explicitFileType 346 | archive.ar 347 | includeInIndex 348 | 0 349 | isa 350 | PBXFileReference 351 | name 352 | libPods-DMPagerViewController-DMPagerViewController.a 353 | path 354 | libPods-DMPagerViewController-DMPagerViewController.a 355 | sourceTree 356 | BUILT_PRODUCTS_DIR 357 | 358 | 663C984E7CB9443D95F9BF96 359 | 360 | buildConfigurations 361 | 362 | C68D95EB5D4FD7C4905F8D89 363 | FF9FAE42D87E643FDFF0D1FD 364 | 365 | defaultConfigurationIsVisible 366 | 0 367 | defaultConfigurationName 368 | Release 369 | isa 370 | XCConfigurationList 371 | 372 | 67BA32FB70E9E5D05CA5FBA0 373 | 374 | includeInIndex 375 | 1 376 | isa 377 | PBXFileReference 378 | lastKnownFileType 379 | sourcecode.c.objc 380 | path 381 | DMPagerNavigationBar.m 382 | sourceTree 383 | <group> 384 | 385 | 68CB6535A18611E79F3DA84F 386 | 387 | includeInIndex 388 | 1 389 | isa 390 | PBXFileReference 391 | lastKnownFileType 392 | sourcecode.c.h 393 | path 394 | Pods-DMPagerViewController-environment.h 395 | sourceTree 396 | <group> 397 | 398 | 6ACC3EB2591221E261FA34A4 399 | 400 | buildConfigurationList 401 | 940D98D0FDDD3BA4774BEE96 402 | buildPhases 403 | 404 | D38822BF561BFBFF219A25DD 405 | 8BDBBDAE9F6D4AD503492A1A 406 | A778D785758E7A7602E03D17 407 | 408 | buildRules 409 | 410 | dependencies 411 | 412 | 45DB7222A0179A16FE89F884 413 | 414 | isa 415 | PBXNativeTarget 416 | name 417 | Pods-DMPagerViewController-DMPagerViewController 418 | productName 419 | Pods-DMPagerViewController-DMPagerViewController 420 | productReference 421 | 63E451FB5FB3D0E229172B08 422 | productType 423 | com.apple.product-type.library.static 424 | 425 | 7003C9FC771EF7C24D0EDC65 426 | 427 | children 428 | 429 | C78492D071858DA6D7CAA38A 430 | 51C45DBCDAAD199043941FCD 431 | 63E451FB5FB3D0E229172B08 432 | 433 | isa 434 | PBXGroup 435 | name 436 | Products 437 | sourceTree 438 | <group> 439 | 440 | 706A3A0B68E564BFA05C5417 441 | 442 | buildConfigurations 443 | 444 | 0ECDA4E590F3AFC313CD46CF 445 | 5D774E57F3DA52EBC89EB45A 446 | 447 | defaultConfigurationIsVisible 448 | 0 449 | defaultConfigurationName 450 | Release 451 | isa 452 | XCConfigurationList 453 | 454 | 7977AB75B72BB775BD541831 455 | 456 | attributes 457 | 458 | LastUpgradeCheck 459 | 0510 460 | 461 | buildConfigurationList 462 | 663C984E7CB9443D95F9BF96 463 | compatibilityVersion 464 | Xcode 3.2 465 | developmentRegion 466 | English 467 | hasScannedForEncodings 468 | 0 469 | isa 470 | PBXProject 471 | knownRegions 472 | 473 | en 474 | 475 | mainGroup 476 | 8F2B6AF41F15130BBFD64EA3 477 | productRefGroup 478 | 7003C9FC771EF7C24D0EDC65 479 | projectDirPath 480 | 481 | projectReferences 482 | 483 | projectRoot 484 | 485 | targets 486 | 487 | F7542ED44A0807842E4F1ABE 488 | 6ACC3EB2591221E261FA34A4 489 | E11B1FAE30B31BFE1295EA4E 490 | 491 | 492 | 814E3E5AE629571F37E847DF 493 | 494 | fileRef 495 | 27736212EEAB0986160718FC 496 | isa 497 | PBXBuildFile 498 | 499 | 86F5FEF8844CECB3D645D358 500 | 501 | children 502 | 503 | 288597475D9456DE16D82CD6 504 | 1265A21B1C8E8265BE9B495F 505 | A9F55409B39B1D79C6B03B17 506 | 68CB6535A18611E79F3DA84F 507 | 9F0CE9E98767454E118B656D 508 | 9338E2C9388B93407820C865 509 | 90BFD3F13C0D872FF40F4622 510 | 511 | isa 512 | PBXGroup 513 | name 514 | Pods-DMPagerViewController 515 | path 516 | Target Support Files/Pods-DMPagerViewController 517 | sourceTree 518 | <group> 519 | 520 | 898C0DAF420CBD4378DD02F7 521 | 522 | buildActionMask 523 | 2147483647 524 | files 525 | 526 | isa 527 | PBXResourcesBuildPhase 528 | runOnlyForDeploymentPostprocessing 529 | 0 530 | 531 | 8BB3E3BD85C6E525E00E530F 532 | 533 | includeInIndex 534 | 1 535 | isa 536 | PBXFileReference 537 | lastKnownFileType 538 | sourcecode.c.h 539 | path 540 | DMPagerNavigationBar.h 541 | sourceTree 542 | <group> 543 | 544 | 8BDBBDAE9F6D4AD503492A1A 545 | 546 | buildActionMask 547 | 2147483647 548 | files 549 | 550 | 9CE7EEBAABD01223D0ADF7D4 551 | 552 | isa 553 | PBXFrameworksBuildPhase 554 | runOnlyForDeploymentPostprocessing 555 | 0 556 | 557 | 8F2B6AF41F15130BBFD64EA3 558 | 559 | children 560 | 561 | 07F53B041DC6DBCA9D6537FC 562 | 16BDBC7579C202E1CE15C597 563 | 16C9FA58D927C43BE50C5E12 564 | 7003C9FC771EF7C24D0EDC65 565 | 09C38CE2277D32B00D8FB580 566 | 567 | isa 568 | PBXGroup 569 | sourceTree 570 | <group> 571 | 572 | 90BFD3F13C0D872FF40F4622 573 | 574 | includeInIndex 575 | 1 576 | isa 577 | PBXFileReference 578 | lastKnownFileType 579 | text.xcconfig 580 | path 581 | Pods-DMPagerViewController.release.xcconfig 582 | sourceTree 583 | <group> 584 | 585 | 932ED993F199B462840A1B28 586 | 587 | baseConfigurationReference 588 | 90BFD3F13C0D872FF40F4622 589 | buildSettings 590 | 591 | ENABLE_STRICT_OBJC_MSGSEND 592 | YES 593 | IPHONEOS_DEPLOYMENT_TARGET 594 | 7.1 595 | MTL_ENABLE_DEBUG_INFO 596 | NO 597 | OTHER_LDFLAGS 598 | 599 | OTHER_LIBTOOLFLAGS 600 | 601 | PODS_ROOT 602 | $(SRCROOT) 603 | PRODUCT_NAME 604 | $(TARGET_NAME) 605 | SDKROOT 606 | iphoneos 607 | SKIP_INSTALL 608 | YES 609 | 610 | isa 611 | XCBuildConfiguration 612 | name 613 | Release 614 | 615 | 9338E2C9388B93407820C865 616 | 617 | includeInIndex 618 | 1 619 | isa 620 | PBXFileReference 621 | lastKnownFileType 622 | text.xcconfig 623 | path 624 | Pods-DMPagerViewController.debug.xcconfig 625 | sourceTree 626 | <group> 627 | 628 | 940D98D0FDDD3BA4774BEE96 629 | 630 | buildConfigurations 631 | 632 | EA7092A878BD4876F2976B69 633 | BCDB5AFC5C79409C89A3435E 634 | 635 | defaultConfigurationIsVisible 636 | 0 637 | defaultConfigurationName 638 | Release 639 | isa 640 | XCConfigurationList 641 | 642 | 9C9CD91BA7CBB44CB2134CD6 643 | 644 | children 645 | 646 | 079B5B0F1F30A562AC7FC34C 647 | 648 | isa 649 | PBXGroup 650 | name 651 | iOS 652 | sourceTree 653 | <group> 654 | 655 | 9CE7EEBAABD01223D0ADF7D4 656 | 657 | fileRef 658 | 079B5B0F1F30A562AC7FC34C 659 | isa 660 | PBXBuildFile 661 | 662 | 9F0CE9E98767454E118B656D 663 | 664 | includeInIndex 665 | 1 666 | isa 667 | PBXFileReference 668 | lastKnownFileType 669 | text.script.sh 670 | path 671 | Pods-DMPagerViewController-resources.sh 672 | sourceTree 673 | <group> 674 | 675 | A0386815C802A807502862DA 676 | 677 | children 678 | 679 | E2094D95FBBB253BC53190D1 680 | F84BB4CC80BC8B2BC2281877 681 | 6297FB7AAB7770CBC7945224 682 | C69129D8E31C6F2E5BAE0B59 683 | 684 | isa 685 | PBXGroup 686 | name 687 | Support Files 688 | path 689 | Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController 690 | sourceTree 691 | <group> 692 | 693 | A778D785758E7A7602E03D17 694 | 695 | buildActionMask 696 | 2147483647 697 | files 698 | 699 | 1F00D5E0143FFCB4E1E2B2FF 700 | AD0BBBE56401937A416210C0 701 | 702 | isa 703 | PBXHeadersBuildPhase 704 | runOnlyForDeploymentPostprocessing 705 | 0 706 | 707 | A9F55409B39B1D79C6B03B17 708 | 709 | includeInIndex 710 | 1 711 | isa 712 | PBXFileReference 713 | lastKnownFileType 714 | sourcecode.c.objc 715 | path 716 | Pods-DMPagerViewController-dummy.m 717 | sourceTree 718 | <group> 719 | 720 | AD0BBBE56401937A416210C0 721 | 722 | fileRef 723 | 07FE115CC04C8D446C77DA62 724 | isa 725 | PBXBuildFile 726 | 727 | B6D55856B8CCD4055BEF63EC 728 | 729 | isa 730 | PBXTargetDependency 731 | name 732 | Pods-DMPagerViewController-DMPagerViewController 733 | target 734 | 6ACC3EB2591221E261FA34A4 735 | targetProxy 736 | 2934276F55411D6FC5C713F1 737 | 738 | BCDB5AFC5C79409C89A3435E 739 | 740 | baseConfigurationReference 741 | F84BB4CC80BC8B2BC2281877 742 | buildSettings 743 | 744 | ENABLE_STRICT_OBJC_MSGSEND 745 | YES 746 | GCC_PREFIX_HEADER 747 | Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController-prefix.pch 748 | IPHONEOS_DEPLOYMENT_TARGET 749 | 7.1 750 | MTL_ENABLE_DEBUG_INFO 751 | NO 752 | OTHER_LDFLAGS 753 | 754 | OTHER_LIBTOOLFLAGS 755 | 756 | PRODUCT_NAME 757 | $(TARGET_NAME) 758 | SDKROOT 759 | iphoneos 760 | SKIP_INSTALL 761 | YES 762 | 763 | isa 764 | XCBuildConfiguration 765 | name 766 | Release 767 | 768 | C68D95EB5D4FD7C4905F8D89 769 | 770 | buildSettings 771 | 772 | ALWAYS_SEARCH_USER_PATHS 773 | NO 774 | CLANG_CXX_LANGUAGE_STANDARD 775 | gnu++0x 776 | CLANG_CXX_LIBRARY 777 | libc++ 778 | CLANG_ENABLE_MODULES 779 | YES 780 | CLANG_ENABLE_OBJC_ARC 781 | YES 782 | CLANG_WARN_BOOL_CONVERSION 783 | YES 784 | CLANG_WARN_CONSTANT_CONVERSION 785 | YES 786 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 787 | YES 788 | CLANG_WARN_EMPTY_BODY 789 | YES 790 | CLANG_WARN_ENUM_CONVERSION 791 | YES 792 | CLANG_WARN_INT_CONVERSION 793 | YES 794 | CLANG_WARN_OBJC_ROOT_CLASS 795 | YES 796 | CLANG_WARN_UNREACHABLE_CODE 797 | YES 798 | CLANG_WARN__DUPLICATE_METHOD_MATCH 799 | YES 800 | COPY_PHASE_STRIP 801 | YES 802 | GCC_C_LANGUAGE_STANDARD 803 | gnu99 804 | GCC_DYNAMIC_NO_PIC 805 | NO 806 | GCC_OPTIMIZATION_LEVEL 807 | 0 808 | GCC_PREPROCESSOR_DEFINITIONS 809 | 810 | DEBUG=1 811 | $(inherited) 812 | 813 | GCC_SYMBOLS_PRIVATE_EXTERN 814 | NO 815 | GCC_WARN_64_TO_32_BIT_CONVERSION 816 | YES 817 | GCC_WARN_ABOUT_RETURN_TYPE 818 | YES 819 | GCC_WARN_UNDECLARED_SELECTOR 820 | YES 821 | GCC_WARN_UNINITIALIZED_AUTOS 822 | YES 823 | GCC_WARN_UNUSED_FUNCTION 824 | YES 825 | GCC_WARN_UNUSED_VARIABLE 826 | YES 827 | IPHONEOS_DEPLOYMENT_TARGET 828 | 7.1 829 | ONLY_ACTIVE_ARCH 830 | YES 831 | STRIP_INSTALLED_PRODUCT 832 | NO 833 | 834 | isa 835 | XCBuildConfiguration 836 | name 837 | Debug 838 | 839 | C69129D8E31C6F2E5BAE0B59 840 | 841 | includeInIndex 842 | 1 843 | isa 844 | PBXFileReference 845 | lastKnownFileType 846 | sourcecode.c.h 847 | path 848 | Pods-DMPagerViewController-DMPagerViewController-prefix.pch 849 | sourceTree 850 | <group> 851 | 852 | C7062E218D46C2D641D1D7B4 853 | 854 | fileRef 855 | 6297FB7AAB7770CBC7945224 856 | isa 857 | PBXBuildFile 858 | 859 | C78492D071858DA6D7CAA38A 860 | 861 | explicitFileType 862 | wrapper.cfbundle 863 | includeInIndex 864 | 0 865 | isa 866 | PBXFileReference 867 | name 868 | DMPagerViewController.bundle 869 | path 870 | DMPagerViewController.bundle 871 | sourceTree 872 | BUILT_PRODUCTS_DIR 873 | 874 | CC391CC5FE9CAFB9B5952228 875 | 876 | children 877 | 878 | DC46C3E1DD7C0C978D4EAF83 879 | A0386815C802A807502862DA 880 | 881 | isa 882 | PBXGroup 883 | name 884 | DMPagerViewController 885 | path 886 | ../.. 887 | sourceTree 888 | <group> 889 | 890 | D0713F8755F917375CB95F7A 891 | 892 | fileRef 893 | 079B5B0F1F30A562AC7FC34C 894 | isa 895 | PBXBuildFile 896 | 897 | D38822BF561BFBFF219A25DD 898 | 899 | buildActionMask 900 | 2147483647 901 | files 902 | 903 | 1D2D7C1F747B6EF844D8DF70 904 | 814E3E5AE629571F37E847DF 905 | C7062E218D46C2D641D1D7B4 906 | 907 | isa 908 | PBXSourcesBuildPhase 909 | runOnlyForDeploymentPostprocessing 910 | 0 911 | 912 | D3A41F643508ECB3E35852C6 913 | 914 | buildConfigurations 915 | 916 | 258CDF24989D3E87E6B9E76D 917 | 932ED993F199B462840A1B28 918 | 919 | defaultConfigurationIsVisible 920 | 0 921 | defaultConfigurationName 922 | Release 923 | isa 924 | XCConfigurationList 925 | 926 | D3AB8D5D4E4E9C51E6FBD532 927 | 928 | buildActionMask 929 | 2147483647 930 | files 931 | 932 | D0713F8755F917375CB95F7A 933 | 934 | isa 935 | PBXFrameworksBuildPhase 936 | runOnlyForDeploymentPostprocessing 937 | 0 938 | 939 | DC46C3E1DD7C0C978D4EAF83 940 | 941 | children 942 | 943 | 56B28079408B44F5F9BD8F72 944 | 945 | isa 946 | PBXGroup 947 | name 948 | Pod 949 | path 950 | Pod 951 | sourceTree 952 | <group> 953 | 954 | E11B1FAE30B31BFE1295EA4E 955 | 956 | buildConfigurationList 957 | 706A3A0B68E564BFA05C5417 958 | buildPhases 959 | 960 | 08A52BB56E7E9A5F30191A09 961 | 0865C082A57AE603E8A88BB0 962 | 898C0DAF420CBD4378DD02F7 963 | 964 | buildRules 965 | 966 | dependencies 967 | 968 | isa 969 | PBXNativeTarget 970 | name 971 | Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController 972 | productName 973 | Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController 974 | productReference 975 | C78492D071858DA6D7CAA38A 976 | productType 977 | com.apple.product-type.bundle 978 | 979 | E2094D95FBBB253BC53190D1 980 | 981 | includeInIndex 982 | 1 983 | isa 984 | PBXFileReference 985 | lastKnownFileType 986 | text.xcconfig 987 | path 988 | Pods-DMPagerViewController-DMPagerViewController.xcconfig 989 | sourceTree 990 | <group> 991 | 992 | EA7092A878BD4876F2976B69 993 | 994 | baseConfigurationReference 995 | F84BB4CC80BC8B2BC2281877 996 | buildSettings 997 | 998 | ENABLE_STRICT_OBJC_MSGSEND 999 | YES 1000 | GCC_PREFIX_HEADER 1001 | Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController-prefix.pch 1002 | IPHONEOS_DEPLOYMENT_TARGET 1003 | 7.1 1004 | MTL_ENABLE_DEBUG_INFO 1005 | YES 1006 | OTHER_LDFLAGS 1007 | 1008 | OTHER_LIBTOOLFLAGS 1009 | 1010 | PRODUCT_NAME 1011 | $(TARGET_NAME) 1012 | SDKROOT 1013 | iphoneos 1014 | SKIP_INSTALL 1015 | YES 1016 | 1017 | isa 1018 | XCBuildConfiguration 1019 | name 1020 | Debug 1021 | 1022 | F7542ED44A0807842E4F1ABE 1023 | 1024 | buildConfigurationList 1025 | D3A41F643508ECB3E35852C6 1026 | buildPhases 1027 | 1028 | 35D1D25316ADAB56DB53EB2F 1029 | D3AB8D5D4E4E9C51E6FBD532 1030 | 1031 | buildRules 1032 | 1033 | dependencies 1034 | 1035 | B6D55856B8CCD4055BEF63EC 1036 | 1037 | isa 1038 | PBXNativeTarget 1039 | name 1040 | Pods-DMPagerViewController 1041 | productName 1042 | Pods-DMPagerViewController 1043 | productReference 1044 | 51C45DBCDAAD199043941FCD 1045 | productType 1046 | com.apple.product-type.library.static 1047 | 1048 | F84BB4CC80BC8B2BC2281877 1049 | 1050 | includeInIndex 1051 | 1 1052 | isa 1053 | PBXFileReference 1054 | lastKnownFileType 1055 | text.xcconfig 1056 | path 1057 | Pods-DMPagerViewController-DMPagerViewController-Private.xcconfig 1058 | sourceTree 1059 | <group> 1060 | 1061 | FF9FAE42D87E643FDFF0D1FD 1062 | 1063 | buildSettings 1064 | 1065 | ALWAYS_SEARCH_USER_PATHS 1066 | NO 1067 | CLANG_CXX_LANGUAGE_STANDARD 1068 | gnu++0x 1069 | CLANG_CXX_LIBRARY 1070 | libc++ 1071 | CLANG_ENABLE_MODULES 1072 | YES 1073 | CLANG_ENABLE_OBJC_ARC 1074 | YES 1075 | CLANG_WARN_BOOL_CONVERSION 1076 | YES 1077 | CLANG_WARN_CONSTANT_CONVERSION 1078 | YES 1079 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 1080 | YES 1081 | CLANG_WARN_EMPTY_BODY 1082 | YES 1083 | CLANG_WARN_ENUM_CONVERSION 1084 | YES 1085 | CLANG_WARN_INT_CONVERSION 1086 | YES 1087 | CLANG_WARN_OBJC_ROOT_CLASS 1088 | YES 1089 | CLANG_WARN_UNREACHABLE_CODE 1090 | YES 1091 | CLANG_WARN__DUPLICATE_METHOD_MATCH 1092 | YES 1093 | COPY_PHASE_STRIP 1094 | NO 1095 | ENABLE_NS_ASSERTIONS 1096 | NO 1097 | GCC_C_LANGUAGE_STANDARD 1098 | gnu99 1099 | GCC_PREPROCESSOR_DEFINITIONS 1100 | 1101 | RELEASE=1 1102 | 1103 | GCC_WARN_64_TO_32_BIT_CONVERSION 1104 | YES 1105 | GCC_WARN_ABOUT_RETURN_TYPE 1106 | YES 1107 | GCC_WARN_UNDECLARED_SELECTOR 1108 | YES 1109 | GCC_WARN_UNINITIALIZED_AUTOS 1110 | YES 1111 | GCC_WARN_UNUSED_FUNCTION 1112 | YES 1113 | GCC_WARN_UNUSED_VARIABLE 1114 | YES 1115 | IPHONEOS_DEPLOYMENT_TARGET 1116 | 7.1 1117 | STRIP_INSTALLED_PRODUCT 1118 | NO 1119 | VALIDATE_PRODUCT 1120 | YES 1121 | 1122 | isa 1123 | XCBuildConfiguration 1124 | name 1125 | Release 1126 | 1127 | 1128 | rootObject 1129 | 7977AB75B72BB775BD541831 1130 | 1131 | 1132 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/daniele.xcuserdatad/xcschemes/Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/daniele.xcuserdatad/xcschemes/Pods-DMPagerViewController-DMPagerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/daniele.xcuserdatad/xcschemes/Pods-DMPagerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/daniele.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-DMPagerViewController-DMPagerViewController-DMPagerViewController.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-DMPagerViewController-DMPagerViewController.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods-DMPagerViewController.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 6ACC3EB2591221E261FA34A4 26 | 27 | primary 28 | 29 | 30 | E11B1FAE30B31BFE1295EA4E 31 | 32 | primary 33 | 34 | 35 | F7542ED44A0807842E4F1ABE 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-DMPagerViewController-DMPagerViewController.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DMPagerViewController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DMPagerViewController" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DMPagerViewController_DMPagerViewController : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DMPagerViewController_DMPagerViewController 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-DMPagerViewController-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Example/Pods/Target Support Files/Pods-DMPagerViewController-DMPagerViewController/Pods-DMPagerViewController-DMPagerViewController.xcconfig -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## DMPagerViewController 5 | 6 | Copyright (c) 2015 Daniele Margutti 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - http://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-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 | Copyright (c) 2015 Daniele Margutti <me@danielemargutti.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | DMPagerViewController 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - http://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DMPagerViewController : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DMPagerViewController 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // DMPagerViewController 10 | #define COCOAPODS_POD_AVAILABLE_DMPagerViewController 11 | #define COCOAPODS_VERSION_MAJOR_DMPagerViewController 0 12 | #define COCOAPODS_VERSION_MINOR_DMPagerViewController 1 13 | #define COCOAPODS_VERSION_PATCH_DMPagerViewController 0 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | install_resource() 10 | { 11 | case $1 in 12 | *.storyboard) 13 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 14 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 15 | ;; 16 | *.xib) 17 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 18 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 19 | ;; 20 | *.framework) 21 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 25 | ;; 26 | *.xcdatamodel) 27 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 28 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 29 | ;; 30 | *.xcdatamodeld) 31 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 32 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 33 | ;; 34 | *.xcmappingmodel) 35 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 36 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 37 | ;; 38 | *.xcassets) 39 | ;; 40 | /*) 41 | echo "$1" 42 | echo "$1" >> "$RESOURCES_TO_COPY" 43 | ;; 44 | *) 45 | echo "${PODS_ROOT}/$1" 46 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 47 | ;; 48 | esac 49 | } 50 | install_resource "${BUILT_PRODUCTS_DIR}/DMPagerViewController.bundle" 51 | 52 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 53 | if [[ "${ACTION}" == "install" ]]; then 54 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 55 | fi 56 | rm -f "$RESOURCES_TO_COPY" 57 | 58 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 59 | then 60 | case "${TARGETED_DEVICE_FAMILY}" in 61 | 1,2) 62 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 63 | ;; 64 | 1) 65 | TARGET_DEVICE_ARGS="--target-device iphone" 66 | ;; 67 | 2) 68 | TARGET_DEVICE_ARGS="--target-device ipad" 69 | ;; 70 | *) 71 | TARGET_DEVICE_ARGS="--target-device mac" 72 | ;; 73 | esac 74 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 75 | fi 76 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DMPagerViewController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DMPagerViewController" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-DMPagerViewController-DMPagerViewController" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-DMPagerViewController/Pods-DMPagerViewController.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DMPagerViewController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DMPagerViewController" 4 | OTHER_LDFLAGS = -ObjC -l"Pods-DMPagerViewController-DMPagerViewController" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every test case source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DMPagerViewControllerTests.m 3 | // DMPagerViewControllerTests 4 | // 5 | // Created by Daniele Margutti on 01/12/2015. 6 | // Copyright (c) 2014 Daniele Margutti. All rights reserved. 7 | // 8 | 9 | ${TEST_EXAMPLE} 10 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | If you are using DMPagerViewController in your project, I'd love to hear about it. 2 | Let Daniele know by sending an email to me@danielemargutti.com. 3 | 4 | This is the MIT License. 5 | 6 | Copyright (c) 2015 Daniele Margutti http://www.danielemargutti.com. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malcommac/DMPagerViewController/ac29abdd61d84a5c1467cf18a4ed17a567710599/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/DMPagerNavigationBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // DMPagerNavigationBar.h 3 | // Pager controller like the one in Twitter or Tinder 4 | // 5 | // Created by Daniele Margutti (me@danielemargutti.com) on 11/01/15. 6 | // Copyright (c) 2015 http://www.danielemargutti.com All rights reserved. 7 | // Distribuited under MIT License http://opensource.org/licenses/MIT 8 | // 9 | 10 | #import 11 | 12 | @class DMPagerViewController,DMPagerNavigationBarItem; 13 | 14 | static CGFloat kNavigationBarOffset = 5.0f; 15 | 16 | typedef void(^DMPagerNavigationBarClickHandler)(NSInteger idx,DMPagerNavigationBarItem *item); 17 | 18 | typedef NS_ENUM(NSInteger, DMPagerNavigationBarItemMode) { 19 | DMPagerNavigationBarItemModeTextAndImage, // Button contains both text and image 20 | DMPagerNavigationBarItemModeOnlyText, // Only Text 21 | DMPagerNavigationBarItemModeOnlyImage // Only Image 22 | }; 23 | 24 | typedef NS_ENUM(NSInteger, DMPagerNavigationBarItemColorize) { 25 | DMPagerNavigationBarItemColorizeWithFade, // Colorize from inactive<->active item colors with fade based on scroll offset 26 | DMPagerNavigationBarItemColorizeSolid, // Solid colorization for inactive/active items 27 | DMPagerNavigationBarItemIgnore // No changes are applied to color, use your own 28 | }; 29 | 30 | typedef NS_ENUM(NSInteger, DMPagerNavigationBarStyle) { 31 | DMPagerNavigationBarStyleOnBounds = 40, 32 | DMPagerNavigationBarStyleClose = 30, 33 | DMPagerNavigationBarStyleNormal = 20, 34 | DMPagerNavigationBarStyleFar = 10, 35 | DMPagerNavigationBarStyleDefault = 0, 36 | DMPagerNavigationBarStyleCloseToEachOne = -40 37 | }; 38 | 39 | #pragma mark - DMPagerNavigationBarItem Navigation Bar Item - 40 | 41 | @interface DMPagerNavigationBarItem : UIView 42 | 43 | @property (nonatomic,retain) NSAttributedString *title; // Title of the item (as attributed string) 44 | @property (nonatomic,retain) UIImage *icon; // Image of the item (will be used as template) 45 | @property (nonatomic,assign) DMPagerNavigationBarItemMode renderingMode; // Rendering mode of the item 46 | 47 | // Create a new item 48 | + (DMPagerNavigationBarItem *) newItemWithText:(NSAttributedString *) aTitle andIcon:(UIImage *) aIcon; 49 | 50 | @end 51 | 52 | 53 | #pragma mark - DMPagerNavigationBar Navigation Bar - 54 | 55 | @interface DMPagerNavigationBar : UIView 56 | 57 | // Create a new navigation bar (you should not use it) 58 | - (instancetype) initWithController:(DMPagerViewController *) aController; 59 | 60 | @property (nonatomic,retain) NSArray *items; // You should not touch it 61 | @property (nonatomic,copy) DMPagerNavigationBarClickHandler action; 62 | 63 | @property (nonatomic,assign) DMPagerNavigationBarStyle style; // Style of the navigation (items positioning) 64 | @property (nonatomic,strong) UIColor *activeItemColor; // Inactive item tint color 65 | @property (nonatomic,strong) UIColor *inactiveItemColor; // Active item tint color 66 | @property (nonatomic,assign) DMPagerNavigationBarItemColorize colorizeMode; // Colorization mode of the items 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Pod/Classes/DMPagerNavigationBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // DMPagerNavigationBar.m 3 | // Pager controller like the one in Twitter or Tinder 4 | // 5 | // Created by Daniele Margutti (me@danielemargutti.com) on 11/01/15. 6 | // Copyright (c) 2015 http://www.danielemargutti.com All rights reserved. 7 | // Distribuited under MIT License http://opensource.org/licenses/MIT 8 | // 9 | 10 | #import "DMPagerNavigationBar.h" 11 | #import "DMPagerViewController.h" 12 | 13 | @interface DMPagerNavigationBarItem () { } 14 | 15 | @property (nonatomic,readonly) DMPagerNavigationBar *navigationBar; 16 | @property (nonatomic,readonly) UIImageView *iconView; 17 | @property (nonatomic,readonly) UILabel *titleLabel; 18 | 19 | @end 20 | 21 | @implementation DMPagerNavigationBarItem 22 | 23 | + (DMPagerNavigationBarItem *) newItemWithText:(NSAttributedString *) aTitle andIcon:(UIImage *) aIcon { 24 | DMPagerNavigationBarItem *item = [[DMPagerNavigationBarItem alloc] init]; 25 | item.title = aTitle; 26 | item.icon = aIcon; 27 | [item layoutSubviews]; 28 | return item; 29 | } 30 | 31 | - (instancetype)init { 32 | self = [super init]; 33 | if (self) { 34 | _iconView = [[UIImageView alloc] initWithFrame:CGRectZero]; 35 | _iconView.contentMode = UIViewContentModeCenter; 36 | _iconView.clipsToBounds = YES; 37 | _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 38 | _iconView.backgroundColor = [UIColor clearColor]; 39 | _titleLabel.backgroundColor = [UIColor clearColor]; 40 | _titleLabel.numberOfLines = 1; 41 | _titleLabel.lineBreakMode = NSLineBreakByTruncatingTail; 42 | [self addSubview:_iconView]; 43 | [self addSubview:_titleLabel]; 44 | 45 | self.backgroundColor = [UIColor clearColor]; 46 | } 47 | return self; 48 | } 49 | 50 | - (DMPagerNavigationBar *)navigationBar { 51 | return ((DMPagerNavigationBar*)self.superview); 52 | } 53 | 54 | - (void)setTitle:(NSAttributedString *)title { 55 | _title = title; 56 | _titleLabel.attributedText = title; 57 | [self layoutSubviews]; 58 | } 59 | 60 | - (void)setIcon:(UIImage *)icon { 61 | _icon = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 62 | _iconView.image = _icon; 63 | [self layoutSubviews]; 64 | } 65 | 66 | - (void)setRenderingMode:(DMPagerNavigationBarItemMode)renderingMode { 67 | if (_renderingMode == renderingMode) return; 68 | _renderingMode = renderingMode; 69 | _iconView.hidden = !(_renderingMode == DMPagerNavigationBarItemModeOnlyImage || _renderingMode == DMPagerNavigationBarItemModeTextAndImage); 70 | _titleLabel.hidden = !(_renderingMode == DMPagerNavigationBarItemModeOnlyText || _renderingMode == DMPagerNavigationBarItemModeTextAndImage); 71 | [self layoutSubviews]; 72 | } 73 | 74 | - (void)layoutSubviews { 75 | [super layoutSubviews]; 76 | 77 | CGSize navigationBarSize = self.frame.size; 78 | 79 | CGSize imageSize = _icon.size; 80 | CGSize titleSize = [_title boundingRectWithSize:CGSizeMake(navigationBarSize.width, navigationBarSize.height-imageSize.height-5.0f) 81 | options:NSStringDrawingTruncatesLastVisibleLine 82 | context:NULL].size; 83 | 84 | CGRect imageRect = CGRectMake(((CGRectGetWidth(self.bounds)-imageSize.width)/2.0f),0, 85 | imageSize.width, imageSize.height); 86 | CGRect titleRect = CGRectMake(((CGRectGetWidth(self.bounds)-titleSize.width)/2.0f), 87 | CGRectGetMaxY(imageRect), 88 | titleSize.width, 89 | titleSize.height); 90 | 91 | if (_renderingMode == DMPagerNavigationBarItemModeOnlyImage) { 92 | imageRect = CGRectMake(0.0f, 0.0f, imageRect.size.width, navigationBarSize.height); 93 | titleRect = CGRectZero; 94 | } else if (_renderingMode == DMPagerNavigationBarItemModeOnlyText) { 95 | imageRect = CGRectZero; 96 | titleRect = CGRectMake(0.0f, 0.0f, titleSize.width, navigationBarSize.height); 97 | } 98 | 99 | self.frame = CGRectMake(self.frame.origin.x, 100 | self.frame.origin.y, 101 | MAX(titleRect.size.width,imageRect.size.width), 102 | self.frame.size.height); 103 | _titleLabel.frame = titleRect; 104 | _iconView.frame = imageRect; 105 | } 106 | 107 | @end 108 | 109 | 110 | #pragma mark - DMPagerNavigationBar - 111 | 112 | @interface DMPagerNavigationBar () { } 113 | @property (nonatomic,weak) DMPagerViewController *controller; 114 | @end 115 | 116 | @implementation DMPagerNavigationBar 117 | 118 | - (instancetype) initWithController:(DMPagerViewController *) aController { 119 | CGRect frame; 120 | CGFloat statusBarHeight = (aController.isFullScreen ? [UIApplication sharedApplication].statusBarFrame.size.height : 0.0f); 121 | frame.origin.x = 0.0f; 122 | frame.origin.y = 0.0f; 123 | frame.size.width = CGRectGetWidth(aController.view.frame); 124 | frame.size.height = aController.navigationBarHeight+statusBarHeight+(kNavigationBarOffset*2); 125 | 126 | self = [super initWithFrame:frame]; 127 | if (self) { 128 | _colorizeMode = DMPagerNavigationBarItemColorizeWithFade; 129 | _activeItemColor = [UIColor orangeColor]; 130 | _inactiveItemColor = [UIColor darkGrayColor]; 131 | 132 | self.autoresizingMask = UIViewAutoresizingFlexibleWidth; 133 | self.backgroundColor = [UIColor whiteColor]; 134 | self.controller = aController; 135 | } 136 | return self; 137 | } 138 | 139 | - (void)setItems:(NSArray *)items { 140 | if ([_items isEqualToArray:items]) return; 141 | [_items makeObjectsPerformSelector:@selector(removeFromSuperview)]; 142 | _items = items; 143 | 144 | CGSize screenSize = [[UIScreen mainScreen] bounds].size; 145 | CGFloat statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height; 146 | 147 | for (NSUInteger idx = 0; idx < _items.count; ++idx) { 148 | // Frame 149 | DMPagerNavigationBarItem *cItem = _items[idx]; 150 | CGRect cItemFrame = cItem.frame; 151 | cItemFrame.size.height = _controller.navigationBarHeight; 152 | [cItem layoutSubviews]; 153 | 154 | cItemFrame.origin.x = (screenSize.width/2.0f)-(CGRectGetWidth(cItem.frame) + idx*100); 155 | cItemFrame.origin.y = statusBarHeight+kNavigationBarOffset; 156 | cItemFrame.size.width = CGRectGetWidth(cItem.frame); 157 | cItem.frame = cItemFrame; 158 | 159 | // Action 160 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapOnItem:)]; 161 | [cItem addGestureRecognizer:tap]; 162 | [cItem setUserInteractionEnabled:YES]; 163 | 164 | [self addSubview:cItem]; 165 | } 166 | } 167 | 168 | - (void)setInactiveItemColor:(UIColor *)inactiveItemColor { 169 | _inactiveItemColor = inactiveItemColor; 170 | [self layoutItems]; 171 | } 172 | 173 | - (void)setActiveItemColor:(UIColor *)activeItemColor { 174 | _activeItemColor = activeItemColor; 175 | [self layoutItems]; 176 | } 177 | 178 | -(void)tapOnItem:(UITapGestureRecognizer *)recognizer { 179 | DMPagerNavigationBarItem *item = (DMPagerNavigationBarItem *)recognizer.view; 180 | NSInteger idx = [self.subviews indexOfObject:recognizer.view]; 181 | if (self.action) self.action(idx,item); 182 | } 183 | 184 | - (void) pagerScrollerDidScroll:(UIScrollView *) scrollView { 185 | [self layoutItems]; 186 | } 187 | 188 | - (void) layoutItems { 189 | CGFloat xOffset = _controller.scrollView.contentOffset.x; 190 | int i = 0; 191 | CGSize screenSize = [[UIScreen mainScreen] bounds].size; 192 | CGFloat statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height; 193 | 194 | for(DMPagerNavigationBarItem *v in self.subviews){ 195 | CGFloat distance = 100 + self.style; 196 | CGSize vSize = v.frame.size; 197 | CGFloat originX = ((screenSize.width/2 - vSize.width/2) + i*distance) - xOffset/(screenSize.width/distance); 198 | v.frame = (CGRect){originX, statusBarHeight, vSize.width, vSize.height}; 199 | 200 | [self colorizeItem:v idx:i]; 201 | i++; 202 | } 203 | } 204 | 205 | - (void) colorizeItem:(DMPagerNavigationBarItem *) aItem idx:(NSInteger) aIdx { 206 | if (!_activeItemColor || !_inactiveItemColor) 207 | return; 208 | 209 | if (_colorizeMode == DMPagerNavigationBarItemColorizeWithFade && _activeItemColor) { 210 | CGRect itemFrame = aItem.frame; 211 | 212 | UIColor *color = _inactiveItemColor; 213 | if(CGRectGetMinX(itemFrame) > 45.0f && CGRectGetMinX(itemFrame) < 145.0f) // Left part 214 | color = [self iconWithGradient: CGRectGetMinX(itemFrame) 215 | top: 46.0f 216 | bottom: 144.0f 217 | init: _activeItemColor 218 | goal: _inactiveItemColor]; 219 | else if(CGRectGetMinX(itemFrame) > 145.0f && CGRectGetMinX(itemFrame) < 245.0f) // Right part 220 | color = [self iconWithGradient: CGRectGetMinX(itemFrame) 221 | top: 146.0f 222 | bottom: 244.0f 223 | init: _inactiveItemColor 224 | goal: _activeItemColor]; 225 | else if(CGRectGetMinX(itemFrame) == 145.0f) 226 | color = _activeItemColor; 227 | 228 | aItem.titleLabel.textColor = color; 229 | aItem.iconView.tintColor = color; 230 | } else if (_colorizeMode == DMPagerNavigationBarItemColorizeSolid) { 231 | NSInteger currentPage = _controller.currentPage; 232 | aItem.titleLabel.textColor = (currentPage == aIdx ? _activeItemColor : _inactiveItemColor); 233 | aItem.iconView.tintColor = aItem.titleLabel.textColor; 234 | } 235 | } 236 | 237 | -(UIColor *) iconWithGradient:(double)percent top:(double)topX bottom:(double)bottomX init:(UIColor*)init goal:(UIColor*)goal{ 238 | double t = (percent - bottomX) / (topX - bottomX); 239 | 240 | t = MAX(0.0, MIN(t, 1.0)); 241 | 242 | const CGFloat *cgInit = CGColorGetComponents(init.CGColor); 243 | const CGFloat *cgGoal = CGColorGetComponents(goal.CGColor); 244 | 245 | double r = cgInit[0] + t * (cgGoal[0] - cgInit[0]); 246 | double g = cgInit[1] + t * (cgGoal[1] - cgInit[1]); 247 | double b = cgInit[2] + t * (cgGoal[2] - cgInit[2]); 248 | 249 | return [UIColor colorWithRed:r green:g blue:b alpha:1]; 250 | } 251 | 252 | @end 253 | -------------------------------------------------------------------------------- /Pod/Classes/DMPagerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DMPagerViewController.h 3 | // Pager controller like the one in Twitter or Tinder 4 | // 5 | // Created by Daniele Margutti (me@danielemargutti.com) on 11/01/15. 6 | // Copyright (c) 2015 http://www.danielemargutti.com All rights reserved. 7 | // Distribuited under MIT License http://opensource.org/licenses/MIT 8 | // 9 | 10 | #import 11 | #import "DMPagerNavigationBar.h" 12 | 13 | typedef NS_ENUM(NSInteger, DMPagerViewControllerAnimation) { 14 | DMPagerViewControllerAnimationStandard, // Standard UIScrollView animation 15 | DMPagerViewControllerAnimationEaseInOut, // Ease In+Out animation on scroll 16 | DMPagerViewControllerAnimationBounceEnd, // Animation with final bounce 17 | DMPagerViewControllerAnimationBounceStartEnd // Animation with initial+final bounce 18 | }; 19 | 20 | #pragma mark - DMPagerViewControllerProtocol (Child View Controllers Protocol) - 21 | 22 | @protocol DMPagerViewControllerProtocol 23 | 24 | // Return the item you want to show into DMPagerViewController's navigation bar 25 | - (DMPagerNavigationBarItem *) pagerItem; 26 | 27 | @end 28 | 29 | #pragma mark - DMPagerViewControllerDelegate (Delegate Protocol) - 30 | 31 | @protocol DMPagerViewControllerDelegate 32 | 33 | @optional 34 | // Called when a page change did occours 35 | - (void) pager:(DMPagerViewController *) aController didChangePageFrom:(NSInteger) aOldPage to:(NSInteger) aNewPage; 36 | // Called countinously during a scroll operation 37 | - (void) pager:(DMPagerViewController *) aController didScrollTo:(CGPoint) aOffset; 38 | 39 | @end 40 | 41 | #pragma mark - DMPagerViewController Class - 42 | 43 | @interface DMPagerViewController : UIViewController 44 | 45 | @property (nonatomic,retain) NSArray *controllers; // Child controllers 46 | @property (nonatomic,weak) id delegate; // Events delegate 47 | 48 | @property (nonatomic,readonly) UIScrollView *scrollView; // Main content scroll view (you should not use it generally) 49 | @property (nonatomic,assign) BOOL isScrollParallaxed; // YES to add parallax effect while dragging pages 50 | 51 | @property (nonatomic,readonly) NSInteger currentPage; // Current page (still valid during dragging operation) 52 | @property (nonatomic,readonly) NSInteger nextPage; // Next proposed page during drag operation 53 | 54 | @property (nonatomic,assign) DMPagerViewControllerAnimation animation; // Animation used for -setPageIndex:animated: (only animated) 55 | 56 | @property (nonatomic,assign) BOOL useNavigationBar; // YES to add a top navigation bar 57 | // (controller must implement DMPagerViewControllerProtocol protocol) 58 | @property (nonatomic,assign) BOOL isNavigationBarTouchable; // YES to make top navigation touchable 59 | @property (nonatomic,assign) CGFloat navigationBarHeight; // Height of the navigation bar 60 | @property (nonatomic,readonly) DMPagerNavigationBar *navigationBar; // Reference for navigation bar customizations 61 | @property (nonatomic,readonly) BOOL isFullScreen; // Is view controller presented as full screen view 62 | 63 | // Initialize controller with a set of child controllers 64 | - (instancetype) initWithViewControllers:(NSArray *) aControllers; 65 | 66 | // Move to a specified page 67 | - (void) setPageIndex:(NSInteger) aPageIndex animated:(BOOL) aAnimated; 68 | 69 | // Return controller instance for a specified page 70 | - (UIViewController *) controllerAtPage:(NSInteger) aPageIndex; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pod/Classes/DMPagerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DMPagerViewController.m 3 | // Pager controller like the one in Twitter or Tinder 4 | // 5 | // Created by Daniele Margutti (me@danielemargutti.com) on 11/01/15. 6 | // Copyright (c) 2015 http://www.danielemargutti.com All rights reserved. 7 | // Distribuited under MIT License http://opensource.org/licenses/MIT 8 | // 9 | 10 | #import "DMPagerViewController.h" 11 | 12 | static CGFloat kDeviationFactor = 0.5f; 13 | 14 | @interface DMPagerViewController () { 15 | // Scroll session variables 16 | NSInteger previousPage; 17 | NSInteger sessionCurrentPage; 18 | NSInteger sessionNextPage; 19 | CGFloat lastContentOffset; 20 | BOOL ignorePageChangeUntilDecelerated; 21 | } 22 | 23 | @end 24 | 25 | @implementation DMPagerViewController 26 | 27 | - (instancetype) initWithViewControllers:(NSArray *) aControllers { 28 | self = [super init]; 29 | if (self) { 30 | _scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; 31 | _scrollView.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth); 32 | _scrollView.backgroundColor = [UIColor whiteColor]; 33 | _scrollView.delegate = self; 34 | _scrollView.pagingEnabled = YES; 35 | _scrollView.showsHorizontalScrollIndicator = NO; 36 | _scrollView.showsVerticalScrollIndicator = NO; 37 | [self.view addSubview:_scrollView]; 38 | 39 | _navigationBarHeight = 44.0f; 40 | _isNavigationBarTouchable = YES; 41 | _useNavigationBar = YES; 42 | _isScrollParallaxed = YES; 43 | self.controllers = aControllers; 44 | } 45 | return self; 46 | } 47 | 48 | - (void)viewDidLoad { 49 | [super viewDidLoad]; 50 | // self.edgesForExtendedLayout = UIRectEdgeNone; 51 | // self.extendedLayoutIncludesOpaqueBars = NO; 52 | // self.automaticallyAdjustsScrollViewInsets = NO; 53 | } 54 | 55 | #pragma mark - Properties - 56 | 57 | - (BOOL) isFullScreen { 58 | return CGRectEqualToRect(self.view.bounds, [UIScreen mainScreen].bounds); 59 | } 60 | 61 | - (void)setNavigationBarHeight:(CGFloat)navigationBarHeight { 62 | if (_navigationBarHeight == navigationBarHeight) return; 63 | _navigationBarHeight = navigationBarHeight; 64 | [self adjustControllerLayout]; 65 | } 66 | 67 | - (NSInteger)currentPage { 68 | return lround( _scrollView.contentOffset.x / CGRectGetWidth(_scrollView.frame) ); 69 | } 70 | 71 | - (NSInteger)nextPage { 72 | NSInteger cPage = self.currentPage; 73 | return ( _scrollView.contentOffset.x < (cPage*CGRectGetWidth(_scrollView.frame)) ? cPage-1 : cPage+1); 74 | } 75 | 76 | - (void)setUseNavigationBar:(BOOL)useNavigationBar { 77 | _useNavigationBar = useNavigationBar; 78 | if (_useNavigationBar) { 79 | NSMutableArray *allItems = [NSMutableArray arrayWithCapacity:_controllers.count]; 80 | for (UIViewController *cViewController in _controllers) { 81 | if ([cViewController conformsToProtocol:@protocol(DMPagerViewControllerProtocol)]) 82 | [allItems addObject: [((UIViewController *)cViewController) pagerItem]]; 83 | else 84 | [NSException raise:NSCocoaErrorDomain format:@"UIViewController %@ <%p> does not conform to DMPagerViewControllerProtocol protocol",cViewController,cViewController]; 85 | } 86 | 87 | __typeof__(self) __weak weakSelf = self; 88 | _navigationBar = [[DMPagerNavigationBar alloc] initWithController:self]; 89 | _navigationBar.items = allItems; 90 | _navigationBar.style = DMPagerNavigationBarStyleDefault; 91 | _navigationBar.activeItemColor = self.view.window.tintColor; 92 | _navigationBar.inactiveItemColor = [UIColor darkGrayColor]; 93 | _navigationBar.action = ^(NSInteger idx,DMPagerNavigationBarItem *item) { 94 | if (weakSelf.isNavigationBarTouchable) 95 | [weakSelf setPageIndex:idx animated:YES]; 96 | }; 97 | [self.view addSubview:_navigationBar]; 98 | } else { 99 | [_navigationBar removeFromSuperview]; 100 | _navigationBar = nil; 101 | } 102 | [self adjustControllerLayout]; 103 | [self adjustPagerNavigationBarOnScroll]; 104 | } 105 | 106 | - (void) setPageIndex:(NSInteger) aPageIndex animated:(BOOL) aAnimated { 107 | if (aPageIndex < 0 || aPageIndex >= _controllers.count) 108 | return; 109 | 110 | CGPoint scrollOffset = CGPointMake( aPageIndex*CGRectGetWidth(_scrollView.frame), 0.0f); 111 | CGRect scrollRect = CGRectMake(scrollOffset.x, scrollOffset.y, _scrollView.frame.size.width, _scrollView.frame.size.height); 112 | 113 | if (!aAnimated) { 114 | [_scrollView setContentOffset:scrollOffset animated:NO]; 115 | return; 116 | } 117 | 118 | BOOL prevParallaxSettings = _isScrollParallaxed; 119 | _isScrollParallaxed = NO; 120 | [self adjustScrollViewSubviewsFrames]; 121 | 122 | switch (_animation) { 123 | case DMPagerViewControllerAnimationStandard: 124 | default: { 125 | [UIView animateWithDuration: 0.35 126 | animations:^{ 127 | [_scrollView setContentOffset:scrollOffset animated:NO]; 128 | } completion:^(BOOL finished) { 129 | _isScrollParallaxed = prevParallaxSettings; 130 | }]; 131 | break;} 132 | case DMPagerViewControllerAnimationEaseInOut: { 133 | [UIView animateWithDuration: 0.35f 134 | delay: 0.0f 135 | options: UIViewAnimationOptionCurveEaseInOut 136 | animations:^{ 137 | [_scrollView scrollRectToVisible: scrollRect animated:NO]; 138 | } 139 | completion:^(BOOL finished) { 140 | _isScrollParallaxed = prevParallaxSettings; 141 | }]; 142 | break;} 143 | case DMPagerViewControllerAnimationBounceStartEnd:{ 144 | CGFloat offset = .15*(scrollOffset.x - _scrollView.contentOffset.x); 145 | [UIView animateWithDuration: .35 146 | delay: 0.0f 147 | options: UIViewAnimationOptionCurveEaseInOut 148 | animations:^{ 149 | [_scrollView setContentOffset:CGPointMake(_scrollView.contentOffset.x-(offset/2), 0.0f) animated:NO]; 150 | } completion:^(BOOL finished){ 151 | [UIView animateWithDuration: .35 152 | delay: 0.0f 153 | options: UIViewAnimationOptionCurveEaseInOut 154 | animations:^{ 155 | [_scrollView setContentOffset:CGPointMake(scrollOffset.x+offset, 0.0f) animated:NO]; 156 | } completion:^(BOOL finished){ 157 | [UIView animateWithDuration:.35 animations:^{ 158 | [_scrollView setContentOffset:CGPointMake(scrollOffset.x, 0.0f) animated:NO]; 159 | } completion:^(BOOL finished) { 160 | _isScrollParallaxed = prevParallaxSettings; 161 | }]; 162 | }]; 163 | }]; 164 | break;} 165 | case DMPagerViewControllerAnimationBounceEnd: { 166 | CGFloat offset = .15*(scrollOffset.x - _scrollView.contentOffset.x); 167 | [UIView animateWithDuration: .35 168 | delay: 0.0f 169 | options: UIViewAnimationOptionCurveEaseInOut 170 | animations:^{ 171 | [_scrollView setContentOffset:CGPointMake(scrollOffset.x+offset, 0.0f) animated:NO]; 172 | } completion:^(BOOL finished){ 173 | [UIView animateWithDuration:.35 animations:^{ 174 | [_scrollView setContentOffset:CGPointMake(scrollOffset.x, 0.0f) animated:NO]; 175 | } completion:^(BOOL finished) { 176 | _isScrollParallaxed = prevParallaxSettings; 177 | }]; 178 | }]; 179 | break;} 180 | } 181 | } 182 | 183 | - (void)setControllers:(NSArray *)aControllers { 184 | if ([_controllers isEqualToArray:aControllers]) return; 185 | [_controllers makeObjectsPerformSelector:@selector(removeFromParentViewController)]; 186 | [_scrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 187 | 188 | _controllers = aControllers; 189 | [self adjustScrollViewSubviewsFrames]; 190 | self.useNavigationBar = self.useNavigationBar; 191 | previousPage = self.currentPage; 192 | } 193 | 194 | - (UIViewController *) controllerAtPage:(NSInteger) aPageIndex { 195 | if (aPageIndex < 0 || aPageIndex >= _controllers.count) return nil; 196 | return _controllers[aPageIndex]; 197 | } 198 | 199 | #pragma mark - Layout Routines - 200 | 201 | - (void) adjustPagerNavigationBarOnScroll { 202 | #pragma clang diagnostic push 203 | #pragma clang diagnostic ignored "-Wundeclared-selector" 204 | [_navigationBar performSelector:@selector(pagerScrollerDidScroll:) withObject: _scrollView]; 205 | #pragma clang diagnostic pop 206 | } 207 | 208 | - (void) adjustScrollViewSubviewsFrames { 209 | for (NSUInteger idx = 0; idx < _controllers.count; ++idx) { 210 | UIViewController *cViewController = _controllers[idx]; 211 | [self addChildViewController:cViewController]; 212 | 213 | CGRect cViewControllerFrame = CGRectMake( (idx*CGRectGetWidth(_scrollView.frame)), 0.0f, 214 | CGRectGetWidth(_scrollView.frame), CGRectGetHeight(_scrollView.frame)); 215 | cViewController.view.frame = cViewControllerFrame; 216 | [_scrollView addSubview:cViewController.view]; 217 | } 218 | } 219 | 220 | - (void) adjustControllerLayout { 221 | CGRect scrollViewFrame = CGRectZero; 222 | CGRect navigationBarFrame = CGRectZero; 223 | CGFloat navBarTotalHeight = _navigationBarHeight + (self.isFullScreen ? CGRectGetHeight([UIApplication sharedApplication].statusBarFrame)+kNavigationBarOffset : 0.0f); 224 | 225 | if (!_useNavigationBar) { 226 | scrollViewFrame = self.view.bounds; 227 | } else { 228 | navigationBarFrame = CGRectMake(0.0f, 0.0f,CGRectGetWidth(self.view.frame), navBarTotalHeight); 229 | scrollViewFrame = CGRectMake(0.0f, CGRectGetMaxY(navigationBarFrame) , 230 | CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame)-navBarTotalHeight); 231 | } 232 | _navigationBar.frame = navigationBarFrame; 233 | _scrollView.frame = scrollViewFrame; 234 | _scrollView.contentSize = CGSizeMake( _controllers.count*CGRectGetWidth(self.view.frame), CGRectGetHeight(scrollViewFrame)); 235 | } 236 | 237 | #pragma mark - ScrollView Events - 238 | 239 | - (void)scrollViewWillBeginDragging:(UIScrollView *)aScrollView { 240 | sessionCurrentPage = lround( aScrollView.contentOffset.x / CGRectGetWidth(aScrollView.frame) ); 241 | previousPage = sessionCurrentPage; 242 | } 243 | 244 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { 245 | [self adjustScrollViewSubviewsFrames]; 246 | ignorePageChangeUntilDecelerated = NO; 247 | } 248 | 249 | - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { 250 | ignorePageChangeUntilDecelerated = decelerate; 251 | 252 | if (self.delegate) 253 | [self.delegate pager:self didChangePageFrom:previousPage to:self.currentPage]; 254 | } 255 | 256 | - (void)scrollViewDidScroll:(UIScrollView *)aScrollView { 257 | [self adjustPagerNavigationBarOnScroll]; // Adjust navigation bar scrolling 258 | 259 | if ([_delegate respondsToSelector:@selector(pager:didScrollTo:)]) 260 | [self.delegate pager:self didScrollTo:aScrollView.contentOffset]; 261 | 262 | if (!_isScrollParallaxed) 263 | return; 264 | 265 | // Parallax effect on subviews 266 | if (!ignorePageChangeUntilDecelerated) 267 | sessionNextPage = (lastContentOffset > aScrollView.contentOffset.x ? (sessionCurrentPage-1) : (sessionCurrentPage+1)); 268 | 269 | UIViewController *nextVC = (sessionNextPage >= 0 && sessionNextPage < _controllers.count ? _controllers[sessionNextPage] : nil); 270 | UIViewController *currentVC = (sessionCurrentPage >= 0 && sessionCurrentPage < _controllers.count ? _controllers[sessionCurrentPage] : nil); 271 | CGFloat deviation = fabsf(aScrollView.contentOffset.x-(sessionCurrentPage*CGRectGetWidth(_scrollView.frame))); 272 | BOOL isMovingForward = (sessionNextPage > sessionCurrentPage); 273 | 274 | CGRect currentVCFrame = CGRectMake((sessionCurrentPage*CGRectGetWidth(self.view.frame)), 0.0f, 275 | CGRectGetWidth(_scrollView.frame), CGRectGetHeight(_scrollView.frame)); 276 | if (isMovingForward && currentVC) { 277 | [_scrollView bringSubviewToFront:nextVC.view]; 278 | currentVCFrame.origin.x += (deviation * kDeviationFactor); 279 | } else if (!isMovingForward && currentVC) { 280 | [_scrollView sendSubviewToBack:currentVC.view]; 281 | currentVCFrame.origin.x -= (deviation * kDeviationFactor); 282 | } 283 | currentVC.view.frame = currentVCFrame; 284 | lastContentOffset = aScrollView.contentOffset.x; 285 | } 286 | 287 | - (void)didReceiveMemoryWarning { 288 | [super didReceiveMemoryWarning]; 289 | } 290 | 291 | @end 292 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DMPagerViewController 2 | 3 | [![CI Status](http://img.shields.io/travis/Daniele Margutti/DMPagerViewController.svg?style=flat)](https://travis-ci.org/Daniele Margutti/DMPagerViewController) 4 | [![Version](https://img.shields.io/cocoapods/v/DMPagerViewController.svg?style=flat)](http://cocoadocs.org/docsets/DMPagerViewController) 5 | [![License](https://img.shields.io/cocoapods/l/DMPagerViewController.svg?style=flat)](http://cocoadocs.org/docsets/DMPagerViewController) 6 | [![Platform](https://img.shields.io/cocoapods/p/DMPagerViewController.svg?style=flat)](http://cocoadocs.org/docsets/DMPagerViewController) 7 | 8 | DMPagerViewController is a UIViewController subclass which mimics the navigation system used in Twitter and Tinder clients for iOS. It also add some special effects like icon tint color fade on scroll and page parallax effect during scroll. 9 | It also offer several configuration options you can easily see in .h file. 10 | Because an image worth more than thousand of words this is a short gif which show you the class. 11 | 12 |
13 | 14 |
15 | 16 |

17 | 18 | ## A short introduction 19 | 20 | To run the example project, clone the repo, and run `pod install` from your project. 21 | 22 | Then you can create a new DMPagerViewController which contains your child view controllers like this: 23 | 24 | ``` 25 | UIViewController * vc1 = ...; 26 | UIViewController * vc2 = ...; 27 | UIViewController * vc3 = ...; 28 | self.pagerController = [[DMPagerViewController alloc] initWithViewControllers: @[vc1,vc2,vc3]]; 29 | 30 | ``` 31 | 32 | Your child view controllers must be conform to `DMPagerViewControllerProtocol` protocol in order to return the appropriate item to show into the navigation bar (used only when `.useNavigationBar` is set to YES). 33 | 34 | So each view controller must implement: 35 | 36 | ``` 37 | - (DMPagerNavigationBarItem *)pagerItem { 38 | DMPagerNavigationBarItem *item; 39 | UIImage *itemIcon = ...; 40 | NSAttributedString *itemTitle = ...; 41 | item = [DMPagerNavigationBarItem newItemWithText:itemTitle andIcon: itemIcon]; 42 | item.renderingMode = DMPagerNavigationBarItemModeOnlyText; 43 | return item; 44 | } 45 | ``` 46 | 47 | Using `.renderingMode` you can decide what show for a specified item (the icon, icon and text or only the text). 48 | 49 | You can choose between three different transitions to use when moving programmatically between pages using `-setPageIndex:animated:`: 50 | 51 | ``` 52 | typedef NS_ENUM(NSInteger, DMPagerViewControllerAnimation) { 53 | // Standard UIScrollView animation 54 | DMPagerViewControllerAnimationStandard, 55 | // Ease In+Out animation on scroll 56 | DMPagerViewControllerAnimationEaseInOut, 57 | // Animation with final bounce 58 | DMPagerViewControllerAnimationBounceEnd, 59 | // Animation with initial+final bounce 60 | DMPagerViewControllerAnimationBounceStartEnd 61 | }; 62 | ``` 63 | 64 | Navigation Bar can also be customized (it's an UIView): you can decide what kind of transition (in term of colors) you want to use for navigation bar items: take a look at `.colorizeMode` (`DMPagerNavigationBarItemColorize`). 65 | Also you can decide the layout of the navigation bar itself via `.style` property (`DMPagerNavigationBarStyle`) 66 | 67 | You can push it from a navigation stack or put it into the root window. 68 | You can also access to navigationBar configuration via .navigationBar property. 69 | 70 | 71 | ## Requirements 72 | It works fine with iOS 8. Should work in iOS7 but I've not tested it. 73 | 74 | ## Installation 75 | 76 | DMPagerViewController is available through [CocoaPods](http://cocoapods.org). To install 77 | it, simply add the following line to your Podfile: 78 | 79 | pod "DMPagerViewController" 80 | 81 | ## Author 82 | 83 | Daniele Margutti 84 | Mail: [me@danielemargutti.com](mailto://me@danielemargutti.com) 85 | Web: [danielemargutti.com](http://www.danielemargutti.com) 86 | 87 | ## License 88 | 89 | DMPagerViewController is available under the MIT license. See the LICENSE file for more info. 90 | --------------------------------------------------------------------------------