├── .gitignore ├── GRKContainerViewController.h ├── GRKContainerViewController.podspec ├── GRKContainerViewController.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ └── GRKContainerViewController.xcscheme ├── GRKContainerViewController ├── GRKContainerViewController.h ├── GRKContainerViewController.m └── Info.plist ├── GRKContainerViewControllerTestApp ├── GRKContainerViewControllerTestApp.xcodeproj │ └── project.pbxproj ├── GRKContainerViewControllerTestApp │ ├── Base.lproj │ │ ├── Main_iPad.storyboard │ │ └── Main_iPhone.storyboard │ ├── GRKAppDelegate.h │ ├── GRKAppDelegate.m │ ├── GRKContainerViewControllerTestApp-Info.plist │ ├── GRKContainerViewControllerTestApp-Prefix.pch │ ├── GRKFirstViewController.h │ ├── GRKFirstViewController.m │ ├── GRKSecondViewController.h │ ├── GRKSecondViewController.m │ ├── GRKThirdViewController.h │ ├── GRKThirdViewController.m │ ├── GRKViewController.h │ ├── GRKViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m └── GRKContainerViewControllerTestAppTests │ ├── GRKContainerViewControllerTestAppTests-Info.plist │ ├── GRKContainerViewControllerTestAppTests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE.txt ├── README.md └── ReadmeAssets ├── Demo.gif └── storyboard.png /.gitignore: -------------------------------------------------------------------------------- 1 | *.lock 2 | .DS_Store 3 | xcuserdata 4 | project.xcworkspace 5 | Build -------------------------------------------------------------------------------- /GRKContainerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKContainerViewController.h 3 | // 4 | // Created by Cap'n Slipp on 6/27/16. 5 | // Copyright (c) 2013, 2014 Levi Brown 6 | // This work is licensed under the Creative Commons Attribution 3.0 7 | // Unported License. To view a copy of this license, visit 8 | // http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative 9 | // Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, 10 | // USA. 11 | // 12 | // The above attribution and the included license must accompany any version 13 | // of the source code. Visible attribution in any binary distributable 14 | // including this work (or derivatives) is not required, but would be 15 | // appreciated. 16 | // 17 | 18 | #import 19 | 20 | //! Project version number for GRKContainerViewController. 21 | FOUNDATION_EXPORT double GRKContainerViewControllerVersionNumber = 1.2; 22 | 23 | //! Project version string for GRKContainerViewController. 24 | FOUNDATION_EXPORT const unsigned char GRKContainerViewControllerVersionString[] = "1.2"; 25 | 26 | 27 | #import 28 | 29 | 30 | -------------------------------------------------------------------------------- /GRKContainerViewController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "GRKContainerViewController" 3 | s.version = "1.2" 4 | s.summary = "A simple container view controller used to easily swap contained controllers with optional animation." 5 | s.description = <<-DESC 6 | A container UIViewController providing the ability to easily transition from one contained view controller to another. 7 | DESC 8 | s.homepage = "https://github.com/levigroker/GRKContainerViewController" 9 | s.license = 'Creative Commons Attribution 3.0 Unported License' 10 | s.author = { "Levi Brown" => "levigroker@gmail.com" } 11 | s.social_media_url = 'https://twitter.com/levigroker' 12 | s.source = { :git => "https://github.com/levigroker/GRKContainerViewController.git", :tag => s.version.to_s } 13 | s.platform = :ios, '7.1' 14 | s.ios.deployment_target = '6.0' 15 | s.source_files = 'GRKContainerViewController/**/*.{h,m}' 16 | s.requires_arc = true 17 | end 18 | -------------------------------------------------------------------------------- /GRKContainerViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FAD57D8F1D21E91F001A76C1 /* GRKContainerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD57D8E1D21E91F001A76C1 /* GRKContainerViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | FAD57D971D21E992001A76C1 /* GRKContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FAD57D961D21E992001A76C1 /* GRKContainerViewController.m */; }; 12 | FAD57DAE1D21EDCD001A76C1 /* GRKContainerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD57DAD1D21EDCD001A76C1 /* GRKContainerViewController.h */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | FAD57D8B1D21E91F001A76C1 /* GRKContainerViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GRKContainerViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 17 | FAD57D8E1D21E91F001A76C1 /* GRKContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GRKContainerViewController.h; sourceTree = ""; }; 18 | FAD57D901D21E91F001A76C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 19 | FAD57D961D21E992001A76C1 /* GRKContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRKContainerViewController.m; sourceTree = ""; }; 20 | FAD57DAD1D21EDCD001A76C1 /* GRKContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRKContainerViewController.h; sourceTree = ""; }; 21 | /* End PBXFileReference section */ 22 | 23 | /* Begin PBXFrameworksBuildPhase section */ 24 | FAD57D871D21E91F001A76C1 /* Frameworks */ = { 25 | isa = PBXFrameworksBuildPhase; 26 | buildActionMask = 2147483647; 27 | files = ( 28 | ); 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXFrameworksBuildPhase section */ 32 | 33 | /* Begin PBXGroup section */ 34 | FAD57D811D21E91F001A76C1 = { 35 | isa = PBXGroup; 36 | children = ( 37 | FAD57DAD1D21EDCD001A76C1 /* GRKContainerViewController.h */, 38 | FAD57D8D1D21E91F001A76C1 /* GRKContainerViewController */, 39 | FAD57D8C1D21E91F001A76C1 /* Products */, 40 | ); 41 | sourceTree = ""; 42 | }; 43 | FAD57D8C1D21E91F001A76C1 /* Products */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | FAD57D8B1D21E91F001A76C1 /* GRKContainerViewController.framework */, 47 | ); 48 | name = Products; 49 | sourceTree = ""; 50 | }; 51 | FAD57D8D1D21E91F001A76C1 /* GRKContainerViewController */ = { 52 | isa = PBXGroup; 53 | children = ( 54 | FAD57D901D21E91F001A76C1 /* Info.plist */, 55 | FAD57D8E1D21E91F001A76C1 /* GRKContainerViewController.h */, 56 | FAD57D961D21E992001A76C1 /* GRKContainerViewController.m */, 57 | ); 58 | path = GRKContainerViewController; 59 | sourceTree = ""; 60 | }; 61 | /* End PBXGroup section */ 62 | 63 | /* Begin PBXHeadersBuildPhase section */ 64 | FAD57D881D21E91F001A76C1 /* Headers */ = { 65 | isa = PBXHeadersBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | FAD57DAE1D21EDCD001A76C1 /* GRKContainerViewController.h in Headers */, 69 | FAD57D8F1D21E91F001A76C1 /* GRKContainerViewController.h in Headers */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXHeadersBuildPhase section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | FAD57D8A1D21E91F001A76C1 /* GRKContainerViewController */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = FAD57D931D21E91F001A76C1 /* Build configuration list for PBXNativeTarget "GRKContainerViewController" */; 79 | buildPhases = ( 80 | FAD57D861D21E91F001A76C1 /* Sources */, 81 | FAD57D871D21E91F001A76C1 /* Frameworks */, 82 | FAD57D881D21E91F001A76C1 /* Headers */, 83 | FAD57D891D21E91F001A76C1 /* Resources */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = GRKContainerViewController; 90 | productName = GRKContainerViewController; 91 | productReference = FAD57D8B1D21E91F001A76C1 /* GRKContainerViewController.framework */; 92 | productType = "com.apple.product-type.framework"; 93 | }; 94 | /* End PBXNativeTarget section */ 95 | 96 | /* Begin PBXProject section */ 97 | FAD57D821D21E91F001A76C1 /* Project object */ = { 98 | isa = PBXProject; 99 | attributes = { 100 | LastUpgradeCheck = 0730; 101 | ORGANIZATIONNAME = "Cap'n Slipp"; 102 | TargetAttributes = { 103 | FAD57D8A1D21E91F001A76C1 = { 104 | CreatedOnToolsVersion = 7.3.1; 105 | }; 106 | }; 107 | }; 108 | buildConfigurationList = FAD57D851D21E91F001A76C1 /* Build configuration list for PBXProject "GRKContainerViewController" */; 109 | compatibilityVersion = "Xcode 3.2"; 110 | developmentRegion = English; 111 | hasScannedForEncodings = 0; 112 | knownRegions = ( 113 | English, 114 | en, 115 | ); 116 | mainGroup = FAD57D811D21E91F001A76C1; 117 | productRefGroup = FAD57D8C1D21E91F001A76C1 /* Products */; 118 | projectDirPath = ""; 119 | projectRoot = ""; 120 | targets = ( 121 | FAD57D8A1D21E91F001A76C1 /* GRKContainerViewController */, 122 | ); 123 | }; 124 | /* End PBXProject section */ 125 | 126 | /* Begin PBXResourcesBuildPhase section */ 127 | FAD57D891D21E91F001A76C1 /* Resources */ = { 128 | isa = PBXResourcesBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | ); 132 | runOnlyForDeploymentPostprocessing = 0; 133 | }; 134 | /* End PBXResourcesBuildPhase section */ 135 | 136 | /* Begin PBXSourcesBuildPhase section */ 137 | FAD57D861D21E91F001A76C1 /* Sources */ = { 138 | isa = PBXSourcesBuildPhase; 139 | buildActionMask = 2147483647; 140 | files = ( 141 | FAD57D971D21E992001A76C1 /* GRKContainerViewController.m in Sources */, 142 | ); 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | /* End PBXSourcesBuildPhase section */ 146 | 147 | /* Begin XCBuildConfiguration section */ 148 | FAD57D911D21E91F001A76C1 /* Debug */ = { 149 | isa = XCBuildConfiguration; 150 | buildSettings = { 151 | ALWAYS_SEARCH_USER_PATHS = NO; 152 | CLANG_ANALYZER_NONNULL = YES; 153 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 154 | CLANG_CXX_LIBRARY = "libc++"; 155 | CLANG_ENABLE_MODULES = YES; 156 | CLANG_ENABLE_OBJC_ARC = YES; 157 | CLANG_WARN_BOOL_CONVERSION = YES; 158 | CLANG_WARN_CONSTANT_CONVERSION = YES; 159 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 160 | CLANG_WARN_EMPTY_BODY = YES; 161 | CLANG_WARN_ENUM_CONVERSION = YES; 162 | CLANG_WARN_INT_CONVERSION = YES; 163 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 164 | CLANG_WARN_UNREACHABLE_CODE = YES; 165 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 166 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 167 | COPY_PHASE_STRIP = NO; 168 | CURRENT_PROJECT_VERSION = 1.2; 169 | DEBUG_INFORMATION_FORMAT = dwarf; 170 | ENABLE_STRICT_OBJC_MSGSEND = YES; 171 | ENABLE_TESTABILITY = YES; 172 | GCC_C_LANGUAGE_STANDARD = gnu99; 173 | GCC_DYNAMIC_NO_PIC = NO; 174 | GCC_NO_COMMON_BLOCKS = YES; 175 | GCC_OPTIMIZATION_LEVEL = 0; 176 | GCC_PREPROCESSOR_DEFINITIONS = ( 177 | "DEBUG=1", 178 | "$(inherited)", 179 | ); 180 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 181 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 182 | GCC_WARN_UNDECLARED_SELECTOR = YES; 183 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 184 | GCC_WARN_UNUSED_FUNCTION = YES; 185 | GCC_WARN_UNUSED_VARIABLE = YES; 186 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 187 | MTL_ENABLE_DEBUG_INFO = YES; 188 | ONLY_ACTIVE_ARCH = YES; 189 | SDKROOT = iphoneos; 190 | TARGETED_DEVICE_FAMILY = "1,2"; 191 | VERSIONING_SYSTEM = "apple-generic"; 192 | VERSION_INFO_PREFIX = ""; 193 | }; 194 | name = Debug; 195 | }; 196 | FAD57D921D21E91F001A76C1 /* Release */ = { 197 | isa = XCBuildConfiguration; 198 | buildSettings = { 199 | ALWAYS_SEARCH_USER_PATHS = NO; 200 | CLANG_ANALYZER_NONNULL = YES; 201 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 202 | CLANG_CXX_LIBRARY = "libc++"; 203 | CLANG_ENABLE_MODULES = YES; 204 | CLANG_ENABLE_OBJC_ARC = YES; 205 | CLANG_WARN_BOOL_CONVERSION = YES; 206 | CLANG_WARN_CONSTANT_CONVERSION = YES; 207 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 208 | CLANG_WARN_EMPTY_BODY = YES; 209 | CLANG_WARN_ENUM_CONVERSION = YES; 210 | CLANG_WARN_INT_CONVERSION = YES; 211 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 212 | CLANG_WARN_UNREACHABLE_CODE = YES; 213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 214 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 215 | COPY_PHASE_STRIP = NO; 216 | CURRENT_PROJECT_VERSION = 1.2; 217 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 218 | ENABLE_NS_ASSERTIONS = NO; 219 | ENABLE_STRICT_OBJC_MSGSEND = YES; 220 | GCC_C_LANGUAGE_STANDARD = gnu99; 221 | GCC_NO_COMMON_BLOCKS = YES; 222 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 224 | GCC_WARN_UNDECLARED_SELECTOR = YES; 225 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 226 | GCC_WARN_UNUSED_FUNCTION = YES; 227 | GCC_WARN_UNUSED_VARIABLE = YES; 228 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 229 | MTL_ENABLE_DEBUG_INFO = NO; 230 | SDKROOT = iphoneos; 231 | TARGETED_DEVICE_FAMILY = "1,2"; 232 | VALIDATE_PRODUCT = YES; 233 | VERSIONING_SYSTEM = "apple-generic"; 234 | VERSION_INFO_PREFIX = ""; 235 | }; 236 | name = Release; 237 | }; 238 | FAD57D941D21E91F001A76C1 /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | DEFINES_MODULE = YES; 242 | DYLIB_COMPATIBILITY_VERSION = 1; 243 | DYLIB_CURRENT_VERSION = 1; 244 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 245 | INFOPLIST_FILE = GRKContainerViewController/Info.plist; 246 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 247 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 248 | PRODUCT_BUNDLE_IDENTIFIER = com.levigroker.GRKContainerViewController; 249 | PRODUCT_NAME = "$(TARGET_NAME)"; 250 | SKIP_INSTALL = YES; 251 | }; 252 | name = Debug; 253 | }; 254 | FAD57D951D21E91F001A76C1 /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | DEFINES_MODULE = YES; 258 | DYLIB_COMPATIBILITY_VERSION = 1; 259 | DYLIB_CURRENT_VERSION = 1; 260 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 261 | INFOPLIST_FILE = GRKContainerViewController/Info.plist; 262 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 263 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 264 | PRODUCT_BUNDLE_IDENTIFIER = com.levigroker.GRKContainerViewController; 265 | PRODUCT_NAME = "$(TARGET_NAME)"; 266 | SKIP_INSTALL = YES; 267 | }; 268 | name = Release; 269 | }; 270 | /* End XCBuildConfiguration section */ 271 | 272 | /* Begin XCConfigurationList section */ 273 | FAD57D851D21E91F001A76C1 /* Build configuration list for PBXProject "GRKContainerViewController" */ = { 274 | isa = XCConfigurationList; 275 | buildConfigurations = ( 276 | FAD57D911D21E91F001A76C1 /* Debug */, 277 | FAD57D921D21E91F001A76C1 /* Release */, 278 | ); 279 | defaultConfigurationIsVisible = 0; 280 | defaultConfigurationName = Release; 281 | }; 282 | FAD57D931D21E91F001A76C1 /* Build configuration list for PBXNativeTarget "GRKContainerViewController" */ = { 283 | isa = XCConfigurationList; 284 | buildConfigurations = ( 285 | FAD57D941D21E91F001A76C1 /* Debug */, 286 | FAD57D951D21E91F001A76C1 /* Release */, 287 | ); 288 | defaultConfigurationIsVisible = 0; 289 | defaultConfigurationName = Release; 290 | }; 291 | /* End XCConfigurationList section */ 292 | }; 293 | rootObject = FAD57D821D21E91F001A76C1 /* Project object */; 294 | } 295 | -------------------------------------------------------------------------------- /GRKContainerViewController.xcodeproj/xcshareddata/xcschemes/GRKContainerViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /GRKContainerViewController/GRKContainerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKContainerViewController.h 3 | // 4 | // Created by Levi Brown on November 23, 2013. 5 | // Copyright (c) 2013, 2014 Levi Brown 6 | // This work is licensed under the Creative Commons Attribution 3.0 7 | // Unported License. To view a copy of this license, visit 8 | // http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative 9 | // Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, 10 | // USA. 11 | // 12 | // The above attribution and the included license must accompany any version 13 | // of the source code. Visible attribution in any binary distributable 14 | // including this work (or derivatives) is not required, but would be 15 | // appreciated. 16 | // 17 | 18 | #import 19 | 20 | /** 21 | * The default animation duration for the transition to the new view controller. 22 | */ 23 | extern NSTimeInterval const kDefaultAnimationDuration; 24 | 25 | /// 26 | /// @name GRKContainerViewController 27 | /// 28 | 29 | NS_ASSUME_NONNULL_BEGIN 30 | 31 | @interface GRKContainerViewController : UIViewController 32 | 33 | /** 34 | * The current view controller. Changes to this property will not be animated. 35 | */ 36 | @property (nonatomic,strong,nullable) UIViewController *viewController; 37 | 38 | /** 39 | * The animation duration to use for the transition animation (if applicable). Defaults to `kDefaultAnimationDuration`. 40 | * @see kDefaultAnimationDuration 41 | */ 42 | @property (nonatomic,assign) NSTimeInterval transitionAnimationDuration; 43 | 44 | /** 45 | * Set the currently displayed view controller with an optional cross fade animation and completion handler. 46 | * 47 | * @param viewController The new view controler to be displayed. 48 | * @param animated If YES then a simple cross fade animation will be applied during the tranistion from the current view controller to the new view controller. 49 | * @param completion A block to be called once the new view controller is displayed (after any animations). This can be `nil`. 50 | */ 51 | - (void)setViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void(^_Nullable)(UIViewController *viewController))completion; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /GRKContainerViewController/GRKContainerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKContainerViewController.h 3 | // 4 | // Created by Levi Brown on November 23, 2013. 5 | // Copyright (c) 2013, 2014 Levi Brown 6 | // This work is licensed under the Creative Commons Attribution 3.0 7 | // Unported License. To view a copy of this license, visit 8 | // http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative 9 | // Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, 10 | // USA. 11 | // 12 | // The above attribution and the included license must accompany any version 13 | // of the source code. Visible attribution in any binary distributable 14 | // including this work (or derivatives) is not required, but would be 15 | // appreciated. 16 | // 17 | 18 | #import "GRKContainerViewController.h" 19 | 20 | NSTimeInterval const kDefaultAnimationDuration = 0.5f; 21 | 22 | @implementation GRKContainerViewController 23 | 24 | #pragma mark - Lifecycle 25 | 26 | - (instancetype)init 27 | { 28 | if ((self = [super init])) 29 | { 30 | [self setup]; 31 | } 32 | 33 | return self; 34 | } 35 | 36 | - (instancetype)initWithCoder:(NSCoder *)aDecoder 37 | { 38 | if ((self = [super initWithCoder:aDecoder])) 39 | { 40 | [self setup]; 41 | } 42 | 43 | return self; 44 | } 45 | 46 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 47 | { 48 | if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) 49 | { 50 | [self setup]; 51 | } 52 | 53 | return self; 54 | } 55 | 56 | - (void)setup 57 | { 58 | _transitionAnimationDuration = kDefaultAnimationDuration; 59 | } 60 | 61 | #pragma mark - API Implementation 62 | 63 | - (void)setViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void(^)(UIViewController *viewController))completion 64 | { 65 | if ([self.viewController isEqual:viewController]) 66 | { 67 | if (completion) 68 | { 69 | //Call the completion block with the view controller 70 | completion(viewController); 71 | } 72 | } 73 | else 74 | { 75 | //Ensure the view is loaded 76 | [self view]; 77 | 78 | //We will use a simple cross fade animation, as indicated 79 | NSTimeInterval duration = animated ? self.transitionAnimationDuration : 0.0f; 80 | 81 | // We're fading out views, so make sure they're not invisible when we start. 82 | self.viewController.view.alpha = 1.0f; 83 | viewController.view.alpha = 1.0f; 84 | 85 | //Add the new view controller to the view and view controller hierarchies 86 | if (viewController) 87 | { 88 | [self addChildViewController:viewController]; 89 | 90 | // Add the new view below the current view, and then fade out the current view. 91 | [self.view addSubview:viewController.view]; 92 | [self.view insertSubview:viewController.view belowSubview:self.viewController.view]; 93 | [viewController didMoveToParentViewController:self]; 94 | 95 | //Setup constraints to keep the new view pinned to our size. 96 | UIView *containedView = viewController.view; 97 | containedView.translatesAutoresizingMaskIntoConstraints = NO; 98 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[containedView]|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(containedView)]]; 99 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[containedView]|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(containedView)]]; 100 | } 101 | 102 | // Hold onto the old controller, and set the new one. 103 | UIViewController *oldViewController = self.viewController; 104 | _viewController = viewController; 105 | 106 | [UIView animateWithDuration:duration animations:^{ 107 | // Animate away the old controller view. 108 | oldViewController.view.alpha = 0.0f; 109 | } completion:^(BOOL finished) { 110 | // Quick transitions can leave us trying to remove the view that has just been added. Only remove it if its not the same controller. 111 | if (_viewController != oldViewController) { 112 | [oldViewController willMoveToParentViewController:nil]; 113 | [oldViewController.view removeFromSuperview]; 114 | [oldViewController removeFromParentViewController]; 115 | } 116 | 117 | if (completion) 118 | { 119 | //Call the completion block with the new view controller 120 | completion(viewController); 121 | } 122 | }]; 123 | } 124 | } 125 | 126 | #pragma mark - Accessors 127 | 128 | - (void)setViewController:(UIViewController *)viewController 129 | { 130 | [self setViewController:viewController animated:NO completion:nil]; 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /GRKContainerViewController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(CURRENT_PROJECT_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DBDC0E8F18DB603400B470D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0E8E18DB603400B470D6 /* Foundation.framework */; }; 11 | DBDC0E9118DB603400B470D6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0E9018DB603400B470D6 /* CoreGraphics.framework */; }; 12 | DBDC0E9318DB603400B470D6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0E9218DB603400B470D6 /* UIKit.framework */; }; 13 | DBDC0E9918DB603400B470D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DBDC0E9718DB603400B470D6 /* InfoPlist.strings */; }; 14 | DBDC0E9B18DB603400B470D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0E9A18DB603400B470D6 /* main.m */; }; 15 | DBDC0E9F18DB603500B470D6 /* GRKAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0E9E18DB603500B470D6 /* GRKAppDelegate.m */; }; 16 | DBDC0EA218DB603500B470D6 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DBDC0EA018DB603500B470D6 /* Main_iPhone.storyboard */; }; 17 | DBDC0EA518DB603500B470D6 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DBDC0EA318DB603500B470D6 /* Main_iPad.storyboard */; }; 18 | DBDC0EA818DB603500B470D6 /* GRKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0EA718DB603500B470D6 /* GRKViewController.m */; }; 19 | DBDC0EAA18DB603500B470D6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DBDC0EA918DB603500B470D6 /* Images.xcassets */; }; 20 | DBDC0EB118DB603500B470D6 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0EB018DB603500B470D6 /* XCTest.framework */; }; 21 | DBDC0EB218DB603500B470D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0E8E18DB603400B470D6 /* Foundation.framework */; }; 22 | DBDC0EB318DB603500B470D6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC0E9218DB603400B470D6 /* UIKit.framework */; }; 23 | DBDC0EBB18DB603500B470D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DBDC0EB918DB603500B470D6 /* InfoPlist.strings */; }; 24 | DBDC0EBD18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0EBC18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.m */; }; 25 | DBDC0EC918DB606200B470D6 /* GRKContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0EC818DB606200B470D6 /* GRKContainerViewController.m */; }; 26 | DBDC0ECA18DB606200B470D6 /* GRKContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0EC818DB606200B470D6 /* GRKContainerViewController.m */; }; 27 | DBDC0ECD18DB6A8A00B470D6 /* GRKFirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ECC18DB6A8A00B470D6 /* GRKFirstViewController.m */; }; 28 | DBDC0ECE18DB6A8A00B470D6 /* GRKFirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ECC18DB6A8A00B470D6 /* GRKFirstViewController.m */; }; 29 | DBDC0ED118DB6A9800B470D6 /* GRKSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ED018DB6A9800B470D6 /* GRKSecondViewController.m */; }; 30 | DBDC0ED218DB6A9800B470D6 /* GRKSecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ED018DB6A9800B470D6 /* GRKSecondViewController.m */; }; 31 | DBDC0ED518DB6AA300B470D6 /* GRKThirdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ED418DB6AA300B470D6 /* GRKThirdViewController.m */; }; 32 | DBDC0ED618DB6AA300B470D6 /* GRKThirdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDC0ED418DB6AA300B470D6 /* GRKThirdViewController.m */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | DBDC0EB418DB603500B470D6 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = DBDC0E8318DB603400B470D6 /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = DBDC0E8A18DB603400B470D6; 41 | remoteInfo = GRKContainerViewControllerTestApp; 42 | }; 43 | /* End PBXContainerItemProxy section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | DBDC0E8B18DB603400B470D6 /* GRKContainerViewControllerTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRKContainerViewControllerTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | DBDC0E8E18DB603400B470D6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 48 | DBDC0E9018DB603400B470D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 49 | DBDC0E9218DB603400B470D6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 50 | DBDC0E9618DB603400B470D6 /* GRKContainerViewControllerTestApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GRKContainerViewControllerTestApp-Info.plist"; sourceTree = ""; }; 51 | DBDC0E9818DB603400B470D6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 52 | DBDC0E9A18DB603400B470D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 53 | DBDC0E9C18DB603500B470D6 /* GRKContainerViewControllerTestApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GRKContainerViewControllerTestApp-Prefix.pch"; sourceTree = ""; }; 54 | DBDC0E9D18DB603500B470D6 /* GRKAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GRKAppDelegate.h; sourceTree = ""; }; 55 | DBDC0E9E18DB603500B470D6 /* GRKAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GRKAppDelegate.m; sourceTree = ""; }; 56 | DBDC0EA118DB603500B470D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; 57 | DBDC0EA418DB603500B470D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; 58 | DBDC0EA618DB603500B470D6 /* GRKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GRKViewController.h; sourceTree = ""; }; 59 | DBDC0EA718DB603500B470D6 /* GRKViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GRKViewController.m; sourceTree = ""; }; 60 | DBDC0EA918DB603500B470D6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 61 | DBDC0EAF18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRKContainerViewControllerTestAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | DBDC0EB018DB603500B470D6 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 63 | DBDC0EB818DB603500B470D6 /* GRKContainerViewControllerTestAppTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GRKContainerViewControllerTestAppTests-Info.plist"; sourceTree = ""; }; 64 | DBDC0EBA18DB603500B470D6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 65 | DBDC0EBC18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GRKContainerViewControllerTestAppTests.m; sourceTree = ""; }; 66 | DBDC0EC718DB606200B470D6 /* GRKContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRKContainerViewController.h; sourceTree = ""; }; 67 | DBDC0EC818DB606200B470D6 /* GRKContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRKContainerViewController.m; sourceTree = ""; }; 68 | DBDC0ECB18DB6A8A00B470D6 /* GRKFirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRKFirstViewController.h; sourceTree = ""; }; 69 | DBDC0ECC18DB6A8A00B470D6 /* GRKFirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRKFirstViewController.m; sourceTree = ""; }; 70 | DBDC0ECF18DB6A9800B470D6 /* GRKSecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRKSecondViewController.h; sourceTree = ""; }; 71 | DBDC0ED018DB6A9800B470D6 /* GRKSecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRKSecondViewController.m; sourceTree = ""; }; 72 | DBDC0ED318DB6AA300B470D6 /* GRKThirdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRKThirdViewController.h; sourceTree = ""; }; 73 | DBDC0ED418DB6AA300B470D6 /* GRKThirdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRKThirdViewController.m; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | DBDC0E8818DB603400B470D6 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | DBDC0E9118DB603400B470D6 /* CoreGraphics.framework in Frameworks */, 82 | DBDC0E9318DB603400B470D6 /* UIKit.framework in Frameworks */, 83 | DBDC0E8F18DB603400B470D6 /* Foundation.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | DBDC0EAC18DB603500B470D6 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | DBDC0EB118DB603500B470D6 /* XCTest.framework in Frameworks */, 92 | DBDC0EB318DB603500B470D6 /* UIKit.framework in Frameworks */, 93 | DBDC0EB218DB603500B470D6 /* Foundation.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | /* End PBXFrameworksBuildPhase section */ 98 | 99 | /* Begin PBXGroup section */ 100 | DBDC0E8218DB603400B470D6 = { 101 | isa = PBXGroup; 102 | children = ( 103 | DBDC0EC618DB606200B470D6 /* GRKContainerViewController */, 104 | DBDC0E9418DB603400B470D6 /* GRKContainerViewControllerTestApp */, 105 | DBDC0EB618DB603500B470D6 /* GRKContainerViewControllerTestAppTests */, 106 | DBDC0E8D18DB603400B470D6 /* Frameworks */, 107 | DBDC0E8C18DB603400B470D6 /* Products */, 108 | ); 109 | sourceTree = ""; 110 | }; 111 | DBDC0E8C18DB603400B470D6 /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | DBDC0E8B18DB603400B470D6 /* GRKContainerViewControllerTestApp.app */, 115 | DBDC0EAF18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.xctest */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | DBDC0E8D18DB603400B470D6 /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | DBDC0E8E18DB603400B470D6 /* Foundation.framework */, 124 | DBDC0E9018DB603400B470D6 /* CoreGraphics.framework */, 125 | DBDC0E9218DB603400B470D6 /* UIKit.framework */, 126 | DBDC0EB018DB603500B470D6 /* XCTest.framework */, 127 | ); 128 | name = Frameworks; 129 | sourceTree = ""; 130 | }; 131 | DBDC0E9418DB603400B470D6 /* GRKContainerViewControllerTestApp */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | DBDC0EA318DB603500B470D6 /* Main_iPad.storyboard */, 135 | DBDC0EA018DB603500B470D6 /* Main_iPhone.storyboard */, 136 | DBDC0E9D18DB603500B470D6 /* GRKAppDelegate.h */, 137 | DBDC0E9E18DB603500B470D6 /* GRKAppDelegate.m */, 138 | DBDC0ECB18DB6A8A00B470D6 /* GRKFirstViewController.h */, 139 | DBDC0ECC18DB6A8A00B470D6 /* GRKFirstViewController.m */, 140 | DBDC0ECF18DB6A9800B470D6 /* GRKSecondViewController.h */, 141 | DBDC0ED018DB6A9800B470D6 /* GRKSecondViewController.m */, 142 | DBDC0ED318DB6AA300B470D6 /* GRKThirdViewController.h */, 143 | DBDC0ED418DB6AA300B470D6 /* GRKThirdViewController.m */, 144 | DBDC0EA618DB603500B470D6 /* GRKViewController.h */, 145 | DBDC0EA718DB603500B470D6 /* GRKViewController.m */, 146 | DBDC0EA918DB603500B470D6 /* Images.xcassets */, 147 | DBDC0E9518DB603400B470D6 /* Supporting Files */, 148 | ); 149 | path = GRKContainerViewControllerTestApp; 150 | sourceTree = ""; 151 | }; 152 | DBDC0E9518DB603400B470D6 /* Supporting Files */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | DBDC0E9618DB603400B470D6 /* GRKContainerViewControllerTestApp-Info.plist */, 156 | DBDC0E9718DB603400B470D6 /* InfoPlist.strings */, 157 | DBDC0E9A18DB603400B470D6 /* main.m */, 158 | DBDC0E9C18DB603500B470D6 /* GRKContainerViewControllerTestApp-Prefix.pch */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | DBDC0EB618DB603500B470D6 /* GRKContainerViewControllerTestAppTests */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | DBDC0EBC18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.m */, 167 | DBDC0EB718DB603500B470D6 /* Supporting Files */, 168 | ); 169 | path = GRKContainerViewControllerTestAppTests; 170 | sourceTree = ""; 171 | }; 172 | DBDC0EB718DB603500B470D6 /* Supporting Files */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | DBDC0EB818DB603500B470D6 /* GRKContainerViewControllerTestAppTests-Info.plist */, 176 | DBDC0EB918DB603500B470D6 /* InfoPlist.strings */, 177 | ); 178 | name = "Supporting Files"; 179 | sourceTree = ""; 180 | }; 181 | DBDC0EC618DB606200B470D6 /* GRKContainerViewController */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | DBDC0EC718DB606200B470D6 /* GRKContainerViewController.h */, 185 | DBDC0EC818DB606200B470D6 /* GRKContainerViewController.m */, 186 | ); 187 | name = GRKContainerViewController; 188 | path = ../GRKContainerViewController; 189 | sourceTree = ""; 190 | }; 191 | /* End PBXGroup section */ 192 | 193 | /* Begin PBXNativeTarget section */ 194 | DBDC0E8A18DB603400B470D6 /* GRKContainerViewControllerTestApp */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = DBDC0EC018DB603500B470D6 /* Build configuration list for PBXNativeTarget "GRKContainerViewControllerTestApp" */; 197 | buildPhases = ( 198 | DBDC0E8718DB603400B470D6 /* Sources */, 199 | DBDC0E8818DB603400B470D6 /* Frameworks */, 200 | DBDC0E8918DB603400B470D6 /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | ); 206 | name = GRKContainerViewControllerTestApp; 207 | productName = GRKContainerViewControllerTestApp; 208 | productReference = DBDC0E8B18DB603400B470D6 /* GRKContainerViewControllerTestApp.app */; 209 | productType = "com.apple.product-type.application"; 210 | }; 211 | DBDC0EAE18DB603500B470D6 /* GRKContainerViewControllerTestAppTests */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = DBDC0EC318DB603500B470D6 /* Build configuration list for PBXNativeTarget "GRKContainerViewControllerTestAppTests" */; 214 | buildPhases = ( 215 | DBDC0EAB18DB603500B470D6 /* Sources */, 216 | DBDC0EAC18DB603500B470D6 /* Frameworks */, 217 | DBDC0EAD18DB603500B470D6 /* Resources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | DBDC0EB518DB603500B470D6 /* PBXTargetDependency */, 223 | ); 224 | name = GRKContainerViewControllerTestAppTests; 225 | productName = GRKContainerViewControllerTestAppTests; 226 | productReference = DBDC0EAF18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.xctest */; 227 | productType = "com.apple.product-type.bundle.unit-test"; 228 | }; 229 | /* End PBXNativeTarget section */ 230 | 231 | /* Begin PBXProject section */ 232 | DBDC0E8318DB603400B470D6 /* Project object */ = { 233 | isa = PBXProject; 234 | attributes = { 235 | CLASSPREFIX = GRK; 236 | LastUpgradeCheck = 0510; 237 | ORGANIZATIONNAME = "Levi Brown"; 238 | TargetAttributes = { 239 | DBDC0EAE18DB603500B470D6 = { 240 | TestTargetID = DBDC0E8A18DB603400B470D6; 241 | }; 242 | }; 243 | }; 244 | buildConfigurationList = DBDC0E8618DB603400B470D6 /* Build configuration list for PBXProject "GRKContainerViewControllerTestApp" */; 245 | compatibilityVersion = "Xcode 3.2"; 246 | developmentRegion = English; 247 | hasScannedForEncodings = 0; 248 | knownRegions = ( 249 | en, 250 | Base, 251 | ); 252 | mainGroup = DBDC0E8218DB603400B470D6; 253 | productRefGroup = DBDC0E8C18DB603400B470D6 /* Products */; 254 | projectDirPath = ""; 255 | projectRoot = ""; 256 | targets = ( 257 | DBDC0E8A18DB603400B470D6 /* GRKContainerViewControllerTestApp */, 258 | DBDC0EAE18DB603500B470D6 /* GRKContainerViewControllerTestAppTests */, 259 | ); 260 | }; 261 | /* End PBXProject section */ 262 | 263 | /* Begin PBXResourcesBuildPhase section */ 264 | DBDC0E8918DB603400B470D6 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | DBDC0EA518DB603500B470D6 /* Main_iPad.storyboard in Resources */, 269 | DBDC0EAA18DB603500B470D6 /* Images.xcassets in Resources */, 270 | DBDC0EA218DB603500B470D6 /* Main_iPhone.storyboard in Resources */, 271 | DBDC0E9918DB603400B470D6 /* InfoPlist.strings in Resources */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | DBDC0EAD18DB603500B470D6 /* Resources */ = { 276 | isa = PBXResourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | DBDC0EBB18DB603500B470D6 /* InfoPlist.strings in Resources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | /* End PBXResourcesBuildPhase section */ 284 | 285 | /* Begin PBXSourcesBuildPhase section */ 286 | DBDC0E8718DB603400B470D6 /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | DBDC0EA818DB603500B470D6 /* GRKViewController.m in Sources */, 291 | DBDC0EC918DB606200B470D6 /* GRKContainerViewController.m in Sources */, 292 | DBDC0E9B18DB603400B470D6 /* main.m in Sources */, 293 | DBDC0ED118DB6A9800B470D6 /* GRKSecondViewController.m in Sources */, 294 | DBDC0ECD18DB6A8A00B470D6 /* GRKFirstViewController.m in Sources */, 295 | DBDC0ED518DB6AA300B470D6 /* GRKThirdViewController.m in Sources */, 296 | DBDC0E9F18DB603500B470D6 /* GRKAppDelegate.m in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | DBDC0EAB18DB603500B470D6 /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | DBDC0ECE18DB6A8A00B470D6 /* GRKFirstViewController.m in Sources */, 305 | DBDC0EBD18DB603500B470D6 /* GRKContainerViewControllerTestAppTests.m in Sources */, 306 | DBDC0ECA18DB606200B470D6 /* GRKContainerViewController.m in Sources */, 307 | DBDC0ED218DB6A9800B470D6 /* GRKSecondViewController.m in Sources */, 308 | DBDC0ED618DB6AA300B470D6 /* GRKThirdViewController.m in Sources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | /* End PBXSourcesBuildPhase section */ 313 | 314 | /* Begin PBXTargetDependency section */ 315 | DBDC0EB518DB603500B470D6 /* PBXTargetDependency */ = { 316 | isa = PBXTargetDependency; 317 | target = DBDC0E8A18DB603400B470D6 /* GRKContainerViewControllerTestApp */; 318 | targetProxy = DBDC0EB418DB603500B470D6 /* PBXContainerItemProxy */; 319 | }; 320 | /* End PBXTargetDependency section */ 321 | 322 | /* Begin PBXVariantGroup section */ 323 | DBDC0E9718DB603400B470D6 /* InfoPlist.strings */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | DBDC0E9818DB603400B470D6 /* en */, 327 | ); 328 | name = InfoPlist.strings; 329 | sourceTree = ""; 330 | }; 331 | DBDC0EA018DB603500B470D6 /* Main_iPhone.storyboard */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | DBDC0EA118DB603500B470D6 /* Base */, 335 | ); 336 | name = Main_iPhone.storyboard; 337 | sourceTree = ""; 338 | }; 339 | DBDC0EA318DB603500B470D6 /* Main_iPad.storyboard */ = { 340 | isa = PBXVariantGroup; 341 | children = ( 342 | DBDC0EA418DB603500B470D6 /* Base */, 343 | ); 344 | name = Main_iPad.storyboard; 345 | sourceTree = ""; 346 | }; 347 | DBDC0EB918DB603500B470D6 /* InfoPlist.strings */ = { 348 | isa = PBXVariantGroup; 349 | children = ( 350 | DBDC0EBA18DB603500B470D6 /* en */, 351 | ); 352 | name = InfoPlist.strings; 353 | sourceTree = ""; 354 | }; 355 | /* End PBXVariantGroup section */ 356 | 357 | /* Begin XCBuildConfiguration section */ 358 | DBDC0EBE18DB603500B470D6 /* Debug */ = { 359 | isa = XCBuildConfiguration; 360 | buildSettings = { 361 | ALWAYS_SEARCH_USER_PATHS = NO; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BOOL_CONVERSION = YES; 367 | CLANG_WARN_CONSTANT_CONVERSION = YES; 368 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 369 | CLANG_WARN_EMPTY_BODY = YES; 370 | CLANG_WARN_ENUM_CONVERSION = YES; 371 | CLANG_WARN_INT_CONVERSION = YES; 372 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 373 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 374 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 375 | COPY_PHASE_STRIP = NO; 376 | GCC_C_LANGUAGE_STANDARD = gnu99; 377 | GCC_DYNAMIC_NO_PIC = NO; 378 | GCC_OPTIMIZATION_LEVEL = 0; 379 | GCC_PREPROCESSOR_DEFINITIONS = ( 380 | "DEBUG=1", 381 | "$(inherited)", 382 | ); 383 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 391 | ONLY_ACTIVE_ARCH = YES; 392 | SDKROOT = iphoneos; 393 | TARGETED_DEVICE_FAMILY = "1,2"; 394 | }; 395 | name = Debug; 396 | }; 397 | DBDC0EBF18DB603500B470D6 /* Release */ = { 398 | isa = XCBuildConfiguration; 399 | buildSettings = { 400 | ALWAYS_SEARCH_USER_PATHS = NO; 401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 402 | CLANG_CXX_LIBRARY = "libc++"; 403 | CLANG_ENABLE_MODULES = YES; 404 | CLANG_ENABLE_OBJC_ARC = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_CONSTANT_CONVERSION = YES; 407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 408 | CLANG_WARN_EMPTY_BODY = YES; 409 | CLANG_WARN_ENUM_CONVERSION = YES; 410 | CLANG_WARN_INT_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 414 | COPY_PHASE_STRIP = YES; 415 | ENABLE_NS_ASSERTIONS = NO; 416 | GCC_C_LANGUAGE_STANDARD = gnu99; 417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 419 | GCC_WARN_UNDECLARED_SELECTOR = YES; 420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 421 | GCC_WARN_UNUSED_FUNCTION = YES; 422 | GCC_WARN_UNUSED_VARIABLE = YES; 423 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 424 | SDKROOT = iphoneos; 425 | TARGETED_DEVICE_FAMILY = "1,2"; 426 | VALIDATE_PRODUCT = YES; 427 | }; 428 | name = Release; 429 | }; 430 | DBDC0EC118DB603500B470D6 /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 434 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 435 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 436 | GCC_PREFIX_HEADER = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Prefix.pch"; 437 | INFOPLIST_FILE = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Info.plist"; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | WRAPPER_EXTENSION = app; 440 | }; 441 | name = Debug; 442 | }; 443 | DBDC0EC218DB603500B470D6 /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 447 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 448 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 449 | GCC_PREFIX_HEADER = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Prefix.pch"; 450 | INFOPLIST_FILE = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Info.plist"; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | WRAPPER_EXTENSION = app; 453 | }; 454 | name = Release; 455 | }; 456 | DBDC0EC418DB603500B470D6 /* Debug */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/GRKContainerViewControllerTestApp.app/GRKContainerViewControllerTestApp"; 460 | FRAMEWORK_SEARCH_PATHS = ( 461 | "$(SDKROOT)/Developer/Library/Frameworks", 462 | "$(inherited)", 463 | "$(DEVELOPER_FRAMEWORKS_DIR)", 464 | ); 465 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 466 | GCC_PREFIX_HEADER = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Prefix.pch"; 467 | GCC_PREPROCESSOR_DEFINITIONS = ( 468 | "DEBUG=1", 469 | "$(inherited)", 470 | ); 471 | INFOPLIST_FILE = "GRKContainerViewControllerTestAppTests/GRKContainerViewControllerTestAppTests-Info.plist"; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | TEST_HOST = "$(BUNDLE_LOADER)"; 474 | WRAPPER_EXTENSION = xctest; 475 | }; 476 | name = Debug; 477 | }; 478 | DBDC0EC518DB603500B470D6 /* Release */ = { 479 | isa = XCBuildConfiguration; 480 | buildSettings = { 481 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/GRKContainerViewControllerTestApp.app/GRKContainerViewControllerTestApp"; 482 | FRAMEWORK_SEARCH_PATHS = ( 483 | "$(SDKROOT)/Developer/Library/Frameworks", 484 | "$(inherited)", 485 | "$(DEVELOPER_FRAMEWORKS_DIR)", 486 | ); 487 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 488 | GCC_PREFIX_HEADER = "GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Prefix.pch"; 489 | INFOPLIST_FILE = "GRKContainerViewControllerTestAppTests/GRKContainerViewControllerTestAppTests-Info.plist"; 490 | PRODUCT_NAME = "$(TARGET_NAME)"; 491 | TEST_HOST = "$(BUNDLE_LOADER)"; 492 | WRAPPER_EXTENSION = xctest; 493 | }; 494 | name = Release; 495 | }; 496 | /* End XCBuildConfiguration section */ 497 | 498 | /* Begin XCConfigurationList section */ 499 | DBDC0E8618DB603400B470D6 /* Build configuration list for PBXProject "GRKContainerViewControllerTestApp" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | DBDC0EBE18DB603500B470D6 /* Debug */, 503 | DBDC0EBF18DB603500B470D6 /* Release */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | DBDC0EC018DB603500B470D6 /* Build configuration list for PBXNativeTarget "GRKContainerViewControllerTestApp" */ = { 509 | isa = XCConfigurationList; 510 | buildConfigurations = ( 511 | DBDC0EC118DB603500B470D6 /* Debug */, 512 | DBDC0EC218DB603500B470D6 /* Release */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | DBDC0EC318DB603500B470D6 /* Build configuration list for PBXNativeTarget "GRKContainerViewControllerTestAppTests" */ = { 518 | isa = XCConfigurationList; 519 | buildConfigurations = ( 520 | DBDC0EC418DB603500B470D6 /* Debug */, 521 | DBDC0EC518DB603500B470D6 /* Release */, 522 | ); 523 | defaultConfigurationIsVisible = 0; 524 | defaultConfigurationName = Release; 525 | }; 526 | /* End XCConfigurationList section */ 527 | }; 528 | rootObject = DBDC0E8318DB603400B470D6 /* Project object */; 529 | } 530 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/Base.lproj/Main_iPad.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 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/Base.lproj/Main_iPhone.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 | 52 | 62 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKAppDelegate.h 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKAppDelegate.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import "GRKAppDelegate.h" 10 | 11 | @implementation GRKAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 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 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.levigroker.${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 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp-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 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKFirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKFirstViewController.h 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKFirstViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKFirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKFirstViewController.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import "GRKFirstViewController.h" 10 | 11 | @interface GRKFirstViewController () 12 | 13 | @end 14 | 15 | @implementation GRKFirstViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view. 30 | } 31 | 32 | - (void)didReceiveMemoryWarning 33 | { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | /* 39 | #pragma mark - Navigation 40 | 41 | // In a storyboard-based application, you will often want to do a little preparation before navigation 42 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 43 | { 44 | // Get the new view controller using [segue destinationViewController]. 45 | // Pass the selected object to the new view controller. 46 | } 47 | */ 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKSecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKSecondViewController.h 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKSecondViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKSecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKSecondViewController.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import "GRKSecondViewController.h" 10 | 11 | @interface GRKSecondViewController () 12 | 13 | @end 14 | 15 | @implementation GRKSecondViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view. 30 | } 31 | 32 | - (void)didReceiveMemoryWarning 33 | { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | /* 39 | #pragma mark - Navigation 40 | 41 | // In a storyboard-based application, you will often want to do a little preparation before navigation 42 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 43 | { 44 | // Get the new view controller using [segue destinationViewController]. 45 | // Pass the selected object to the new view controller. 46 | } 47 | */ 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKThirdViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKThirdViewController.h 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKThirdViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKThirdViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKThirdViewController.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import "GRKThirdViewController.h" 10 | 11 | @interface GRKThirdViewController () 12 | 13 | @end 14 | 15 | @implementation GRKThirdViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view. 30 | } 31 | 32 | - (void)didReceiveMemoryWarning 33 | { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | /* 39 | #pragma mark - Navigation 40 | 41 | // In a storyboard-based application, you will often want to do a little preparation before navigation 42 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 43 | { 44 | // Get the new view controller using [segue destinationViewController]. 45 | // Pass the selected object to the new view controller. 46 | } 47 | */ 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GRKViewController.h 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/GRKViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKViewController.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import "GRKViewController.h" 10 | #import "GRKContainerViewController.h" 11 | #import "GRKFirstViewController.h" 12 | #import "GRKSecondViewController.h" 13 | #import "GRKThirdViewController.h" 14 | 15 | static NSString * const kSegueBody = @"body"; 16 | 17 | typedef NS_ENUM(NSInteger, BodyContent) { 18 | BodyContentZero = 0, 19 | BodyContentOne, 20 | BodyContentTwo, 21 | BodyContentCount //Always last in the enum 22 | }; 23 | 24 | @interface GRKViewController () 25 | 26 | @property (nonatomic,weak) GRKContainerViewController *bodyContainerViewController; 27 | 28 | @property (nonatomic,weak) IBOutlet UISegmentedControl *segmentedControl; 29 | 30 | - (IBAction)segmentSelected:(UISegmentedControl *)sender; 31 | - (IBAction)buttonAction:(UIButton *)sender; 32 | 33 | @end 34 | 35 | @implementation GRKViewController 36 | 37 | #pragma mark - Segue 38 | 39 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 40 | { 41 | //NOTE: The identifier for the segue to embed the GRKContainerViewController needs to be set (in this case to 'kSegueBody') in the Storyboard. 42 | NSString *identifier = segue.identifier; 43 | if ([identifier isEqual:kSegueBody]) 44 | { 45 | //Get a reference to the body container view controller and configure it as it gets embedded. 46 | id obj = segue.destinationViewController; 47 | if ([obj isKindOfClass:GRKContainerViewController.class]) 48 | { 49 | self.bodyContainerViewController = (GRKContainerViewController *)obj; 50 | [self setBodyContentWithIndex:self.segmentedControl.selectedSegmentIndex animated:YES]; 51 | } 52 | else 53 | { 54 | NSLog(@"ERROR: Seque '%@' is of unexpected type: %@", identifier, obj); 55 | } 56 | } 57 | } 58 | 59 | #pragma mark - Actions 60 | 61 | - (IBAction)segmentSelected:(UISegmentedControl *)sender 62 | { 63 | NSLog(@"Selected '%@' at index %d.", [sender titleForSegmentAtIndex:sender.selectedSegmentIndex], (int)sender.selectedSegmentIndex); 64 | [self setBodyContentWithIndex:self.segmentedControl.selectedSegmentIndex animated:YES]; 65 | } 66 | 67 | - (IBAction)buttonAction:(UIButton *)sender 68 | { 69 | NSLog(@"Selected '%@' with tag %d.", [sender titleColorForState:UIControlStateNormal], (int)sender.tag); 70 | [self setBodyContentWithIndex:sender.tag animated:YES]; 71 | self.segmentedControl.selectedSegmentIndex = sender.tag; 72 | } 73 | 74 | #pragma mark - Body Content 75 | 76 | - (void)setBodyContentWithIndex:(NSInteger)index animated:(BOOL)animated 77 | { 78 | NSLog(@"Setting body index to %d", (int)index); 79 | 80 | UIViewController *viewController = nil; 81 | 82 | if (self.bodyContainerViewController) 83 | { 84 | //Here we create (or simply configure a cached instance ) the instance of the view controller to be displayed. 85 | //In this example it is pretty contrived since there's not really a need for three different classes of view 86 | //controllers but it was done this way to demonstrate the view controllers can be completely different. 87 | 88 | switch (index) { 89 | case BodyContentZero: 90 | default: 91 | { 92 | static GRKFirstViewController *vc = nil; 93 | if (!vc) 94 | { 95 | //Assumes the view controller class name is the storyboard identifier 96 | vc = [self.storyboard instantiateViewControllerWithIdentifier:NSStringFromClass(GRKFirstViewController.class)]; 97 | } 98 | viewController = vc; 99 | break; 100 | } 101 | case BodyContentOne: 102 | { 103 | static GRKSecondViewController *vc = nil; 104 | if (!vc) 105 | { 106 | //Assumes the view controller class name is the storyboard identifier 107 | vc = [self.storyboard instantiateViewControllerWithIdentifier:NSStringFromClass(GRKSecondViewController.class)]; 108 | } 109 | viewController = vc; 110 | break; 111 | } 112 | case BodyContentTwo: 113 | { 114 | //Assumes the view controller class name is the storyboard identifier 115 | GRKThirdViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:NSStringFromClass(GRKThirdViewController.class)]; 116 | viewController = vc; 117 | break; 118 | } 119 | } 120 | 121 | [self.bodyContainerViewController setViewController:viewController animated:animated completion:nil]; 122 | } 123 | } 124 | 125 | @end 126 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/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" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GRKContainerViewControllerTestApp 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "GRKAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([GRKAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestAppTests/GRKContainerViewControllerTestAppTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.levigroker.${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 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestAppTests/GRKContainerViewControllerTestAppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GRKContainerViewControllerTestAppTests.m 3 | // GRKContainerViewControllerTestAppTests 4 | // 5 | // Created by Levi Brown on 3/20/14. 6 | // Copyright (c) 2014 Levi Brown. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GRKContainerViewControllerTestAppTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation GRKContainerViewControllerTestAppTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /GRKContainerViewControllerTestApp/GRKContainerViewControllerTestAppTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Levi Brown 2 | This work is licensed under the Creative Commons Attribution 3.0 3 | Unported License. To view a copy of this license, visit 4 | http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative 5 | Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, 6 | USA. 7 | 8 | The above attribution and this license must accompany any version of the source code. 9 | Visible attribution in any binary distributable including this work (or derivatives) 10 | is not required, but would be appreciated. 11 | 12 | 1. DISCLAIMER OF WARRANTY. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS 13 | AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A 14 | PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT 15 | THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. 16 | 17 | 2. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT 18 | WILL THE AUTHOR OR THE AUTHOR'S LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT 19 | OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE 20 | DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR 21 | RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF THE AUTHOR HAS BEEN 22 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will the author's 23 | liability to you, whether in contract, tort (including negligence), or 24 | otherwise, exceed the amount paid by you for Software under this Agreement. The 25 | foregoing limitations will apply even if the above stated warranty fails of its 26 | essential purpose. Some states do not allow the exclusion of incidental or 27 | consequential damages, so some of the terms above may not be applicable to you. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | GRKContainerViewController 2 | =========== 3 | A container UIViewController providing the ability to easily transition from one contained 4 | view controller to another, with an optional animation. 5 | 6 | ![Sample Screenshot](ReadmeAssets/Demo.gif) 7 | 8 | #### Future Ideas 9 | 10 | * Allow custom transition animations. 11 | 12 | ### Installing 13 | 14 | If you're using [CocoPods](http://cocopods.org) it's as simple as adding this to your `Podfile`: 15 | 16 | pod 'GRKContainerViewController', '~> 1.0' 17 | 18 | otherwise, simply add `GRKContainerViewController.h` and `GRKContainerViewController.m` to 19 | your project. 20 | 21 | ### Documentation 22 | 23 | `GRKContainerViewController` was designed to be used as the mechanism to swap out view 24 | controllers in a predefined location upon some action, like the selection of a 25 | segmented control. 26 | 27 | The main API is simple: 28 | 29 | - (void)setViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void(^)(UIViewController *viewController))completion; 30 | 31 | which should be called when a new view controller is to be displayed inside the container. 32 | 33 | Optionally you can set the `viewController` property, which will change the displayed view 34 | controller, but without any transition animation. 35 | 36 | Below is a screen shot of a typical storyboard setup (taken from the sample app in the 37 | repository). This configuration allows for easy embedding of view controllers which can be 38 | swapped programmatically with the GRKContainerViewController. 39 | 40 | ![Storyboard](ReadmeAssets/storyboard.png) 41 | 42 | Additional documentation is available in `GRKContainerViewController.h` and example usage 43 | can be found in the GRKContainerViewControllerTestApp source. 44 | 45 | #### Disclaimer and Licence 46 | 47 | * This work is licensed under the [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/). 48 | Please see the included LICENSE.txt for complete details. 49 | 50 | #### About 51 | A professional iOS engineer by day, my name is Levi Brown. Authoring a technical blog 52 | [grokin.gs](http://grokin.gs), I am reachable via: 53 | 54 | Twitter [@levigroker](https://twitter.com/levigroker) 55 | App.net [@levigroker](https://alpha.app.net/levigroker) 56 | Email [levigroker@gmail.com](mailto:levigroker@gmail.com) 57 | 58 | Your constructive comments and feedback are always welcome. 59 | -------------------------------------------------------------------------------- /ReadmeAssets/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levigroker/GRKContainerViewController/c705aec70cacd1e99b340ed7ff071b69365c2360/ReadmeAssets/Demo.gif -------------------------------------------------------------------------------- /ReadmeAssets/storyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/levigroker/GRKContainerViewController/c705aec70cacd1e99b340ed7ff071b69365c2360/ReadmeAssets/storyboard.png --------------------------------------------------------------------------------