├── sample.gif ├── YSLContainerViewControllerDemo ├── Resources │ ├── photo_sample_01.png │ ├── photo_sample_02.png │ ├── photo_sample_03.png │ ├── photo_sample_04.png │ ├── photo_sample_05.png │ ├── photo_sample_06.png │ ├── photo_sample_07.png │ └── photo_sample_08.png ├── ViewController.h ├── DetailViewController.h ├── SampleViewController.h ├── ArtistsViewController.h ├── PlayListTableViewController.h ├── AppDelegate.h ├── main.m ├── ArtistsCell.h ├── PlayListCell.h ├── ArtistsCell.m ├── PlayListCell.m ├── SampleViewController.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── DetailViewController.m ├── Info.plist ├── ArtistsViewController.xib ├── PlayListTableViewController.xib ├── AppDelegate.m ├── DetailViewController.xib ├── SampleViewController.xib ├── PlayListTableViewController.m ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.xib ├── ArtistsCell.xib ├── PlayListCell.xib ├── ArtistsViewController.m └── ViewController.m ├── .gitignore ├── YSLContainerViewController.podspec ├── YSLContainerViewControllerDemoTests ├── Info.plist └── YSLContainerViewControllerDemoTests.m ├── LICENSE ├── YSLContainerViewController ├── YSLScrollMenuView.h ├── YSLContainerViewController.h ├── YSLScrollMenuView.m └── YSLContainerViewController.m ├── README.md └── YSLContainerViewControllerDemo.xcodeproj └── project.pbxproj /sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/sample.gif -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_01.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_02.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_03.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_04.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_05.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_06.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_07.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Resources/photo_sample_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/HEAD/YSLContainerViewControllerDemo/Resources/photo_sample_08.png -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/SampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleViewController.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SampleViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Ignore python compiled files 3 | *.pyc 4 | 5 | # Ignore files build by xcode 6 | *.mode*v* 7 | *.pbxuser 8 | *.xccheckout 9 | #*.xcbkptlist 10 | #*.xcscheme 11 | #*.xcworkspacedata 12 | *.xcuserstate 13 | #xcschememanagement.plist 14 | build/ 15 | .DS_Store 16 | ._.* 17 | xcuserdata/ 18 | DerivedData/ 19 | 20 | # Ignore vim swaps 21 | *.swp 22 | 23 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArtistsViewController.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ArtistsViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayListTableViewController.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PlayListTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArtistsCell.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ArtistsCell : UITableViewCell 12 | 13 | @property (nonatomic, strong) IBOutlet UIImageView *artWorkImageView; 14 | @property (nonatomic, strong) IBOutlet UILabel *artisttNameLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayListCell.h 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PlayListCell : UITableViewCell 12 | 13 | @property (nonatomic, strong) IBOutlet UIImageView *artWorkImageView; 14 | @property (nonatomic, strong) IBOutlet UILabel *playListNameLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArtistsCell.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "ArtistsCell.h" 10 | 11 | @implementation ArtistsCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayListCell.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "PlayListCell.h" 10 | 11 | @implementation PlayListCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /YSLContainerViewController.podspec: -------------------------------------------------------------------------------- 1 | @version = "0.0.2" 2 | Pod::Spec.new do |s| 3 | s.name = "YSLContainerViewController" 4 | s.version = @version 5 | s.summary = "A page scrolling container viewcontroller." 6 | s.homepage = "https://github.com/y-hryk/YSLContainerViewController" 7 | s.license = { :type => 'MIT', :file => 'LICENSE' } 8 | s.author = { "y-hryk" => "dev.hy630823@gmail.com" } 9 | s.source = { :git => "https://github.com/y-hryk/YSLContainerViewController.git", :tag => @version } 10 | s.source_files = 'YSLContainerViewController/**/*.{h,m}' 11 | s.requires_arc = true 12 | s.ios.deployment_target = '7.0' 13 | end -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/SampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleViewController.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "SampleViewController.h" 10 | 11 | @interface SampleViewController () 12 | 13 | @end 14 | 15 | @implementation SampleViewController 16 | 17 | - (void)didReceiveMemoryWarning { 18 | [super didReceiveMemoryWarning]; 19 | } 20 | 21 | - (void)viewWillAppear:(BOOL)animated 22 | { 23 | NSLog(@"SampleViewController viewWillAppear"); 24 | } 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/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 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /YSLContainerViewControllerDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.-.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/DetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "DetailViewController.h" 10 | 11 | @interface DetailViewController () 12 | 13 | @end 14 | 15 | @implementation DetailViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 y-hryk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemoTests/YSLContainerViewControllerDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // YSLContainerViewControllerDemoTests.m 3 | // YSLContainerViewControllerDemoTests 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface YSLContainerViewControllerDemoTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation YSLContainerViewControllerDemoTests 17 | 18 | - (void)setUp { 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 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.-.$(PRODUCT_NAME:rfc1034identifier) 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 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /YSLContainerViewController/YSLScrollMenuView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YSLScrollMenuView.h 3 | // YSLContainerViewController 4 | // 5 | // Created by yamaguchi on 2015/03/03. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol YSLScrollMenuViewDelegate 12 | 13 | - (void)scrollMenuViewSelectedIndex:(NSInteger)index; 14 | 15 | @end 16 | 17 | @interface YSLScrollMenuView : UIView 18 | 19 | @property (nonatomic, weak) id delegate; 20 | @property (nonatomic, strong) UIScrollView *scrollView; 21 | @property (nonatomic, strong) NSArray *itemTitleArray; 22 | @property (nonatomic, strong) NSArray *itemViewArray; 23 | 24 | @property (nonatomic, strong) UIColor *viewbackgroudColor; 25 | @property (nonatomic, strong) UIFont *itemfont; 26 | @property (nonatomic, strong) UIColor *itemTitleColor; 27 | @property (nonatomic, strong) UIColor *itemSelectedTitleColor; 28 | @property (nonatomic, strong) UIColor *itemIndicatorColor; 29 | 30 | - (void)setShadowView; 31 | 32 | - (void)setIndicatorViewFrameWithRatio:(CGFloat)ratio isNextItem:(BOOL)isNextItem toIndex:(NSInteger)toIndex; 33 | 34 | - (void)setItemTextColor:(UIColor *)itemTextColor 35 | seletedItemTextColor:(UIColor *)selectedItemTextColor 36 | currentIndex:(NSInteger)currentIndex; 37 | @end 38 | -------------------------------------------------------------------------------- /YSLContainerViewController/YSLContainerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YSLContainerViewController.h 3 | // YSLContainerViewController 4 | // 5 | // Created by yamaguchi on 2015/02/10. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol YSLContainerViewControllerDelegate 12 | 13 | - (void)containerViewItemIndex:(NSInteger)index currentController:(UIViewController *)controller; 14 | 15 | @end 16 | 17 | @interface YSLContainerViewController : UIViewController 18 | 19 | @property (nonatomic, weak) id delegate; 20 | 21 | @property (nonatomic, strong) UIScrollView *contentScrollView; 22 | @property (nonatomic, strong, readonly) NSMutableArray *titles; 23 | @property (nonatomic, strong, readonly) NSMutableArray *childControllers; 24 | 25 | @property (nonatomic, strong) UIFont *menuItemFont; 26 | @property (nonatomic, strong) UIColor *menuItemTitleColor; 27 | @property (nonatomic, strong) UIColor *menuItemSelectedTitleColor; 28 | @property (nonatomic, strong) UIColor *menuBackGroudColor; 29 | @property (nonatomic, strong) UIColor *menuIndicatorColor; 30 | 31 | - (id)initWithControllers:(NSArray *)controllers 32 | topBarHeight:(CGFloat)topBarHeight 33 | parentViewController:(UIViewController *)parentViewController; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListTableViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YSLContainerViewController 2 | 3 | ## Demo 4 | ![Dome](https://raw.githubusercontent.com/y-hryk/YSLContainerViewController/master/sample.gif) 5 | ## Requirement 6 | not support landscape 7 | ## Install 8 | #### Manually 9 | Copy YSLContainerViewController directory to your project. 10 | #### CocoaPods 11 | Add pod 'YSLContainerViewController' to your Podfile. 12 | 13 | ## Usage 14 | 15 | UIViewController *vc1 = [[UIViewController alloc]init]; 16 | vc1.title = @"vc1"; 17 | UIViewController *vc2 = [[UIViewController alloc]init]; 18 | vc2.title = @"vc2"; 19 | UIViewController *vc3 = [[UIViewController alloc]init]; 20 | vc3.title = @"vc3"; 21 | UIViewController *vc4 = [[UIViewController alloc]init]; 22 | vc4.title = @"vc4"; 23 | 24 | float statusHeight = [[UIApplication sharedApplication] statusBarFrame].size.height; 25 | float navigationHeight = self.navigationController.navigationBar.frame.size.height; 26 | 27 | YSLContainerViewController *containerVC = [[YSLContainerViewController alloc]initWithControllers:@[vc1,vc2,vc3,vc4] 28 | topBarHeight:statusHeight + navigationHeight 29 | parentViewController:self]; 30 | [self.view addSubview:containerVC.view]; 31 | 32 | ## Property 33 | 34 | containerVC.menuItemFont = [UIFont fontWithName:@"Futura-Medium" size:16]; 35 | containerVC.menuItemTitleColor = [UIColor whiteColor]; 36 | containerVC.menuItemSelectedTitleColor = [UIColor redColor]; 37 | containerVC.menuIndicatorColor = [UIColor yellowColor]; 38 | containerVC.menuBackGroudColor = [UIColor purpleColor]; 39 | 40 | ## Licence 41 | MIT 42 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | [UINavigationBar appearance].barTintColor = [UIColor colorWithRed:0.843137 green:0.843137 blue:0.843137 alpha:1.0]; 21 | return YES; 22 | } 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // 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. 27 | } 28 | 29 | - (void)applicationDidEnterBackground:(UIApplication *)application { 30 | // 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. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | - (void)applicationWillEnterForeground:(UIApplication *)application { 35 | // 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. 36 | } 37 | 38 | - (void)applicationDidBecomeActive:(UIApplication *)application { 39 | // 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. 40 | } 41 | 42 | - (void)applicationWillTerminate:(UIApplication *)application { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/DetailViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/SampleViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayListTableViewController.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "PlayListTableViewController.h" 10 | #import "PlayListCell.h" 11 | #import "DetailViewController.h" 12 | 13 | @interface PlayListTableViewController () 14 | 15 | @property (nonatomic, strong) NSMutableArray *playListArray; 16 | 17 | @end 18 | 19 | @implementation PlayListTableViewController 20 | 21 | - (void)didReceiveMemoryWarning { 22 | [super didReceiveMemoryWarning]; 23 | } 24 | 25 | - (void)viewWillAppear:(BOOL)animated 26 | { 27 | NSLog(@"PlayListTableViewController viewWillAppear"); 28 | } 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | 33 | _playListArray = [@[@"photo_sample_01", 34 | @"photo_sample_02", 35 | @"photo_sample_03", 36 | @"photo_sample_04", 37 | @"photo_sample_05", 38 | @"photo_sample_06", 39 | @"photo_sample_07", 40 | @"photo_sample_08",] mutableCopy]; 41 | 42 | [self.tableView registerNib:[UINib nibWithNibName:@"PlayListCell" bundle:nil] forCellReuseIdentifier:@"PlayListCell"]; 43 | } 44 | 45 | #pragma mark - Table view data source 46 | 47 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 48 | // Return the number of sections. 49 | return 1; 50 | } 51 | 52 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 53 | // Return the number of rows in the section. 54 | return _playListArray.count; 55 | } 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 58 | static NSString *cellIdentifier = @"PlayListCell"; 59 | PlayListCell *cell = (PlayListCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 60 | 61 | cell.artWorkImageView.image = [UIImage imageNamed:_playListArray[indexPath.row]]; 62 | cell.playListNameLabel.text = [NSString stringWithFormat:@"PlayList %ld",(long)indexPath.row]; 63 | return cell; 64 | } 65 | 66 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 67 | { 68 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 69 | DetailViewController *detailVC = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil]; 70 | [self.navigationController pushViewController:detailVC animated:YES]; 71 | } 72 | 73 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 74 | { 75 | return 80; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/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 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/PlayListCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ArtistsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArtistsViewController.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/25. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "ArtistsViewController.h" 10 | #import "ArtistsCell.h" 11 | #import "DetailViewController.h" 12 | 13 | @interface ArtistsViewController () 14 | 15 | @property (nonatomic, strong) NSMutableArray *artistsArray; 16 | 17 | @end 18 | 19 | @implementation ArtistsViewController 20 | 21 | - (void)didReceiveMemoryWarning { 22 | [super didReceiveMemoryWarning]; 23 | } 24 | 25 | - (void)viewWillAppear:(BOOL)animated 26 | { 27 | NSLog(@"ArtistsViewController viewWillAppear"); 28 | } 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | 33 | _artistsArray = [@[@"photo_sample_01", 34 | @"photo_sample_02", 35 | @"photo_sample_03", 36 | @"photo_sample_04", 37 | @"photo_sample_05", 38 | @"photo_sample_06", 39 | @"photo_sample_07", 40 | @"photo_sample_08", 41 | @"photo_sample_01", 42 | @"photo_sample_02", 43 | @"photo_sample_03", 44 | @"photo_sample_04", 45 | @"photo_sample_05", 46 | @"photo_sample_06", 47 | @"photo_sample_07", 48 | @"photo_sample_08",] mutableCopy]; 49 | 50 | [self.tableView registerNib:[UINib nibWithNibName:@"ArtistsCell" bundle:nil] forCellReuseIdentifier:@"ArtistsCell"]; 51 | } 52 | 53 | #pragma mark - Table view data source 54 | 55 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 56 | // Return the number of sections. 57 | return 1; 58 | } 59 | 60 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 61 | // Return the number of rows in the section. 62 | return _artistsArray.count; 63 | } 64 | 65 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 66 | static NSString *cellIdentifier = @"ArtistsCell"; 67 | ArtistsCell *cell = (ArtistsCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 68 | 69 | cell.artWorkImageView.image = [UIImage imageNamed:_artistsArray[indexPath.row]]; 70 | cell.artisttNameLabel.text = [NSString stringWithFormat:@"Artists %ld",(long)indexPath.row]; 71 | return cell; 72 | } 73 | 74 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 75 | { 76 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 77 | DetailViewController *detailVC = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil]; 78 | [self.navigationController pushViewController:detailVC animated:YES]; 79 | } 80 | 81 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 82 | { 83 | return 60; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // YSLContainerViewControllerDemo 4 | // 5 | // Created by yamaguchi on 2015/03/24. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "YSLContainerViewController.h" 11 | #import "PlayListTableViewController.h" 12 | #import "ArtistsViewController.h" 13 | #import "SampleViewController.h" 14 | 15 | @interface ViewController () 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)didReceiveMemoryWarning { 22 | [super didReceiveMemoryWarning]; 23 | } 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | // NavigationBar 29 | UILabel *titleView = [[UILabel alloc] initWithFrame:CGRectZero]; 30 | titleView.font = [UIFont fontWithName:@"Futura-Medium" size:19]; 31 | titleView.textColor = [UIColor colorWithRed:0.333333 green:0.333333 blue:0.333333 alpha:1.0]; 32 | titleView.text = @"Menu"; 33 | [titleView sizeToFit]; 34 | titleView.backgroundColor = [UIColor clearColor]; 35 | self.navigationItem.titleView = titleView; 36 | 37 | // SetUp ViewControllers 38 | PlayListTableViewController *playListVC = [[PlayListTableViewController alloc]initWithNibName:@"PlayListTableViewController" bundle:nil]; 39 | playListVC.title = @"PlayList"; 40 | 41 | ArtistsViewController *artistVC = [[ArtistsViewController alloc]initWithNibName:@"ArtistsViewController" bundle:nil]; 42 | artistVC.title = @"Artists"; 43 | 44 | SampleViewController *sampleVC1 = [[SampleViewController alloc]initWithNibName:@"SampleViewController" bundle:nil]; 45 | sampleVC1.title = @"Album"; 46 | 47 | SampleViewController *sampleVC2 = [[SampleViewController alloc]initWithNibName:@"SampleViewController" bundle:nil]; 48 | sampleVC2.title = @"Track"; 49 | 50 | SampleViewController *sampleVC3 = [[SampleViewController alloc]initWithNibName:@"SampleViewController" bundle:nil]; 51 | sampleVC3.title = @"Setting"; 52 | 53 | // ContainerView 54 | float statusHeight = [[UIApplication sharedApplication] statusBarFrame].size.height; 55 | float navigationHeight = self.navigationController.navigationBar.frame.size.height; 56 | 57 | YSLContainerViewController *containerVC = [[YSLContainerViewController alloc]initWithControllers:@[playListVC,artistVC,sampleVC1,sampleVC2,sampleVC3] 58 | topBarHeight:statusHeight + navigationHeight 59 | parentViewController:self]; 60 | containerVC.delegate = self; 61 | containerVC.menuItemFont = [UIFont fontWithName:@"Futura-Medium" size:16]; 62 | 63 | [self.view addSubview:containerVC.view]; 64 | } 65 | 66 | #pragma mark -- YSLContainerViewControllerDelegate 67 | - (void)containerViewItemIndex:(NSInteger)index currentController:(UIViewController *)controller 68 | { 69 | // NSLog(@"current Index : %ld",(long)index); 70 | // NSLog(@"current controller : %@",controller); 71 | [controller viewWillAppear:YES]; 72 | } 73 | @end 74 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo/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 | -------------------------------------------------------------------------------- /YSLContainerViewController/YSLScrollMenuView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YSLScrollMenuView.m 3 | // YSLContainerViewController 4 | // 5 | // Created by yamaguchi on 2015/03/03. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "YSLScrollMenuView.h" 10 | 11 | static const CGFloat kYSLScrollMenuViewWidth = 90; 12 | static const CGFloat kYSLScrollMenuViewMargin = 10; 13 | static const CGFloat kYSLIndicatorHeight = 3; 14 | 15 | @interface YSLScrollMenuView () 16 | 17 | 18 | @property (nonatomic, strong) UIView *indicatorView; 19 | 20 | @end 21 | 22 | @implementation YSLScrollMenuView 23 | 24 | 25 | - (id)initWithFrame:(CGRect)frame 26 | { 27 | self = [super initWithFrame:frame]; 28 | if (self) { 29 | // default 30 | _viewbackgroudColor = [UIColor whiteColor]; 31 | _itemfont = [UIFont systemFontOfSize:16]; 32 | _itemTitleColor = [UIColor colorWithRed:0.866667 green:0.866667 blue:0.866667 alpha:1.0]; 33 | _itemSelectedTitleColor = [UIColor colorWithRed:0.333333 green:0.333333 blue:0.333333 alpha:1.0]; 34 | _itemIndicatorColor = [UIColor colorWithRed:0.168627 green:0.498039 blue:0.839216 alpha:1.0]; 35 | 36 | self.backgroundColor = _viewbackgroudColor; 37 | _scrollView = [[UIScrollView alloc]initWithFrame:self.bounds]; 38 | _scrollView.showsHorizontalScrollIndicator = NO; 39 | [self addSubview:_scrollView]; 40 | } 41 | return self; 42 | } 43 | 44 | #pragma mark -- Setter 45 | 46 | - (void)setViewbackgroudColor:(UIColor *)viewbackgroudColor 47 | { 48 | if (!viewbackgroudColor) { return; } 49 | _viewbackgroudColor = viewbackgroudColor; 50 | self.backgroundColor = viewbackgroudColor; 51 | } 52 | 53 | - (void)setItemfont:(UIFont *)itemfont 54 | { 55 | if (!itemfont) { return; } 56 | _itemfont = itemfont; 57 | for (UILabel *label in _itemTitleArray) { 58 | label.font = itemfont; 59 | } 60 | } 61 | 62 | - (void)setItemTitleColor:(UIColor *)itemTitleColor 63 | { 64 | if (!itemTitleColor) { return; } 65 | _itemTitleColor = itemTitleColor; 66 | for (UILabel *label in _itemTitleArray) { 67 | label.textColor = itemTitleColor; 68 | } 69 | } 70 | 71 | - (void)setItemIndicatorColor:(UIColor *)itemIndicatorColor 72 | { 73 | if (!itemIndicatorColor) { return; } 74 | _itemIndicatorColor = itemIndicatorColor; 75 | _indicatorView.backgroundColor = itemIndicatorColor; 76 | } 77 | 78 | - (void)setItemTitleArray:(NSArray *)itemTitleArray 79 | { 80 | if (_itemTitleArray != itemTitleArray) { 81 | _itemTitleArray = itemTitleArray; 82 | NSMutableArray *views = [NSMutableArray array]; 83 | 84 | for (int i = 0; i < itemTitleArray.count; i++) { 85 | CGRect frame = CGRectMake(0, 0, kYSLScrollMenuViewWidth, CGRectGetHeight(self.frame)); 86 | UILabel *itemView = [[UILabel alloc] initWithFrame:frame]; 87 | [self.scrollView addSubview:itemView]; 88 | itemView.tag = i; 89 | itemView.text = itemTitleArray[i]; 90 | itemView.userInteractionEnabled = YES; 91 | itemView.backgroundColor = [UIColor clearColor]; 92 | itemView.textAlignment = NSTextAlignmentCenter; 93 | itemView.font = self.itemfont; 94 | itemView.textColor = _itemTitleColor; 95 | [views addObject:itemView]; 96 | 97 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(itemViewTapAction:)]; 98 | [itemView addGestureRecognizer:tapGesture]; 99 | } 100 | 101 | self.itemViewArray = [NSArray arrayWithArray:views]; 102 | 103 | // indicator 104 | _indicatorView = [[UIView alloc]init]; 105 | _indicatorView.frame = CGRectMake(10, _scrollView.frame.size.height - kYSLIndicatorHeight, kYSLScrollMenuViewWidth, kYSLIndicatorHeight); 106 | _indicatorView.backgroundColor = self.itemIndicatorColor; 107 | [_scrollView addSubview:_indicatorView]; 108 | } 109 | } 110 | 111 | #pragma mark -- public 112 | 113 | - (void)setIndicatorViewFrameWithRatio:(CGFloat)ratio isNextItem:(BOOL)isNextItem toIndex:(NSInteger)toIndex 114 | { 115 | CGFloat indicatorX = 0.0; 116 | if (isNextItem) { 117 | indicatorX = ((kYSLScrollMenuViewMargin + kYSLScrollMenuViewWidth) * ratio ) + (toIndex * kYSLScrollMenuViewWidth) + ((toIndex + 1) * kYSLScrollMenuViewMargin); 118 | } else { 119 | indicatorX = ((kYSLScrollMenuViewMargin + kYSLScrollMenuViewWidth) * (1 - ratio) ) + (toIndex * kYSLScrollMenuViewWidth) + ((toIndex + 1) * kYSLScrollMenuViewMargin); 120 | } 121 | 122 | if (indicatorX < kYSLScrollMenuViewMargin || indicatorX > self.scrollView.contentSize.width - (kYSLScrollMenuViewMargin + kYSLScrollMenuViewWidth)) { 123 | return; 124 | } 125 | _indicatorView.frame = CGRectMake(indicatorX, _scrollView.frame.size.height - kYSLIndicatorHeight, kYSLScrollMenuViewWidth, kYSLIndicatorHeight); 126 | // NSLog(@"retio : %f",_indicatorView.frame.origin.x); 127 | } 128 | 129 | - (void)setItemTextColor:(UIColor *)itemTextColor 130 | seletedItemTextColor:(UIColor *)selectedItemTextColor 131 | currentIndex:(NSInteger)currentIndex 132 | { 133 | if (itemTextColor) { _itemTitleColor = itemTextColor; } 134 | if (selectedItemTextColor) { _itemSelectedTitleColor = selectedItemTextColor; } 135 | 136 | for (int i = 0; i < self.itemViewArray.count; i++) { 137 | UILabel *label = self.itemViewArray[i]; 138 | if (i == currentIndex) { 139 | label.alpha = 0.0; 140 | [UIView animateWithDuration:0.75 141 | delay:0.0 142 | options:UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction 143 | animations:^{ 144 | label.alpha = 1.0; 145 | label.textColor = _itemSelectedTitleColor; 146 | } completion:^(BOOL finished) { 147 | }]; 148 | } else { 149 | label.textColor = _itemTitleColor; 150 | } 151 | } 152 | } 153 | 154 | #pragma mark -- private 155 | 156 | // menu shadow 157 | - (void)setShadowView 158 | { 159 | UIView *view = [[UIView alloc]init]; 160 | view.frame = CGRectMake(0, self.frame.size.height - 0.5, CGRectGetWidth(self.frame), 0.5); 161 | view.backgroundColor = [UIColor lightGrayColor]; 162 | [self addSubview:view]; 163 | } 164 | 165 | - (void)layoutSubviews 166 | { 167 | [super layoutSubviews]; 168 | 169 | CGFloat x = kYSLScrollMenuViewMargin; 170 | for (NSUInteger i = 0; i < self.itemViewArray.count; i++) { 171 | CGFloat width = kYSLScrollMenuViewWidth; 172 | UIView *itemView = self.itemViewArray[i]; 173 | itemView.frame = CGRectMake(x, 0, width, self.scrollView.frame.size.height); 174 | x += width + kYSLScrollMenuViewMargin; 175 | } 176 | self.scrollView.contentSize = CGSizeMake(x, self.scrollView.frame.size.height); 177 | 178 | CGRect frame = self.scrollView.frame; 179 | if (self.frame.size.width > x) { 180 | frame.origin.x = (self.frame.size.width - x) / 2; 181 | frame.size.width = x; 182 | } else { 183 | frame.origin.x = 0; 184 | frame.size.width = self.frame.size.width; 185 | } 186 | self.scrollView.frame = frame; 187 | } 188 | 189 | #pragma mark -- Selector --------------------------------------- // 190 | - (void)itemViewTapAction:(UITapGestureRecognizer *)Recongnizer 191 | { 192 | if (self.delegate && [self.delegate respondsToSelector:@selector(scrollMenuViewSelectedIndex:)]) { 193 | [self.delegate scrollMenuViewSelectedIndex:[(UIGestureRecognizer*) Recongnizer view].tag]; 194 | } 195 | } 196 | 197 | @end 198 | -------------------------------------------------------------------------------- /YSLContainerViewController/YSLContainerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YSLContainerViewController.m 3 | // YSLContainerViewController 4 | // 5 | // Created by yamaguchi on 2015/02/10. 6 | // Copyright (c) 2015年 h.yamaguchi. All rights reserved. 7 | // 8 | 9 | #import "YSLContainerViewController.h" 10 | #import "YSLScrollMenuView.h" 11 | 12 | static const CGFloat kYSLScrollMenuViewHeight = 40; 13 | 14 | @interface YSLContainerViewController () 15 | 16 | @property (nonatomic, assign) CGFloat topBarHeight; 17 | @property (nonatomic, assign) NSInteger currentIndex; 18 | @property (nonatomic, strong) YSLScrollMenuView *menuView; 19 | 20 | @end 21 | 22 | @implementation YSLContainerViewController 23 | 24 | - (id)initWithControllers:(NSArray *)controllers 25 | topBarHeight:(CGFloat)topBarHeight 26 | parentViewController:(UIViewController *)parentViewController 27 | { 28 | self = [super init]; 29 | if (self) { 30 | 31 | [parentViewController addChildViewController:self]; 32 | [self didMoveToParentViewController:parentViewController]; 33 | 34 | _topBarHeight = topBarHeight; 35 | _titles = [[NSMutableArray alloc] init]; 36 | _childControllers = [[NSMutableArray alloc] init]; 37 | _childControllers = [controllers mutableCopy]; 38 | 39 | NSMutableArray *titles = [NSMutableArray array]; 40 | for (UIViewController *vc in _childControllers) { 41 | [titles addObject:[vc valueForKey:@"title"]]; 42 | } 43 | _titles = [titles mutableCopy]; 44 | } 45 | return self; 46 | } 47 | 48 | - (void)didReceiveMemoryWarning { 49 | [super didReceiveMemoryWarning]; 50 | } 51 | 52 | - (void)viewDidLoad { 53 | [super viewDidLoad]; 54 | 55 | // setupViews 56 | UIView *viewCover = [[UIView alloc]init]; 57 | [self.view addSubview:viewCover]; 58 | 59 | // ContentScrollview setup 60 | _contentScrollView = [[UIScrollView alloc]init]; 61 | _contentScrollView.frame = CGRectMake(0,_topBarHeight + kYSLScrollMenuViewHeight, self.view.frame.size.width, self.view.frame.size.height - (_topBarHeight + kYSLScrollMenuViewHeight)); 62 | _contentScrollView.backgroundColor = [UIColor clearColor]; 63 | _contentScrollView.pagingEnabled = YES; 64 | _contentScrollView.delegate = self; 65 | _contentScrollView.showsHorizontalScrollIndicator = NO; 66 | _contentScrollView.scrollsToTop = NO; 67 | [self.view addSubview:_contentScrollView]; 68 | _contentScrollView.contentSize = CGSizeMake(_contentScrollView.frame.size.width * self.childControllers.count, _contentScrollView.frame.size.height); 69 | 70 | // ContentViewController setup 71 | for (int i = 0; i < self.childControllers.count; i++) { 72 | id obj = [self.childControllers objectAtIndex:i]; 73 | if ([obj isKindOfClass:[UIViewController class]]) { 74 | UIViewController *controller = (UIViewController*)obj; 75 | CGFloat scrollWidth = _contentScrollView.frame.size.width; 76 | CGFloat scrollHeght = _contentScrollView.frame.size.height; 77 | controller.view.frame = CGRectMake(i * scrollWidth, 0, scrollWidth, scrollHeght); 78 | [_contentScrollView addSubview:controller.view]; 79 | } 80 | } 81 | // meunView 82 | _menuView = [[YSLScrollMenuView alloc]initWithFrame:CGRectMake(0, _topBarHeight, self.view.frame.size.width, kYSLScrollMenuViewHeight)]; 83 | _menuView.backgroundColor = [UIColor clearColor]; 84 | _menuView.delegate = self; 85 | _menuView.viewbackgroudColor = self.menuBackGroudColor; 86 | _menuView.itemfont = self.menuItemFont; 87 | _menuView.itemTitleColor = self.menuItemTitleColor; 88 | _menuView.itemIndicatorColor = self.menuIndicatorColor; 89 | _menuView.scrollView.scrollsToTop = NO; 90 | [_menuView setItemTitleArray:self.titles]; 91 | [self.view addSubview:_menuView]; 92 | [_menuView setShadowView]; 93 | 94 | [self scrollMenuViewSelectedIndex:0]; 95 | } 96 | 97 | #pragma mark -- private 98 | 99 | - (void)setChildViewControllerWithCurrentIndex:(NSInteger)currentIndex 100 | { 101 | for (int i = 0; i < self.childControllers.count; i++) { 102 | id obj = self.childControllers[i]; 103 | if ([obj isKindOfClass:[UIViewController class]]) { 104 | UIViewController *controller = (UIViewController*)obj; 105 | if (i == currentIndex) { 106 | [controller willMoveToParentViewController:self]; 107 | [self addChildViewController:controller]; 108 | [controller didMoveToParentViewController:self]; 109 | } else { 110 | [controller willMoveToParentViewController:self]; 111 | [controller removeFromParentViewController]; 112 | [controller didMoveToParentViewController:self]; 113 | } 114 | } 115 | } 116 | } 117 | #pragma mark -- YSLScrollMenuView Delegate 118 | 119 | - (void)scrollMenuViewSelectedIndex:(NSInteger)index 120 | { 121 | [_contentScrollView setContentOffset:CGPointMake(index * _contentScrollView.frame.size.width, 0.) animated:YES]; 122 | 123 | // item color 124 | [_menuView setItemTextColor:self.menuItemTitleColor 125 | seletedItemTextColor:self.menuItemSelectedTitleColor 126 | currentIndex:index]; 127 | 128 | [self setChildViewControllerWithCurrentIndex:index]; 129 | 130 | if (index == self.currentIndex) { return; } 131 | self.currentIndex = index; 132 | 133 | if (self.delegate && [self.delegate respondsToSelector:@selector(containerViewItemIndex:currentController:)]) { 134 | [self.delegate containerViewItemIndex:self.currentIndex currentController:_childControllers[self.currentIndex]]; 135 | } 136 | } 137 | 138 | #pragma mark -- ScrollView Delegate 139 | 140 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 141 | { 142 | CGFloat oldPointX = self.currentIndex * scrollView.frame.size.width; 143 | CGFloat ratio = (scrollView.contentOffset.x - oldPointX) / scrollView.frame.size.width; 144 | 145 | BOOL isToNextItem = (_contentScrollView.contentOffset.x > oldPointX); 146 | NSInteger targetIndex = (isToNextItem) ? self.currentIndex + 1 : self.currentIndex - 1; 147 | 148 | CGFloat nextItemOffsetX = 1.0f; 149 | CGFloat currentItemOffsetX = 1.0f; 150 | 151 | nextItemOffsetX = (_menuView.scrollView.contentSize.width - _menuView.scrollView.frame.size.width) * targetIndex / (_menuView.itemViewArray.count - 1); 152 | currentItemOffsetX = (_menuView.scrollView.contentSize.width - _menuView.scrollView.frame.size.width) * self.currentIndex / (_menuView.itemViewArray.count - 1); 153 | 154 | if (targetIndex >= 0 && targetIndex < self.childControllers.count) { 155 | // MenuView Move 156 | CGFloat indicatorUpdateRatio = ratio; 157 | if (isToNextItem) { 158 | 159 | CGPoint offset = _menuView.scrollView.contentOffset; 160 | offset.x = (nextItemOffsetX - currentItemOffsetX) * ratio + currentItemOffsetX; 161 | [_menuView.scrollView setContentOffset:offset animated:NO]; 162 | 163 | indicatorUpdateRatio = indicatorUpdateRatio * 1; 164 | [_menuView setIndicatorViewFrameWithRatio:indicatorUpdateRatio isNextItem:isToNextItem toIndex:self.currentIndex]; 165 | } else { 166 | 167 | CGPoint offset = _menuView.scrollView.contentOffset; 168 | offset.x = currentItemOffsetX - (nextItemOffsetX - currentItemOffsetX) * ratio; 169 | [_menuView.scrollView setContentOffset:offset animated:NO]; 170 | 171 | indicatorUpdateRatio = indicatorUpdateRatio * -1; 172 | [_menuView setIndicatorViewFrameWithRatio:indicatorUpdateRatio isNextItem:isToNextItem toIndex:targetIndex]; 173 | } 174 | } 175 | } 176 | 177 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 178 | { 179 | int currentIndex = scrollView.contentOffset.x / _contentScrollView.frame.size.width; 180 | 181 | if (currentIndex == self.currentIndex) { return; } 182 | self.currentIndex = currentIndex; 183 | 184 | // item color 185 | [_menuView setItemTextColor:self.menuItemTitleColor 186 | seletedItemTextColor:self.menuItemSelectedTitleColor 187 | currentIndex:currentIndex]; 188 | 189 | if (self.delegate && [self.delegate respondsToSelector:@selector(containerViewItemIndex:currentController:)]) { 190 | [self.delegate containerViewItemIndex:self.currentIndex currentController:_childControllers[self.currentIndex]]; 191 | } 192 | [self setChildViewControllerWithCurrentIndex:self.currentIndex]; 193 | } 194 | 195 | @end 196 | -------------------------------------------------------------------------------- /YSLContainerViewControllerDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D098129D1AC165570085833D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D098129C1AC165570085833D /* main.m */; }; 11 | D09812A01AC165570085833D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D098129F1AC165570085833D /* AppDelegate.m */; }; 12 | D09812A31AC165570085833D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812A21AC165570085833D /* ViewController.m */; }; 13 | D09812A61AC165570085833D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D09812A41AC165570085833D /* Main.storyboard */; }; 14 | D09812A81AC165570085833D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D09812A71AC165570085833D /* Images.xcassets */; }; 15 | D09812AB1AC165570085833D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812A91AC165570085833D /* LaunchScreen.xib */; }; 16 | D09812B71AC165570085833D /* YSLContainerViewControllerDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812B61AC165570085833D /* YSLContainerViewControllerDemoTests.m */; }; 17 | D09812CB1AC26AEB0085833D /* PlayListTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812C91AC26AEB0085833D /* PlayListTableViewController.m */; }; 18 | D09812CC1AC26AEB0085833D /* PlayListTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812CA1AC26AEB0085833D /* PlayListTableViewController.xib */; }; 19 | D09812D11AC27EE20085833D /* PlayListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812CF1AC27EE20085833D /* PlayListCell.m */; }; 20 | D09812D21AC27EE20085833D /* PlayListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812D01AC27EE20085833D /* PlayListCell.xib */; }; 21 | D09812DC1AC283230085833D /* photo_sample_01.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D41AC283230085833D /* photo_sample_01.png */; }; 22 | D09812DD1AC283230085833D /* photo_sample_02.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D51AC283230085833D /* photo_sample_02.png */; }; 23 | D09812DE1AC283230085833D /* photo_sample_03.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D61AC283230085833D /* photo_sample_03.png */; }; 24 | D09812DF1AC283230085833D /* photo_sample_04.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D71AC283230085833D /* photo_sample_04.png */; }; 25 | D09812E01AC283230085833D /* photo_sample_05.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D81AC283230085833D /* photo_sample_05.png */; }; 26 | D09812E11AC283230085833D /* photo_sample_06.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812D91AC283230085833D /* photo_sample_06.png */; }; 27 | D09812E21AC283230085833D /* photo_sample_07.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812DA1AC283230085833D /* photo_sample_07.png */; }; 28 | D09812E31AC283230085833D /* photo_sample_08.png in Resources */ = {isa = PBXBuildFile; fileRef = D09812DB1AC283230085833D /* photo_sample_08.png */; }; 29 | D09812E71AC2849B0085833D /* ArtistsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812E51AC2849B0085833D /* ArtistsViewController.m */; }; 30 | D09812E81AC2849B0085833D /* ArtistsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812E61AC2849B0085833D /* ArtistsViewController.xib */; }; 31 | D09812EC1AC285520085833D /* ArtistsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812EA1AC285520085833D /* ArtistsCell.m */; }; 32 | D09812ED1AC285520085833D /* ArtistsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812EB1AC285520085833D /* ArtistsCell.xib */; }; 33 | D09812F11AC288440085833D /* SampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812EF1AC288440085833D /* SampleViewController.m */; }; 34 | D09812F21AC288440085833D /* SampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812F01AC288440085833D /* SampleViewController.xib */; }; 35 | D09812F61AC2956F0085833D /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D09812F41AC2956F0085833D /* DetailViewController.m */; }; 36 | D09812F71AC2956F0085833D /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D09812F51AC2956F0085833D /* DetailViewController.xib */; }; 37 | D0DD9FC21AFCB67E002CEBB6 /* YSLContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0DD9FBF1AFCB67E002CEBB6 /* YSLContainerViewController.m */; }; 38 | D0DD9FC31AFCB67E002CEBB6 /* YSLScrollMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0DD9FC11AFCB67E002CEBB6 /* YSLScrollMenuView.m */; }; 39 | /* End PBXBuildFile section */ 40 | 41 | /* Begin PBXContainerItemProxy section */ 42 | D09812B11AC165570085833D /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = D098128F1AC165570085833D /* Project object */; 45 | proxyType = 1; 46 | remoteGlobalIDString = D09812961AC165570085833D; 47 | remoteInfo = YSLContainerViewControllerDemo; 48 | }; 49 | /* End PBXContainerItemProxy section */ 50 | 51 | /* Begin PBXFileReference section */ 52 | D09812971AC165570085833D /* YSLContainerViewControllerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YSLContainerViewControllerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | D098129B1AC165570085833D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | D098129C1AC165570085833D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | D098129E1AC165570085833D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 56 | D098129F1AC165570085833D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 57 | D09812A11AC165570085833D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 58 | D09812A21AC165570085833D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 59 | D09812A51AC165570085833D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 60 | D09812A71AC165570085833D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 61 | D09812AA1AC165570085833D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 62 | D09812B01AC165570085833D /* YSLContainerViewControllerDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YSLContainerViewControllerDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | D09812B51AC165570085833D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | D09812B61AC165570085833D /* YSLContainerViewControllerDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YSLContainerViewControllerDemoTests.m; sourceTree = ""; }; 65 | D09812C81AC26AEB0085833D /* PlayListTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlayListTableViewController.h; path = YSLContainerViewControllerDemo/PlayListTableViewController.h; sourceTree = SOURCE_ROOT; }; 66 | D09812C91AC26AEB0085833D /* PlayListTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlayListTableViewController.m; path = YSLContainerViewControllerDemo/PlayListTableViewController.m; sourceTree = SOURCE_ROOT; }; 67 | D09812CA1AC26AEB0085833D /* PlayListTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PlayListTableViewController.xib; path = YSLContainerViewControllerDemo/PlayListTableViewController.xib; sourceTree = SOURCE_ROOT; }; 68 | D09812CE1AC27EE20085833D /* PlayListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlayListCell.h; path = YSLContainerViewControllerDemo/PlayListCell.h; sourceTree = SOURCE_ROOT; }; 69 | D09812CF1AC27EE20085833D /* PlayListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlayListCell.m; path = YSLContainerViewControllerDemo/PlayListCell.m; sourceTree = SOURCE_ROOT; }; 70 | D09812D01AC27EE20085833D /* PlayListCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PlayListCell.xib; path = YSLContainerViewControllerDemo/PlayListCell.xib; sourceTree = SOURCE_ROOT; }; 71 | D09812D41AC283230085833D /* photo_sample_01.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_01.png; sourceTree = ""; }; 72 | D09812D51AC283230085833D /* photo_sample_02.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_02.png; sourceTree = ""; }; 73 | D09812D61AC283230085833D /* photo_sample_03.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_03.png; sourceTree = ""; }; 74 | D09812D71AC283230085833D /* photo_sample_04.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_04.png; sourceTree = ""; }; 75 | D09812D81AC283230085833D /* photo_sample_05.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_05.png; sourceTree = ""; }; 76 | D09812D91AC283230085833D /* photo_sample_06.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_06.png; sourceTree = ""; }; 77 | D09812DA1AC283230085833D /* photo_sample_07.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_07.png; sourceTree = ""; }; 78 | D09812DB1AC283230085833D /* photo_sample_08.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photo_sample_08.png; sourceTree = ""; }; 79 | D09812E41AC2849B0085833D /* ArtistsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArtistsViewController.h; path = YSLContainerViewControllerDemo/ArtistsViewController.h; sourceTree = SOURCE_ROOT; }; 80 | D09812E51AC2849B0085833D /* ArtistsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ArtistsViewController.m; path = YSLContainerViewControllerDemo/ArtistsViewController.m; sourceTree = SOURCE_ROOT; }; 81 | D09812E61AC2849B0085833D /* ArtistsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ArtistsViewController.xib; path = YSLContainerViewControllerDemo/ArtistsViewController.xib; sourceTree = SOURCE_ROOT; }; 82 | D09812E91AC285520085833D /* ArtistsCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArtistsCell.h; path = YSLContainerViewControllerDemo/ArtistsCell.h; sourceTree = SOURCE_ROOT; }; 83 | D09812EA1AC285520085833D /* ArtistsCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ArtistsCell.m; path = YSLContainerViewControllerDemo/ArtistsCell.m; sourceTree = SOURCE_ROOT; }; 84 | D09812EB1AC285520085833D /* ArtistsCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ArtistsCell.xib; path = YSLContainerViewControllerDemo/ArtistsCell.xib; sourceTree = SOURCE_ROOT; }; 85 | D09812EE1AC288440085833D /* SampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SampleViewController.h; path = YSLContainerViewControllerDemo/SampleViewController.h; sourceTree = SOURCE_ROOT; }; 86 | D09812EF1AC288440085833D /* SampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SampleViewController.m; path = YSLContainerViewControllerDemo/SampleViewController.m; sourceTree = SOURCE_ROOT; }; 87 | D09812F01AC288440085833D /* SampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SampleViewController.xib; path = YSLContainerViewControllerDemo/SampleViewController.xib; sourceTree = SOURCE_ROOT; }; 88 | D09812F31AC2956F0085833D /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetailViewController.h; path = YSLContainerViewControllerDemo/DetailViewController.h; sourceTree = SOURCE_ROOT; }; 89 | D09812F41AC2956F0085833D /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DetailViewController.m; path = YSLContainerViewControllerDemo/DetailViewController.m; sourceTree = SOURCE_ROOT; }; 90 | D09812F51AC2956F0085833D /* DetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DetailViewController.xib; path = YSLContainerViewControllerDemo/DetailViewController.xib; sourceTree = SOURCE_ROOT; }; 91 | D0DD9FBE1AFCB67E002CEBB6 /* YSLContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YSLContainerViewController.h; sourceTree = ""; }; 92 | D0DD9FBF1AFCB67E002CEBB6 /* YSLContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YSLContainerViewController.m; sourceTree = ""; }; 93 | D0DD9FC01AFCB67E002CEBB6 /* YSLScrollMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YSLScrollMenuView.h; sourceTree = ""; }; 94 | D0DD9FC11AFCB67E002CEBB6 /* YSLScrollMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YSLScrollMenuView.m; sourceTree = ""; }; 95 | /* End PBXFileReference section */ 96 | 97 | /* Begin PBXFrameworksBuildPhase section */ 98 | D09812941AC165570085833D /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | D09812AD1AC165570085833D /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXFrameworksBuildPhase section */ 113 | 114 | /* Begin PBXGroup section */ 115 | D098128E1AC165570085833D = { 116 | isa = PBXGroup; 117 | children = ( 118 | D09812991AC165570085833D /* YSLContainerViewControllerDemo */, 119 | D09812B31AC165570085833D /* YSLContainerViewControllerDemoTests */, 120 | D09812981AC165570085833D /* Products */, 121 | ); 122 | sourceTree = ""; 123 | }; 124 | D09812981AC165570085833D /* Products */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | D09812971AC165570085833D /* YSLContainerViewControllerDemo.app */, 128 | D09812B01AC165570085833D /* YSLContainerViewControllerDemoTests.xctest */, 129 | ); 130 | name = Products; 131 | sourceTree = ""; 132 | }; 133 | D09812991AC165570085833D /* YSLContainerViewControllerDemo */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | D0DD9FBD1AFCB67E002CEBB6 /* YSLContainerViewController */, 137 | D09812D31AC283230085833D /* Resources */, 138 | D09812C71AC26A990085833D /* ViewControllers */, 139 | D09812CD1AC27EB70085833D /* cells */, 140 | D098129E1AC165570085833D /* AppDelegate.h */, 141 | D098129F1AC165570085833D /* AppDelegate.m */, 142 | D09812A11AC165570085833D /* ViewController.h */, 143 | D09812A21AC165570085833D /* ViewController.m */, 144 | D09812A41AC165570085833D /* Main.storyboard */, 145 | D09812A71AC165570085833D /* Images.xcassets */, 146 | D09812A91AC165570085833D /* LaunchScreen.xib */, 147 | D098129A1AC165570085833D /* Supporting Files */, 148 | ); 149 | path = YSLContainerViewControllerDemo; 150 | sourceTree = ""; 151 | }; 152 | D098129A1AC165570085833D /* Supporting Files */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | D098129B1AC165570085833D /* Info.plist */, 156 | D098129C1AC165570085833D /* main.m */, 157 | ); 158 | name = "Supporting Files"; 159 | sourceTree = ""; 160 | }; 161 | D09812B31AC165570085833D /* YSLContainerViewControllerDemoTests */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | D09812B61AC165570085833D /* YSLContainerViewControllerDemoTests.m */, 165 | D09812B41AC165570085833D /* Supporting Files */, 166 | ); 167 | path = YSLContainerViewControllerDemoTests; 168 | sourceTree = ""; 169 | }; 170 | D09812B41AC165570085833D /* Supporting Files */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | D09812B51AC165570085833D /* Info.plist */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | D09812C71AC26A990085833D /* ViewControllers */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | D09812C81AC26AEB0085833D /* PlayListTableViewController.h */, 182 | D09812C91AC26AEB0085833D /* PlayListTableViewController.m */, 183 | D09812CA1AC26AEB0085833D /* PlayListTableViewController.xib */, 184 | D09812E41AC2849B0085833D /* ArtistsViewController.h */, 185 | D09812E51AC2849B0085833D /* ArtistsViewController.m */, 186 | D09812E61AC2849B0085833D /* ArtistsViewController.xib */, 187 | D09812EE1AC288440085833D /* SampleViewController.h */, 188 | D09812EF1AC288440085833D /* SampleViewController.m */, 189 | D09812F01AC288440085833D /* SampleViewController.xib */, 190 | D09812F31AC2956F0085833D /* DetailViewController.h */, 191 | D09812F41AC2956F0085833D /* DetailViewController.m */, 192 | D09812F51AC2956F0085833D /* DetailViewController.xib */, 193 | ); 194 | name = ViewControllers; 195 | path = YSLContainerViewController; 196 | sourceTree = ""; 197 | }; 198 | D09812CD1AC27EB70085833D /* cells */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | D09812CE1AC27EE20085833D /* PlayListCell.h */, 202 | D09812CF1AC27EE20085833D /* PlayListCell.m */, 203 | D09812D01AC27EE20085833D /* PlayListCell.xib */, 204 | D09812E91AC285520085833D /* ArtistsCell.h */, 205 | D09812EA1AC285520085833D /* ArtistsCell.m */, 206 | D09812EB1AC285520085833D /* ArtistsCell.xib */, 207 | ); 208 | name = cells; 209 | path = YSLContainerViewController; 210 | sourceTree = ""; 211 | }; 212 | D09812D31AC283230085833D /* Resources */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | D09812D41AC283230085833D /* photo_sample_01.png */, 216 | D09812D51AC283230085833D /* photo_sample_02.png */, 217 | D09812D61AC283230085833D /* photo_sample_03.png */, 218 | D09812D71AC283230085833D /* photo_sample_04.png */, 219 | D09812D81AC283230085833D /* photo_sample_05.png */, 220 | D09812D91AC283230085833D /* photo_sample_06.png */, 221 | D09812DA1AC283230085833D /* photo_sample_07.png */, 222 | D09812DB1AC283230085833D /* photo_sample_08.png */, 223 | ); 224 | path = Resources; 225 | sourceTree = ""; 226 | }; 227 | D0DD9FBD1AFCB67E002CEBB6 /* YSLContainerViewController */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | D0DD9FBE1AFCB67E002CEBB6 /* YSLContainerViewController.h */, 231 | D0DD9FBF1AFCB67E002CEBB6 /* YSLContainerViewController.m */, 232 | D0DD9FC01AFCB67E002CEBB6 /* YSLScrollMenuView.h */, 233 | D0DD9FC11AFCB67E002CEBB6 /* YSLScrollMenuView.m */, 234 | ); 235 | path = YSLContainerViewController; 236 | sourceTree = SOURCE_ROOT; 237 | }; 238 | /* End PBXGroup section */ 239 | 240 | /* Begin PBXNativeTarget section */ 241 | D09812961AC165570085833D /* YSLContainerViewControllerDemo */ = { 242 | isa = PBXNativeTarget; 243 | buildConfigurationList = D09812BA1AC165570085833D /* Build configuration list for PBXNativeTarget "YSLContainerViewControllerDemo" */; 244 | buildPhases = ( 245 | D09812931AC165570085833D /* Sources */, 246 | D09812941AC165570085833D /* Frameworks */, 247 | D09812951AC165570085833D /* Resources */, 248 | ); 249 | buildRules = ( 250 | ); 251 | dependencies = ( 252 | ); 253 | name = YSLContainerViewControllerDemo; 254 | productName = YSLContainerViewControllerDemo; 255 | productReference = D09812971AC165570085833D /* YSLContainerViewControllerDemo.app */; 256 | productType = "com.apple.product-type.application"; 257 | }; 258 | D09812AF1AC165570085833D /* YSLContainerViewControllerDemoTests */ = { 259 | isa = PBXNativeTarget; 260 | buildConfigurationList = D09812BD1AC165570085833D /* Build configuration list for PBXNativeTarget "YSLContainerViewControllerDemoTests" */; 261 | buildPhases = ( 262 | D09812AC1AC165570085833D /* Sources */, 263 | D09812AD1AC165570085833D /* Frameworks */, 264 | D09812AE1AC165570085833D /* Resources */, 265 | ); 266 | buildRules = ( 267 | ); 268 | dependencies = ( 269 | D09812B21AC165570085833D /* PBXTargetDependency */, 270 | ); 271 | name = YSLContainerViewControllerDemoTests; 272 | productName = YSLContainerViewControllerDemoTests; 273 | productReference = D09812B01AC165570085833D /* YSLContainerViewControllerDemoTests.xctest */; 274 | productType = "com.apple.product-type.bundle.unit-test"; 275 | }; 276 | /* End PBXNativeTarget section */ 277 | 278 | /* Begin PBXProject section */ 279 | D098128F1AC165570085833D /* Project object */ = { 280 | isa = PBXProject; 281 | attributes = { 282 | LastUpgradeCheck = 0620; 283 | ORGANIZATIONNAME = h.yamaguchi; 284 | TargetAttributes = { 285 | D09812961AC165570085833D = { 286 | CreatedOnToolsVersion = 6.2; 287 | }; 288 | D09812AF1AC165570085833D = { 289 | CreatedOnToolsVersion = 6.2; 290 | TestTargetID = D09812961AC165570085833D; 291 | }; 292 | }; 293 | }; 294 | buildConfigurationList = D09812921AC165570085833D /* Build configuration list for PBXProject "YSLContainerViewControllerDemo" */; 295 | compatibilityVersion = "Xcode 3.2"; 296 | developmentRegion = English; 297 | hasScannedForEncodings = 0; 298 | knownRegions = ( 299 | en, 300 | Base, 301 | ); 302 | mainGroup = D098128E1AC165570085833D; 303 | productRefGroup = D09812981AC165570085833D /* Products */; 304 | projectDirPath = ""; 305 | projectRoot = ""; 306 | targets = ( 307 | D09812961AC165570085833D /* YSLContainerViewControllerDemo */, 308 | D09812AF1AC165570085833D /* YSLContainerViewControllerDemoTests */, 309 | ); 310 | }; 311 | /* End PBXProject section */ 312 | 313 | /* Begin PBXResourcesBuildPhase section */ 314 | D09812951AC165570085833D /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | D09812D21AC27EE20085833D /* PlayListCell.xib in Resources */, 319 | D09812A61AC165570085833D /* Main.storyboard in Resources */, 320 | D09812F71AC2956F0085833D /* DetailViewController.xib in Resources */, 321 | D09812DD1AC283230085833D /* photo_sample_02.png in Resources */, 322 | D09812E31AC283230085833D /* photo_sample_08.png in Resources */, 323 | D09812E11AC283230085833D /* photo_sample_06.png in Resources */, 324 | D09812E01AC283230085833D /* photo_sample_05.png in Resources */, 325 | D09812DE1AC283230085833D /* photo_sample_03.png in Resources */, 326 | D09812CC1AC26AEB0085833D /* PlayListTableViewController.xib in Resources */, 327 | D09812AB1AC165570085833D /* LaunchScreen.xib in Resources */, 328 | D09812A81AC165570085833D /* Images.xcassets in Resources */, 329 | D09812F21AC288440085833D /* SampleViewController.xib in Resources */, 330 | D09812DC1AC283230085833D /* photo_sample_01.png in Resources */, 331 | D09812E81AC2849B0085833D /* ArtistsViewController.xib in Resources */, 332 | D09812DF1AC283230085833D /* photo_sample_04.png in Resources */, 333 | D09812E21AC283230085833D /* photo_sample_07.png in Resources */, 334 | D09812ED1AC285520085833D /* ArtistsCell.xib in Resources */, 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | }; 338 | D09812AE1AC165570085833D /* Resources */ = { 339 | isa = PBXResourcesBuildPhase; 340 | buildActionMask = 2147483647; 341 | files = ( 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | /* End PBXResourcesBuildPhase section */ 346 | 347 | /* Begin PBXSourcesBuildPhase section */ 348 | D09812931AC165570085833D /* Sources */ = { 349 | isa = PBXSourcesBuildPhase; 350 | buildActionMask = 2147483647; 351 | files = ( 352 | D09812F11AC288440085833D /* SampleViewController.m in Sources */, 353 | D09812A31AC165570085833D /* ViewController.m in Sources */, 354 | D09812A01AC165570085833D /* AppDelegate.m in Sources */, 355 | D09812E71AC2849B0085833D /* ArtistsViewController.m in Sources */, 356 | D098129D1AC165570085833D /* main.m in Sources */, 357 | D09812EC1AC285520085833D /* ArtistsCell.m in Sources */, 358 | D09812F61AC2956F0085833D /* DetailViewController.m in Sources */, 359 | D09812D11AC27EE20085833D /* PlayListCell.m in Sources */, 360 | D0DD9FC31AFCB67E002CEBB6 /* YSLScrollMenuView.m in Sources */, 361 | D09812CB1AC26AEB0085833D /* PlayListTableViewController.m in Sources */, 362 | D0DD9FC21AFCB67E002CEBB6 /* YSLContainerViewController.m in Sources */, 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | D09812AC1AC165570085833D /* Sources */ = { 367 | isa = PBXSourcesBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | D09812B71AC165570085833D /* YSLContainerViewControllerDemoTests.m in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | /* End PBXSourcesBuildPhase section */ 375 | 376 | /* Begin PBXTargetDependency section */ 377 | D09812B21AC165570085833D /* PBXTargetDependency */ = { 378 | isa = PBXTargetDependency; 379 | target = D09812961AC165570085833D /* YSLContainerViewControllerDemo */; 380 | targetProxy = D09812B11AC165570085833D /* PBXContainerItemProxy */; 381 | }; 382 | /* End PBXTargetDependency section */ 383 | 384 | /* Begin PBXVariantGroup section */ 385 | D09812A41AC165570085833D /* Main.storyboard */ = { 386 | isa = PBXVariantGroup; 387 | children = ( 388 | D09812A51AC165570085833D /* Base */, 389 | ); 390 | name = Main.storyboard; 391 | sourceTree = ""; 392 | }; 393 | D09812A91AC165570085833D /* LaunchScreen.xib */ = { 394 | isa = PBXVariantGroup; 395 | children = ( 396 | D09812AA1AC165570085833D /* Base */, 397 | ); 398 | name = LaunchScreen.xib; 399 | sourceTree = ""; 400 | }; 401 | /* End PBXVariantGroup section */ 402 | 403 | /* Begin XCBuildConfiguration section */ 404 | D09812B81AC165570085833D /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ALWAYS_SEARCH_USER_PATHS = NO; 408 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 409 | CLANG_CXX_LIBRARY = "libc++"; 410 | CLANG_ENABLE_MODULES = YES; 411 | CLANG_ENABLE_OBJC_ARC = YES; 412 | CLANG_WARN_BOOL_CONVERSION = YES; 413 | CLANG_WARN_CONSTANT_CONVERSION = YES; 414 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 415 | CLANG_WARN_EMPTY_BODY = YES; 416 | CLANG_WARN_ENUM_CONVERSION = YES; 417 | CLANG_WARN_INT_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_UNREACHABLE_CODE = YES; 420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 422 | COPY_PHASE_STRIP = NO; 423 | ENABLE_STRICT_OBJC_MSGSEND = YES; 424 | GCC_C_LANGUAGE_STANDARD = gnu99; 425 | GCC_DYNAMIC_NO_PIC = NO; 426 | GCC_OPTIMIZATION_LEVEL = 0; 427 | GCC_PREPROCESSOR_DEFINITIONS = ( 428 | "DEBUG=1", 429 | "$(inherited)", 430 | ); 431 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 432 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 433 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 434 | GCC_WARN_UNDECLARED_SELECTOR = YES; 435 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 436 | GCC_WARN_UNUSED_FUNCTION = YES; 437 | GCC_WARN_UNUSED_VARIABLE = YES; 438 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 439 | MTL_ENABLE_DEBUG_INFO = YES; 440 | ONLY_ACTIVE_ARCH = YES; 441 | SDKROOT = iphoneos; 442 | }; 443 | name = Debug; 444 | }; 445 | D09812B91AC165570085833D /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | buildSettings = { 448 | ALWAYS_SEARCH_USER_PATHS = NO; 449 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 450 | CLANG_CXX_LIBRARY = "libc++"; 451 | CLANG_ENABLE_MODULES = YES; 452 | CLANG_ENABLE_OBJC_ARC = YES; 453 | CLANG_WARN_BOOL_CONVERSION = YES; 454 | CLANG_WARN_CONSTANT_CONVERSION = YES; 455 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 456 | CLANG_WARN_EMPTY_BODY = YES; 457 | CLANG_WARN_ENUM_CONVERSION = YES; 458 | CLANG_WARN_INT_CONVERSION = YES; 459 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 460 | CLANG_WARN_UNREACHABLE_CODE = YES; 461 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 462 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 463 | COPY_PHASE_STRIP = NO; 464 | ENABLE_NS_ASSERTIONS = NO; 465 | ENABLE_STRICT_OBJC_MSGSEND = YES; 466 | GCC_C_LANGUAGE_STANDARD = gnu99; 467 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 468 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 469 | GCC_WARN_UNDECLARED_SELECTOR = YES; 470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 471 | GCC_WARN_UNUSED_FUNCTION = YES; 472 | GCC_WARN_UNUSED_VARIABLE = YES; 473 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 474 | MTL_ENABLE_DEBUG_INFO = NO; 475 | SDKROOT = iphoneos; 476 | VALIDATE_PRODUCT = YES; 477 | }; 478 | name = Release; 479 | }; 480 | D09812BB1AC165570085833D /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 484 | INFOPLIST_FILE = YSLContainerViewControllerDemo/Info.plist; 485 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | }; 489 | name = Debug; 490 | }; 491 | D09812BC1AC165570085833D /* Release */ = { 492 | isa = XCBuildConfiguration; 493 | buildSettings = { 494 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 495 | INFOPLIST_FILE = YSLContainerViewControllerDemo/Info.plist; 496 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | }; 500 | name = Release; 501 | }; 502 | D09812BE1AC165570085833D /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | buildSettings = { 505 | BUNDLE_LOADER = "$(TEST_HOST)"; 506 | FRAMEWORK_SEARCH_PATHS = ( 507 | "$(SDKROOT)/Developer/Library/Frameworks", 508 | "$(inherited)", 509 | ); 510 | GCC_PREPROCESSOR_DEFINITIONS = ( 511 | "DEBUG=1", 512 | "$(inherited)", 513 | ); 514 | INFOPLIST_FILE = YSLContainerViewControllerDemoTests/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YSLContainerViewControllerDemo.app/YSLContainerViewControllerDemo"; 518 | }; 519 | name = Debug; 520 | }; 521 | D09812BF1AC165570085833D /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | BUNDLE_LOADER = "$(TEST_HOST)"; 525 | FRAMEWORK_SEARCH_PATHS = ( 526 | "$(SDKROOT)/Developer/Library/Frameworks", 527 | "$(inherited)", 528 | ); 529 | INFOPLIST_FILE = YSLContainerViewControllerDemoTests/Info.plist; 530 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YSLContainerViewControllerDemo.app/YSLContainerViewControllerDemo"; 533 | }; 534 | name = Release; 535 | }; 536 | /* End XCBuildConfiguration section */ 537 | 538 | /* Begin XCConfigurationList section */ 539 | D09812921AC165570085833D /* Build configuration list for PBXProject "YSLContainerViewControllerDemo" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | D09812B81AC165570085833D /* Debug */, 543 | D09812B91AC165570085833D /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | D09812BA1AC165570085833D /* Build configuration list for PBXNativeTarget "YSLContainerViewControllerDemo" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | D09812BB1AC165570085833D /* Debug */, 552 | D09812BC1AC165570085833D /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | D09812BD1AC165570085833D /* Build configuration list for PBXNativeTarget "YSLContainerViewControllerDemoTests" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | D09812BE1AC165570085833D /* Debug */, 561 | D09812BF1AC165570085833D /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | /* End XCConfigurationList section */ 567 | }; 568 | rootObject = D098128F1AC165570085833D /* Project object */; 569 | } 570 | --------------------------------------------------------------------------------