├── .DS_Store ├── .gitignore ├── LICENSE ├── README.md ├── SlidingContainerViewController.podspec ├── SlidingContainerViewController.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── SlidingContainerViewController.xccheckout │ └── xcuserdata │ │ ├── Cem.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── dflabs.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── cem.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── SlidingContainerViewController.xcscheme │ │ └── xcschememanagement.plist │ └── dflabs.xcuserdatad │ └── xcschemes │ ├── SlidingContainerViewController.xcscheme │ └── xcschememanagement.plist ├── SlidingContainerViewController ├── .DS_Store ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── DemoViewController.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Source │ ├── SlidingContainerSliderView.swift │ └── SlidingContainerViewController.swift └── ViewController.swift ├── SlidingContainerViewControllerTests ├── Info.plist └── SlidingContainerViewControllerTests.swift └── demo.gif /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/a843cc5a99be00110977e876c15c508fc811e2eb/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/swift,xcode 3 | 4 | ### Swift ### 5 | # Xcode 6 | # 7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 8 | 9 | ## Build generated 10 | build/ 11 | DerivedData/ 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xcuserstate 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | *.dSYM.zip 32 | *.dSYM 33 | 34 | ## Playgrounds 35 | timeline.xctimeline 36 | playground.xcworkspace 37 | 38 | # Swift Package Manager 39 | # 40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 41 | # Packages/ 42 | .build/ 43 | 44 | # CocoaPods 45 | # 46 | # We recommend against adding the Pods directory to your .gitignore. However 47 | # you should judge for yourself, the pros and cons are mentioned at: 48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 49 | # 50 | Pods/ 51 | 52 | # Carthage 53 | # 54 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 55 | Carthage/Checkouts 56 | 57 | Carthage/Build 58 | 59 | # fastlane 60 | # 61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 62 | # screenshots whenever they are needed. 63 | # For more information about the recommended setup visit: 64 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 65 | 66 | fastlane/report.xml 67 | fastlane/Preview.html 68 | fastlane/screenshots 69 | fastlane/test_output 70 | 71 | 72 | ### Xcode ### 73 | # Xcode 74 | # 75 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 76 | 77 | ## Build generated 78 | 79 | ## Various settings 80 | 81 | ## Other 82 | *.xccheckout 83 | *.xcscmblueprint 84 | 85 | # Docs 86 | docs/ 87 | 88 | # End of https://www.gitignore.io/api/swift,xcode 89 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015, Cem Olcay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SlidingContainerViewController 2 | ============================== 3 | 4 | An [Android scrollable tab bar](http://developer.android.com/design/building-blocks/tabs.html#scrollable) style container view controller 5 | 6 | 7 | Demo 8 | ---- 9 | 10 | ![alt tag](https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/master/demo.gif) 11 | 12 | 13 | Install 14 | ----- 15 | 16 | #### Manual 17 | 18 | Copy & paste `Source` folder to your project 19 | 20 | #### Cocoapods 21 | 22 | ``` ruby 23 | use_frameworks! 24 | pod 'SlidingContainerViewController' 25 | ``` 26 | 27 | 28 | Usage 29 | ----- 30 | 31 | Create a `UIViewController` as container, setup your tab view controllers and implement `SlidingContainerViewController` and add its view to view controller's view like: 32 | 33 | ``` swift 34 | let slidingContainerViewController = SlidingContainerViewController ( 35 | parent: self, 36 | contentViewControllers: [vc1, vc2, vc3, vc4], 37 | titles: ["First", "Second", "Third", "Forth"]) 38 | 39 | view.addSubview(slidingContainerViewController.view) 40 | ``` 41 | 42 | 43 | SlidingContainerViewControllerDelegate 44 | --------------------------------------- 45 | 46 | ``` swift 47 | protocol SlidingContainerViewControllerDelegate { 48 | func slidingContainerViewControllerDidMoveToViewController (slidingContainerViewController: SlidingContainerViewController, viewController: UIViewController, atIndex: Int) 49 | func slidingContainerViewControllerDidHideSliderView (slidingContainerViewController: SlidingContainerViewController) 50 | func slidingContainerViewControllerDidShowSliderView (slidingContainerViewController: SlidingContainerViewController) 51 | } 52 | 53 | ``` 54 | 55 | 56 | SlidingContainerSliderView 57 | -------------------------- 58 | 59 | The tab bar slider view in the sliding container view controller. 60 | Fully customisable with its `appearance` property. 61 | 62 | 63 | SlidingContainerSliderViewAppearance 64 | ------------------------------------ 65 | 66 | ``` swift 67 | struct SlidingContainerSliderViewAppearance { 68 | var backgroundColor: UIColor 69 | 70 | var font: UIFont 71 | var selectedFont: UIFont 72 | 73 | var textColor: UIColor 74 | var selectedTextColor: UIColor 75 | 76 | var outerPadding: CGFloat 77 | var innerPadding: CGFloat 78 | 79 | var selectorColor: UIColor 80 | var selectorHeight: CGFloat 81 | } 82 | ``` 83 | -------------------------------------------------------------------------------- /SlidingContainerViewController.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint SlidingContainerViewController.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "SlidingContainerViewController" 19 | s.version = "0.0.1" 20 | s.summary = "An Android scrollable tab bar style container view controller" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | SlidingContainerViewController 29 | ============================== 30 | 31 | An [android scrollable tab bar](http://developer.android.com/design/building-blocks/tabs.html#scrollable) style container view controller 32 | 33 | 34 | Demo 35 | ---- 36 | 37 | ![alt tag](https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/master/demo.gif) 38 | 39 | 40 | Install 41 | ----- 42 | 43 | #### Manual 44 | 45 | Copy & paste `Source` folder to your project 46 | 47 | #### Cocoapods 48 | 49 | ``` 50 | use_frameworks! 51 | pod 'slidingContainerViewController' 52 | ``` 53 | 54 | 55 | Usage 56 | ----- 57 | 58 | Create a `UIViewController` as container, setup your tab view controllers and implement `SlidingContainerViewController` and add its view to view controller's view like: 59 | 60 | ``` swift 61 | let slidingContainerViewController = SlidingContainerViewController ( 62 | parent: self, 63 | contentViewControllers: [vc1, vc2, vc3, vc4], 64 | titles: ["First", "Second", "Third", "Forth"]) 65 | 66 | view.addSubview(slidingContainerViewController.view) 67 | ``` 68 | 69 | 70 | SlidingContainerViewControllerDelegate 71 | --------------------------------------- 72 | 73 | ``` swift 74 | protocol SlidingContainerViewControllerDelegate { 75 | func slidingContainerViewControllerDidMoveToViewController (slidingContainerViewController: SlidingContainerViewController, viewController: UIViewController, atIndex: Int) 76 | func slidingContainerViewControllerDidHideSliderView (slidingContainerViewController: SlidingContainerViewController) 77 | func slidingContainerViewControllerDidShowSliderView (slidingContainerViewController: SlidingContainerViewController) 78 | } 79 | 80 | ``` 81 | 82 | 83 | SlidingContainerSliderView 84 | -------------------------- 85 | 86 | The tab bar slider view in the sliding container view controller. 87 | Fully customisable with its `appearance` property. 88 | 89 | 90 | SlidingContainerSliderViewAppearance 91 | ------------------------------------ 92 | 93 | ``` swift 94 | struct SlidingContainerSliderViewAppearance { 95 | 96 | var backgroundColor: UIColor 97 | 98 | var font: UIFont 99 | var selectedFont: UIFont 100 | 101 | var textColor: UIColor 102 | var selectedTextColor: UIColor 103 | 104 | var outerPadding: CGFloat 105 | var innerPadding: CGFloat 106 | 107 | var selectorColor: UIColor 108 | var selectorHeight: CGFloat 109 | } 110 | ``` 111 | DESC 112 | 113 | s.homepage = "https://github.com/cemolcay/SlidingContainerViewController" 114 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 115 | 116 | 117 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 118 | # 119 | # Licensing your code is important. See http://choosealicense.com for more info. 120 | # CocoaPods will detect a license file if there is a named LICENSE* 121 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 122 | # 123 | 124 | s.license = "MIT" 125 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 126 | 127 | 128 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 129 | # 130 | # Specify the authors of the library, with email addresses. Email addresses 131 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 132 | # accepts just a name if you'd rather not provide an email address. 133 | # 134 | # Specify a social_media_url where others can refer to, for example a twitter 135 | # profile URL. 136 | # 137 | 138 | s.author = { "cemolcay" => "ccemolcay@gmail.com" } 139 | # Or just: s.author = "cemolcay" 140 | # s.authors = { "cemolcay" => "ccemolcay@gmail.com" } 141 | # s.social_media_url = "http://twitter.com/cemolcay" 142 | 143 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 144 | # 145 | # If this Pod runs only on iOS or OS X, then specify the platform and 146 | # the deployment target. You can optionally include the target after the platform. 147 | # 148 | 149 | # s.platform = :ios 150 | s.platform = :ios, "8.0" 151 | 152 | # When using multiple platforms 153 | # s.ios.deployment_target = "5.0" 154 | # s.osx.deployment_target = "10.7" 155 | # s.watchos.deployment_target = "2.0" 156 | # s.tvos.deployment_target = "9.0" 157 | 158 | 159 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 160 | # 161 | # Specify the location from where the source should be retrieved. 162 | # Supports git, hg, bzr, svn and HTTP. 163 | # 164 | 165 | s.source = { :git => "https://github.com/cemolcay/SlidingContainerViewController.git", :tag => "#{s.version}" } 166 | 167 | 168 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 169 | # 170 | # CocoaPods is smart about how it includes source code. For source files 171 | # giving a folder will include any swift, h, m, mm, c & cpp files. 172 | # For header files it will include any header in the folder. 173 | # Not including the public_header_files will make all headers public. 174 | # 175 | 176 | s.source_files = "SlidingContainerViewController/Source/*.swift" 177 | # s.exclude_files = "Classes/Exclude" 178 | 179 | # s.public_header_files = "Classes/**/*.h" 180 | 181 | 182 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 183 | # 184 | # A list of resources included with the Pod. These are copied into the 185 | # target bundle with a build phase script. Anything else will be cleaned. 186 | # You can preserve files from being cleaned, please don't preserve 187 | # non-essential files like tests, examples and documentation. 188 | # 189 | 190 | # s.resource = "icon.png" 191 | # s.resources = "Resources/*.png" 192 | 193 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 194 | 195 | 196 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 197 | # 198 | # Link your library with frameworks, or libraries. Libraries do not include 199 | # the lib prefix of their name. 200 | # 201 | 202 | # s.framework = "SomeFramework" 203 | # s.frameworks = "SomeFramework", "AnotherFramework" 204 | 205 | # s.library = "iconv" 206 | # s.libraries = "iconv", "xml2" 207 | 208 | 209 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 210 | # 211 | # If your library depends on compiler flags you can set them in the xcconfig hash 212 | # where they will only apply to your library. If you depend on other Podspecs 213 | # you can include multiple dependencies to ensure it works. 214 | 215 | s.requires_arc = true 216 | 217 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 218 | # s.dependency "JSONKit", "~> 1.4" 219 | 220 | end 221 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B2C64C831E8D386200E7B74F /* SlidingContainerSliderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C64C811E8D386200E7B74F /* SlidingContainerSliderView.swift */; }; 11 | B2C64C841E8D386200E7B74F /* SlidingContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C64C821E8D386200E7B74F /* SlidingContainerViewController.swift */; }; 12 | B2F387D71AD7C5200092872C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2F387D61AD7C5200092872C /* AppDelegate.swift */; }; 13 | B2F387D91AD7C5200092872C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2F387D81AD7C5200092872C /* ViewController.swift */; }; 14 | B2F387DC1AD7C5200092872C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2F387DA1AD7C5200092872C /* Main.storyboard */; }; 15 | B2F387DE1AD7C5200092872C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2F387DD1AD7C5200092872C /* Images.xcassets */; }; 16 | B2F387E11AD7C5200092872C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B2F387DF1AD7C5200092872C /* LaunchScreen.xib */; }; 17 | B2F387ED1AD7C5200092872C /* SlidingContainerViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2F387EC1AD7C5200092872C /* SlidingContainerViewControllerTests.swift */; }; 18 | B2F387FC1AD7CD740092872C /* DemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2F387FB1AD7CD740092872C /* DemoViewController.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | B2F387E71AD7C5200092872C /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = B2F387C91AD7C5200092872C /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = B2F387D01AD7C5200092872C; 27 | remoteInfo = SlidingContainerViewController; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | B2C64C811E8D386200E7B74F /* SlidingContainerSliderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SlidingContainerSliderView.swift; sourceTree = ""; }; 33 | B2C64C821E8D386200E7B74F /* SlidingContainerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SlidingContainerViewController.swift; sourceTree = ""; }; 34 | B2F387D11AD7C5200092872C /* SlidingContainerViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SlidingContainerViewController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | B2F387D51AD7C5200092872C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | B2F387D61AD7C5200092872C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | B2F387D81AD7C5200092872C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 38 | B2F387DB1AD7C5200092872C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 39 | B2F387DD1AD7C5200092872C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 40 | B2F387E01AD7C5200092872C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 41 | B2F387E61AD7C5200092872C /* SlidingContainerViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlidingContainerViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | B2F387EB1AD7C5200092872C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | B2F387EC1AD7C5200092872C /* SlidingContainerViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlidingContainerViewControllerTests.swift; sourceTree = ""; }; 44 | B2F387FB1AD7CD740092872C /* DemoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoViewController.swift; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | B2F387CE1AD7C5200092872C /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | B2F387E31AD7C5200092872C /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | B2C64C801E8D386200E7B74F /* Source */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | B2C64C811E8D386200E7B74F /* SlidingContainerSliderView.swift */, 69 | B2C64C821E8D386200E7B74F /* SlidingContainerViewController.swift */, 70 | ); 71 | path = Source; 72 | sourceTree = ""; 73 | }; 74 | B2F387C81AD7C5200092872C = { 75 | isa = PBXGroup; 76 | children = ( 77 | B2F387D31AD7C5200092872C /* SlidingContainerViewController */, 78 | B2F387E91AD7C5200092872C /* SlidingContainerViewControllerTests */, 79 | B2F387D21AD7C5200092872C /* Products */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | B2F387D21AD7C5200092872C /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | B2F387D11AD7C5200092872C /* SlidingContainerViewController.app */, 87 | B2F387E61AD7C5200092872C /* SlidingContainerViewControllerTests.xctest */, 88 | ); 89 | name = Products; 90 | sourceTree = ""; 91 | }; 92 | B2F387D31AD7C5200092872C /* SlidingContainerViewController */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | B2C64C801E8D386200E7B74F /* Source */, 96 | B2F387D61AD7C5200092872C /* AppDelegate.swift */, 97 | B2F387FB1AD7CD740092872C /* DemoViewController.swift */, 98 | B2F387D81AD7C5200092872C /* ViewController.swift */, 99 | B2F387DA1AD7C5200092872C /* Main.storyboard */, 100 | B2F387DD1AD7C5200092872C /* Images.xcassets */, 101 | B2F387DF1AD7C5200092872C /* LaunchScreen.xib */, 102 | B2F387D41AD7C5200092872C /* Supporting Files */, 103 | ); 104 | path = SlidingContainerViewController; 105 | sourceTree = ""; 106 | }; 107 | B2F387D41AD7C5200092872C /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | B2F387D51AD7C5200092872C /* Info.plist */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | B2F387E91AD7C5200092872C /* SlidingContainerViewControllerTests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | B2F387EC1AD7C5200092872C /* SlidingContainerViewControllerTests.swift */, 119 | B2F387EA1AD7C5200092872C /* Supporting Files */, 120 | ); 121 | path = SlidingContainerViewControllerTests; 122 | sourceTree = ""; 123 | }; 124 | B2F387EA1AD7C5200092872C /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | B2F387EB1AD7C5200092872C /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | B2F387D01AD7C5200092872C /* SlidingContainerViewController */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = B2F387F01AD7C5200092872C /* Build configuration list for PBXNativeTarget "SlidingContainerViewController" */; 138 | buildPhases = ( 139 | B2F387CD1AD7C5200092872C /* Sources */, 140 | B2F387CE1AD7C5200092872C /* Frameworks */, 141 | B2F387CF1AD7C5200092872C /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = SlidingContainerViewController; 148 | productName = SlidingContainerViewController; 149 | productReference = B2F387D11AD7C5200092872C /* SlidingContainerViewController.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | B2F387E51AD7C5200092872C /* SlidingContainerViewControllerTests */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = B2F387F31AD7C5200092872C /* Build configuration list for PBXNativeTarget "SlidingContainerViewControllerTests" */; 155 | buildPhases = ( 156 | B2F387E21AD7C5200092872C /* Sources */, 157 | B2F387E31AD7C5200092872C /* Frameworks */, 158 | B2F387E41AD7C5200092872C /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | B2F387E81AD7C5200092872C /* PBXTargetDependency */, 164 | ); 165 | name = SlidingContainerViewControllerTests; 166 | productName = SlidingContainerViewControllerTests; 167 | productReference = B2F387E61AD7C5200092872C /* SlidingContainerViewControllerTests.xctest */; 168 | productType = "com.apple.product-type.bundle.unit-test"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | B2F387C91AD7C5200092872C /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastUpgradeCheck = 0800; 177 | ORGANIZATIONNAME = "Cem Olcay"; 178 | TargetAttributes = { 179 | B2F387D01AD7C5200092872C = { 180 | CreatedOnToolsVersion = 6.3; 181 | LastSwiftMigration = 0800; 182 | }; 183 | B2F387E51AD7C5200092872C = { 184 | CreatedOnToolsVersion = 6.3; 185 | LastSwiftMigration = 0800; 186 | TestTargetID = B2F387D01AD7C5200092872C; 187 | }; 188 | }; 189 | }; 190 | buildConfigurationList = B2F387CC1AD7C5200092872C /* Build configuration list for PBXProject "SlidingContainerViewController" */; 191 | compatibilityVersion = "Xcode 3.2"; 192 | developmentRegion = English; 193 | hasScannedForEncodings = 0; 194 | knownRegions = ( 195 | en, 196 | Base, 197 | ); 198 | mainGroup = B2F387C81AD7C5200092872C; 199 | productRefGroup = B2F387D21AD7C5200092872C /* Products */; 200 | projectDirPath = ""; 201 | projectRoot = ""; 202 | targets = ( 203 | B2F387D01AD7C5200092872C /* SlidingContainerViewController */, 204 | B2F387E51AD7C5200092872C /* SlidingContainerViewControllerTests */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | B2F387CF1AD7C5200092872C /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | B2F387DC1AD7C5200092872C /* Main.storyboard in Resources */, 215 | B2F387E11AD7C5200092872C /* LaunchScreen.xib in Resources */, 216 | B2F387DE1AD7C5200092872C /* Images.xcassets in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | B2F387E41AD7C5200092872C /* Resources */ = { 221 | isa = PBXResourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXSourcesBuildPhase section */ 230 | B2F387CD1AD7C5200092872C /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | B2C64C831E8D386200E7B74F /* SlidingContainerSliderView.swift in Sources */, 235 | B2F387D91AD7C5200092872C /* ViewController.swift in Sources */, 236 | B2F387D71AD7C5200092872C /* AppDelegate.swift in Sources */, 237 | B2C64C841E8D386200E7B74F /* SlidingContainerViewController.swift in Sources */, 238 | B2F387FC1AD7CD740092872C /* DemoViewController.swift in Sources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | B2F387E21AD7C5200092872C /* Sources */ = { 243 | isa = PBXSourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | B2F387ED1AD7C5200092872C /* SlidingContainerViewControllerTests.swift in Sources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXSourcesBuildPhase section */ 251 | 252 | /* Begin PBXTargetDependency section */ 253 | B2F387E81AD7C5200092872C /* PBXTargetDependency */ = { 254 | isa = PBXTargetDependency; 255 | target = B2F387D01AD7C5200092872C /* SlidingContainerViewController */; 256 | targetProxy = B2F387E71AD7C5200092872C /* PBXContainerItemProxy */; 257 | }; 258 | /* End PBXTargetDependency section */ 259 | 260 | /* Begin PBXVariantGroup section */ 261 | B2F387DA1AD7C5200092872C /* Main.storyboard */ = { 262 | isa = PBXVariantGroup; 263 | children = ( 264 | B2F387DB1AD7C5200092872C /* Base */, 265 | ); 266 | name = Main.storyboard; 267 | sourceTree = ""; 268 | }; 269 | B2F387DF1AD7C5200092872C /* LaunchScreen.xib */ = { 270 | isa = PBXVariantGroup; 271 | children = ( 272 | B2F387E01AD7C5200092872C /* Base */, 273 | ); 274 | name = LaunchScreen.xib; 275 | sourceTree = ""; 276 | }; 277 | /* End PBXVariantGroup section */ 278 | 279 | /* Begin XCBuildConfiguration section */ 280 | B2F387EE1AD7C5200092872C /* Debug */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | ALWAYS_SEARCH_USER_PATHS = NO; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 291 | CLANG_WARN_EMPTY_BODY = YES; 292 | CLANG_WARN_ENUM_CONVERSION = YES; 293 | CLANG_WARN_INFINITE_RECURSION = YES; 294 | CLANG_WARN_INT_CONVERSION = YES; 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 296 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 297 | CLANG_WARN_UNREACHABLE_CODE = YES; 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 299 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 300 | COPY_PHASE_STRIP = NO; 301 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 302 | ENABLE_STRICT_OBJC_MSGSEND = YES; 303 | ENABLE_TESTABILITY = YES; 304 | GCC_C_LANGUAGE_STANDARD = gnu99; 305 | GCC_DYNAMIC_NO_PIC = NO; 306 | GCC_NO_COMMON_BLOCKS = YES; 307 | GCC_OPTIMIZATION_LEVEL = 0; 308 | GCC_PREPROCESSOR_DEFINITIONS = ( 309 | "DEBUG=1", 310 | "$(inherited)", 311 | ); 312 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 315 | GCC_WARN_UNDECLARED_SELECTOR = YES; 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 317 | GCC_WARN_UNUSED_FUNCTION = YES; 318 | GCC_WARN_UNUSED_VARIABLE = YES; 319 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 320 | MTL_ENABLE_DEBUG_INFO = YES; 321 | ONLY_ACTIVE_ARCH = YES; 322 | SDKROOT = iphoneos; 323 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 324 | TARGETED_DEVICE_FAMILY = "1,2"; 325 | }; 326 | name = Debug; 327 | }; 328 | B2F387EF1AD7C5200092872C /* Release */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INFINITE_RECURSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 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 = 8.3; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 364 | TARGETED_DEVICE_FAMILY = "1,2"; 365 | VALIDATE_PRODUCT = YES; 366 | }; 367 | name = Release; 368 | }; 369 | B2F387F11AD7C5200092872C /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | INFOPLIST_FILE = SlidingContainerViewController/Info.plist; 374 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 375 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 376 | PRODUCT_BUNDLE_IDENTIFIER = "com.questa.$(PRODUCT_NAME:rfc1034identifier)"; 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | SWIFT_VERSION = 3.0; 379 | }; 380 | name = Debug; 381 | }; 382 | B2F387F21AD7C5200092872C /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 386 | INFOPLIST_FILE = SlidingContainerViewController/Info.plist; 387 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 389 | PRODUCT_BUNDLE_IDENTIFIER = "com.questa.$(PRODUCT_NAME:rfc1034identifier)"; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | SWIFT_VERSION = 3.0; 392 | }; 393 | name = Release; 394 | }; 395 | B2F387F41AD7C5200092872C /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | BUNDLE_LOADER = "$(TEST_HOST)"; 399 | FRAMEWORK_SEARCH_PATHS = ( 400 | "$(SDKROOT)/Developer/Library/Frameworks", 401 | "$(inherited)", 402 | ); 403 | GCC_PREPROCESSOR_DEFINITIONS = ( 404 | "DEBUG=1", 405 | "$(inherited)", 406 | ); 407 | INFOPLIST_FILE = SlidingContainerViewControllerTests/Info.plist; 408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 409 | PRODUCT_BUNDLE_IDENTIFIER = "com.questa.$(PRODUCT_NAME:rfc1034identifier)"; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | SWIFT_VERSION = 3.0; 412 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlidingContainerViewController.app/SlidingContainerViewController"; 413 | }; 414 | name = Debug; 415 | }; 416 | B2F387F51AD7C5200092872C /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | BUNDLE_LOADER = "$(TEST_HOST)"; 420 | FRAMEWORK_SEARCH_PATHS = ( 421 | "$(SDKROOT)/Developer/Library/Frameworks", 422 | "$(inherited)", 423 | ); 424 | INFOPLIST_FILE = SlidingContainerViewControllerTests/Info.plist; 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 426 | PRODUCT_BUNDLE_IDENTIFIER = "com.questa.$(PRODUCT_NAME:rfc1034identifier)"; 427 | PRODUCT_NAME = "$(TARGET_NAME)"; 428 | SWIFT_VERSION = 3.0; 429 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlidingContainerViewController.app/SlidingContainerViewController"; 430 | }; 431 | name = Release; 432 | }; 433 | /* End XCBuildConfiguration section */ 434 | 435 | /* Begin XCConfigurationList section */ 436 | B2F387CC1AD7C5200092872C /* Build configuration list for PBXProject "SlidingContainerViewController" */ = { 437 | isa = XCConfigurationList; 438 | buildConfigurations = ( 439 | B2F387EE1AD7C5200092872C /* Debug */, 440 | B2F387EF1AD7C5200092872C /* Release */, 441 | ); 442 | defaultConfigurationIsVisible = 0; 443 | defaultConfigurationName = Release; 444 | }; 445 | B2F387F01AD7C5200092872C /* Build configuration list for PBXNativeTarget "SlidingContainerViewController" */ = { 446 | isa = XCConfigurationList; 447 | buildConfigurations = ( 448 | B2F387F11AD7C5200092872C /* Debug */, 449 | B2F387F21AD7C5200092872C /* Release */, 450 | ); 451 | defaultConfigurationIsVisible = 0; 452 | defaultConfigurationName = Release; 453 | }; 454 | B2F387F31AD7C5200092872C /* Build configuration list for PBXNativeTarget "SlidingContainerViewControllerTests" */ = { 455 | isa = XCConfigurationList; 456 | buildConfigurations = ( 457 | B2F387F41AD7C5200092872C /* Debug */, 458 | B2F387F51AD7C5200092872C /* Release */, 459 | ); 460 | defaultConfigurationIsVisible = 0; 461 | defaultConfigurationName = Release; 462 | }; 463 | /* End XCConfigurationList section */ 464 | }; 465 | rootObject = B2F387C91AD7C5200092872C /* Project object */; 466 | } 467 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/project.xcworkspace/xcshareddata/SlidingContainerViewController.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 29DAB10D-4A9C-4759-91E7-317AF812C956 9 | IDESourceControlProjectName 10 | SlidingContainerViewController 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 73FF466759DB3206DD1BBBA76B15E50BD2F0ED61 14 | https://github.com/cemolcay/SlidingContainerViewController.git 15 | 16 | IDESourceControlProjectPath 17 | SlidingContainerViewController.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 73FF466759DB3206DD1BBBA76B15E50BD2F0ED61 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/cemolcay/SlidingContainerViewController.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 73FF466759DB3206DD1BBBA76B15E50BD2F0ED61 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 73FF466759DB3206DD1BBBA76B15E50BD2F0ED61 36 | IDESourceControlWCCName 37 | SlidingContainerViewController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/project.xcworkspace/xcuserdata/Cem.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/a843cc5a99be00110977e876c15c508fc811e2eb/SlidingContainerViewController.xcodeproj/project.xcworkspace/xcuserdata/Cem.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/project.xcworkspace/xcuserdata/dflabs.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/a843cc5a99be00110977e876c15c508fc811e2eb/SlidingContainerViewController.xcodeproj/project.xcworkspace/xcuserdata/dflabs.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/xcuserdata/cem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/xcuserdata/cem.xcuserdatad/xcschemes/SlidingContainerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/xcuserdata/cem.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SlidingContainerViewController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B2F387D01AD7C5200092872C 16 | 17 | primary 18 | 19 | 20 | B2F387E51AD7C5200092872C 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/xcuserdata/dflabs.xcuserdatad/xcschemes/SlidingContainerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /SlidingContainerViewController.xcodeproj/xcuserdata/dflabs.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SlidingContainerViewController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | B2F387D01AD7C5200092872C 16 | 17 | primary 18 | 19 | 20 | B2F387E51AD7C5200092872C 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SlidingContainerViewController/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/a843cc5a99be00110977e876c15c508fc811e2eb/SlidingContainerViewController/.DS_Store -------------------------------------------------------------------------------- /SlidingContainerViewController/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SlidingContainerViewController 4 | // 5 | // Created by Cem Olcay on 10/04/15. 6 | // Copyright (c) 2015 Cem Olcay. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SlidingContainerViewController/Base.lproj/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 | -------------------------------------------------------------------------------- /SlidingContainerViewController/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /SlidingContainerViewController/DemoViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoViewController.swift 3 | // SlidingContainerViewController 4 | // 5 | // Created by Cem Olcay on 10/04/15. 6 | // Copyright (c) 2015 Cem Olcay. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DemoViewController: UIViewController, SlidingContainerViewControllerDelegate { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | navigationItem.title = "Demo" 16 | navigationController?.navigationBar.titleTextAttributes = [ 17 | NSFontAttributeName: UIFont(name: "HelveticaNeue-Light", size: 20)! 18 | ] 19 | } 20 | 21 | override func viewDidAppear(_ animated: Bool) { 22 | super.viewDidAppear(animated) 23 | 24 | let vc1 = viewControllerWithColorAndTitle(UIColor.white, title: "First View Controller") 25 | let vc2 = viewControllerWithColorAndTitle(UIColor.white, title: "Second View Controller") 26 | let vc3 = viewControllerWithColorAndTitle(UIColor.white, title: "Third View Controller") 27 | let vc4 = viewControllerWithColorAndTitle(UIColor.white, title: "Forth View Controller") 28 | 29 | let slidingContainerViewController = SlidingContainerViewController ( 30 | parent: self, 31 | contentViewControllers: [vc1, vc2, vc3, vc4], 32 | titles: ["First", "Second", "Third", "Forth"]) 33 | 34 | view.addSubview(slidingContainerViewController.view) 35 | 36 | slidingContainerViewController.sliderView.appearance.outerPadding = 0 37 | slidingContainerViewController.sliderView.appearance.innerPadding = 50 38 | slidingContainerViewController.sliderView.appearance.fixedWidth = true 39 | slidingContainerViewController.setCurrentViewControllerAtIndex(0) 40 | slidingContainerViewController.delegate = self 41 | } 42 | 43 | func viewControllerWithColorAndTitle (_ color: UIColor, title: String) -> UIViewController { 44 | let vc = UIViewController () 45 | vc.view.backgroundColor = color 46 | 47 | let label = UILabel (frame: vc.view.frame) 48 | label.textColor = UIColor.black 49 | label.textAlignment = .center 50 | label.font = UIFont (name: "HelveticaNeue-Light", size: 25) 51 | label.text = title 52 | 53 | label.sizeToFit() 54 | label.center = view.center 55 | 56 | vc.view.addSubview(label) 57 | 58 | return vc 59 | } 60 | 61 | // MARK: SlidingContainerViewControllerDelegate 62 | 63 | func slidingContainerViewControllerDidMoveToViewController(_ slidingContainerViewController: SlidingContainerViewController, viewController: UIViewController, atIndex: Int) { 64 | 65 | } 66 | 67 | func slidingContainerViewControllerDidShowSliderView(_ slidingContainerViewController: SlidingContainerViewController) { 68 | 69 | } 70 | 71 | func slidingContainerViewControllerDidHideSliderView(_ slidingContainerViewController: SlidingContainerViewController) { 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /SlidingContainerViewController/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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SlidingContainerViewController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SlidingContainerViewController/Source/SlidingContainerSliderView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingContainerSliderView.swift 3 | // SlidingContainerViewController 4 | // 5 | // Created by Cem Olcay on 10/04/15. 6 | // Copyright (c) 2015 Cem Olcay. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public struct SlidingContainerSliderViewAppearance { 12 | public var backgroundColor: UIColor 13 | public var font: UIFont 14 | public var selectedFont: UIFont 15 | public var textColor: UIColor 16 | public var selectedTextColor: UIColor 17 | public var outerPadding: CGFloat 18 | public var innerPadding: CGFloat 19 | public var selectorColor: UIColor 20 | public var selectorHeight: CGFloat 21 | public var fixedWidth: Bool 22 | } 23 | 24 | public protocol SlidingContainerSliderViewDelegate: class { 25 | func slidingContainerSliderViewDidPressed (_ slidingtContainerSliderView: SlidingContainerSliderView, atIndex: Int) 26 | } 27 | 28 | public class SlidingContainerSliderView: UIScrollView, UIScrollViewDelegate { 29 | public var shouldSlide: Bool = true 30 | public var sliderHeight: CGFloat = 44 31 | public var titles: [String]! 32 | public var labels: [UILabel] = [] 33 | public var selector: UIView! 34 | public weak var sliderDelegate: SlidingContainerSliderViewDelegate? 35 | 36 | public var appearance: SlidingContainerSliderViewAppearance! { 37 | didSet { 38 | draw() 39 | } 40 | } 41 | 42 | // MARK: Init 43 | 44 | public init(width: CGFloat, titles: [String]) { 45 | super.init(frame: CGRect (x: 0, y: 0, width: width, height: sliderHeight)) 46 | self.titles = titles 47 | 48 | delegate = self 49 | showsHorizontalScrollIndicator = false 50 | showsVerticalScrollIndicator = false 51 | scrollsToTop = false 52 | 53 | appearance = SlidingContainerSliderViewAppearance ( 54 | backgroundColor: UIColor(white: 0, alpha: 0.3), 55 | font: UIFont (name: "HelveticaNeue-Light", size: 15)!, 56 | selectedFont: UIFont.systemFont(ofSize: 15), 57 | textColor: UIColor.darkGray, 58 | selectedTextColor: UIColor.white, 59 | outerPadding: 10, 60 | innerPadding: 10, 61 | selectorColor: UIColor.red, 62 | selectorHeight: 5, 63 | fixedWidth: false) 64 | 65 | draw() 66 | } 67 | 68 | public required init(coder aDecoder: NSCoder) { 69 | super.init(coder: aDecoder)! 70 | } 71 | 72 | // MARK: Draw 73 | 74 | public func draw() { 75 | // clean 76 | if labels.count > 0 { 77 | for label in labels { 78 | label.removeFromSuperview() 79 | if selector != nil { 80 | selector.removeFromSuperview() 81 | selector = nil 82 | } 83 | } 84 | } 85 | 86 | labels = [] 87 | backgroundColor = appearance.backgroundColor 88 | 89 | if appearance.fixedWidth { 90 | var labelTag = 0 91 | let width = CGFloat(frame.size.width) / CGFloat(titles.count) 92 | 93 | for title in titles { 94 | let label = labelWithTitle(title) 95 | label.frame.origin.x = (width * CGFloat(labelTag)) 96 | label.frame.size = CGSize(width: width, height: label.frame.size.height) 97 | label.center.y = frame.size.height/2 98 | labelTag += 1 99 | label.tag = labelTag 100 | 101 | addSubview(label) 102 | labels.append(label) 103 | } 104 | 105 | let selectorH = appearance.selectorHeight 106 | selector = UIView (frame: CGRect (x: 0, y: frame.size.height - selectorH, width: width, height: selectorH)) 107 | selector.backgroundColor = appearance.selectorColor 108 | addSubview(selector) 109 | 110 | contentSize = CGSize (width: frame.size.width, height: frame.size.height) 111 | } else { 112 | var labelTag = 0 113 | var currentX = appearance.outerPadding 114 | 115 | for title in titles { 116 | let label = labelWithTitle(title) 117 | label.frame.origin.x = currentX 118 | label.center.y = frame.size.height/2 119 | labelTag += 1 120 | label.tag = labelTag 121 | 122 | addSubview(label) 123 | labels.append(label) 124 | currentX += label.frame.size.width + appearance.outerPadding 125 | } 126 | 127 | let selectorH = appearance.selectorHeight 128 | selector = UIView (frame: CGRect (x: 0, y: frame.size.height - selectorH, width: 100, height: selectorH)) 129 | selector.backgroundColor = appearance.selectorColor 130 | addSubview(selector) 131 | 132 | contentSize = CGSize (width: currentX, height: frame.size.height) 133 | } 134 | } 135 | 136 | public func labelWithTitle(_ title: String) -> UILabel { 137 | let label = UILabel (frame: CGRect (x: 0, y: 0, width: 0, height: 0)) 138 | label.text = title 139 | label.font = appearance.font 140 | label.textColor = appearance.textColor 141 | label.textAlignment = .center 142 | label.sizeToFit() 143 | label.frame.size.width += appearance.innerPadding * 2 144 | label.addGestureRecognizer(UITapGestureRecognizer ( 145 | target: self, 146 | action: #selector(SlidingContainerSliderView.didTap(_:)))) 147 | label.isUserInteractionEnabled = true 148 | return label 149 | } 150 | 151 | // MARK: Actions 152 | 153 | public func didTap(_ tap: UITapGestureRecognizer) { 154 | self.sliderDelegate?.slidingContainerSliderViewDidPressed(self, atIndex: tap.view!.tag - 1) 155 | } 156 | 157 | // MARK: Menu 158 | 159 | public func selectItemAtIndex(_ index: Int) { 160 | // Set Labels 161 | for i in 0.. sliderView.frame.size.width && sliderView.shouldSlide == true { 162 | sliderView.contentOffset = CGPoint (x: sliderW * ratio, y: 0) 163 | } 164 | } 165 | 166 | public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 167 | let index = scrollView.contentOffset.x / contentScrollView.frame.size.width 168 | setCurrentViewControllerAtIndex(Int(index)) 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /SlidingContainerViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SlidingContainerViewController 4 | // 5 | // Created by Cem Olcay on 10/04/15. 6 | // Copyright (c) 2015 Cem Olcay. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController, UIScrollViewDelegate { 12 | 13 | var smallSlider: UIScrollView! 14 | var bigSlider: UIScrollView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | smallSlider = UIScrollView (frame: CGRect (x: 0, y: 0, width: view.frame.size.width, height: view.frame.size.height/2)) 20 | bigSlider = UIScrollView (frame: CGRect (x: 0, y: smallSlider.frame.size.height, width: view.frame.size.width, height: view.frame.size.height/2)) 21 | 22 | smallSlider.backgroundColor = UIColor.red 23 | bigSlider.backgroundColor = UIColor.yellow 24 | 25 | smallSlider.contentSize = CGSize (width: 1000, height: smallSlider.frame.size.height) 26 | bigSlider.contentSize = CGSize (width: 500, height: bigSlider.frame.size.height) 27 | 28 | smallSlider.delegate = self 29 | bigSlider.delegate = self 30 | 31 | view.addSubview(smallSlider) 32 | view.addSubview(bigSlider) 33 | 34 | let gradient = CAGradientLayer() 35 | gradient.frame = CGRect (x: 0, y: 0, width: smallSlider.contentSize.width, height: smallSlider.frame.height) 36 | gradient.colors = [UIColor.white.cgColor, UIColor.black.cgColor] 37 | gradient.locations = [0, 1] 38 | gradient.startPoint = CGPoint(x: 0.0, y: 1.0) 39 | gradient.endPoint = CGPoint(x: 1.0, y: 1.0) 40 | smallSlider.layer.addSublayer(gradient) 41 | 42 | smallSlider.bounces = false 43 | } 44 | 45 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 46 | if scrollView == bigSlider { 47 | 48 | let bigContent = bigSlider.contentSize.width - bigSlider.frame.size.width 49 | let smallContent = smallSlider.contentSize.width - smallSlider.frame.size.width 50 | 51 | let current = bigSlider.contentOffset.x 52 | let ratio = current / bigContent 53 | 54 | smallSlider.contentOffset = CGPoint (x: smallContent * ratio, y: 0) 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /SlidingContainerViewControllerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SlidingContainerViewControllerTests/SlidingContainerViewControllerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SlidingContainerViewControllerTests.swift 3 | // SlidingContainerViewControllerTests 4 | // 5 | // Created by Cem Olcay on 10/04/15. 6 | // Copyright (c) 2015 Cem Olcay. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class SlidingContainerViewControllerTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/a843cc5a99be00110977e876c15c508fc811e2eb/demo.gif --------------------------------------------------------------------------------