├── RFSegmentView ├── en.lproj │ └── InfoPlist.strings ├── samplePic.png ├── Images.xcassets │ ├── LaunchImage.launchimage │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@2x-1.png │ │ ├── LaunchImage-568h@2x.png │ │ ├── LaunchImage-568h@2x-1.png │ │ ├── LaunchImage-800-667h@2x.png │ │ ├── LaunchImage-800-Portrait-736h@3x.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── RFViewController.h ├── RFAppDelegate.h ├── main.m ├── RFSegmentView-Prefix.pch ├── Info.plist ├── RFViewController.m ├── RFAppDelegate.m ├── RFSegmentView.h └── RFSegmentView.m ├── RFSegmentViewTests ├── en.lproj │ └── InfoPlist.strings ├── RFSegmentViewTests-Info.plist └── RFSegmentViewTests.m ├── RFSegmentView.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── wangruofeng.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── RFSegmentView.xcscheme └── project.pbxproj ├── .gitignore ├── LICENSE.md ├── README.md └── RFSegmentView.podspec /RFSegmentView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RFSegmentViewTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RFSegmentView/samplePic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/samplePic.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x-1.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-568h@2x.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-568h@2x-1.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangruofeng/RFSegmentView/HEAD/RFSegmentView/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/xcuserdata/wangruofeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /RFSegmentView/RFViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RFViewController.h 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RFViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RFSegmentView/RFAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // RFAppDelegate.h 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RFAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RFSegmentView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "RFAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([RFAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RFSegmentView/RFSegmentView-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_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | Pods/ 28 | Podfile.lock 29 | builds/ 30 | output/ -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/xcuserdata/wangruofeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RFSegmentView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D87240381A675E170021D067 16 | 17 | primary 18 | 19 | 20 | D87240531A675E170021D067 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /RFSegmentViewTests/RFSegmentViewTests-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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RFSegmentViewTests/RFSegmentViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RFSegmentViewTests.m 3 | // RFSegmentViewTests 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RFSegmentViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation RFSegmentViewTests 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 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2016 wangruofeng 3 | 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 | -------------------------------------------------------------------------------- /RFSegmentView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIRequiresFullScreen 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "29x29", 26 | "scale" : "3x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "40x40", 36 | "scale" : "3x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "57x57", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "iphone", 45 | "size" : "57x57", 46 | "scale" : "2x" 47 | }, 48 | { 49 | "idiom" : "iphone", 50 | "size" : "60x60", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "iphone", 55 | "size" : "60x60", 56 | "scale" : "3x" 57 | }, 58 | { 59 | "idiom" : "ios-marketing", 60 | "size" : "1024x1024", 61 | "scale" : "1x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /RFSegmentView/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "LaunchImage-800-Portrait-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "667h", 16 | "filename" : "LaunchImage-800-667h@2x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "orientation" : "portrait", 23 | "idiom" : "iphone", 24 | "filename" : "LaunchImage@2x.png", 25 | "extent" : "full-screen", 26 | "minimum-system-version" : "7.0", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "extent" : "full-screen", 31 | "idiom" : "iphone", 32 | "subtype" : "retina4", 33 | "filename" : "LaunchImage-568h@2x.png", 34 | "minimum-system-version" : "7.0", 35 | "orientation" : "portrait", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "orientation" : "portrait", 40 | "idiom" : "iphone", 41 | "extent" : "full-screen", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "orientation" : "portrait", 46 | "idiom" : "iphone", 47 | "filename" : "LaunchImage@2x-1.png", 48 | "extent" : "full-screen", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "orientation" : "portrait", 53 | "idiom" : "iphone", 54 | "filename" : "LaunchImage-568h@2x-1.png", 55 | "extent" : "full-screen", 56 | "subtype" : "retina4", 57 | "scale" : "2x" 58 | } 59 | ], 60 | "info" : { 61 | "version" : 1, 62 | "author" : "xcode" 63 | } 64 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOS RFSegmentView 2 | Imitate after iOS7 style segmented controls! 3 | ***It is simple, Elegant, practical!*** 4 | 5 | 6 | ## Requirements 7 | _**iOS8.0 and later**_ 8 | 9 | 10 | ## Usage 11 | 12 | ### install via source code 13 | 14 | 1. download the newest code , and `#import "RFSegmentView.h"` 15 | 2. use blow method to initialize 16 | ```objective-c 17 | - (instancetype)initWithFrame:(CGRect)frame titles:(NSArray *)titles; 18 | ``` 19 | 3. set TintColor and delegate or block handler if needed 20 | 4. implement delegate callBack function if you use delegate 21 | ```objective-c 22 | - (void)segmentView:(RFSegmentView * __nullable)segmentView didSelectedIndex:(NSUInteger)selectedIndex; 23 | ``` 24 | or use block callback 25 | ```objective-c 26 | segmentView.handlder = ^ (RFSegmentView * __nullable view, NSUInteger selectedIndex) { 27 | // doSomething 28 | }; 29 | ``` 30 | 31 | ### install via CocoaPod 32 | 33 | first add to config to Podfile 34 | ```ruby 35 | pod 'RFSegmentView', '~>1.3.0' 36 | ``` 37 | 38 | then import header file and enjoy it. 39 | ```objective-c 40 | #import 41 | ``` 42 | 43 | ### below is sample code 44 | 45 | ```objective-c 46 | 47 | RFSegmentView* segmentView = [[RFSegmentView alloc] initWithFrame:aRect titles:@[@"spring",@"summer",@"autumn",@"winnter"]]; 48 | segmentView.tintColor = aColor; 49 | //segmentView.delegate = self; 50 | segmentView.handlder = ^ (RFSegmentView * __nullable view, NSUInteger selectedIndex) { 51 | // doSomething 52 | }; 53 | [self.view addSubview:segmentView]; 54 | ``` 55 | 56 | Ps:you can also use delegate callback. 57 | 58 | ## Screenshot 59 | 60 | 61 | 62 | 63 | ## Download 64 | #### You can download binary release from the [latest releases](https://github.com/wangruofeng/RFSegmentView/archive/master.zip). 65 | 66 | 67 | ## License 68 | RFSegmentView is released under the MIT license. See [LICENSE](/LICENSE) for details. 69 | -------------------------------------------------------------------------------- /RFSegmentView/RFViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RFViewController.m 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import "RFViewController.h" 10 | #import "RFSegmentView.h" 11 | 12 | #define kScreenWidth [UIScreen mainScreen].bounds.size.width 13 | #define kScreenHeight [UIScreen mainScreen].bounds.size.height 14 | 15 | @interface RFViewController () 16 | 17 | @end 18 | 19 | @implementation RFViewController 20 | 21 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 22 | { 23 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 24 | if (self) { 25 | // Custom initialization 26 | } 27 | return self; 28 | } 29 | 30 | - (void)viewDidLoad 31 | { 32 | [super viewDidLoad]; 33 | 34 | CGFloat initX = 0; 35 | CGFloat initY = 20.f; 36 | NSInteger numbersOfView = 10; 37 | CGFloat viewWidth = kScreenWidth; 38 | CGFloat viewHeight = (kScreenHeight - initY) / numbersOfView; 39 | 40 | for (int i = 0; i < numbersOfView; i++) { 41 | RFSegmentView *segmentView = [[RFSegmentView alloc] initWithFrame:CGRectMake(initX, initY, viewWidth, viewHeight) 42 | titles:@[@"spring",@"summer",@"autumn",@"winter"]]; 43 | 44 | segmentView.tintColor = [self getRandomColor]; 45 | //segmentView.delegate = self; 46 | segmentView.selectedIndex = i%5; 47 | // segmentView.itemHeight = 50.f; 48 | segmentView.leftRightMargin = 16.0; 49 | // segmentView.cornerRadius = 5.f; 50 | segmentView.handlder = ^ (RFSegmentView * __nullable view, NSUInteger selectedIndex) { 51 | NSLog(@"view:%@ selectedIndex: %lu",view,(unsigned long)selectedIndex); 52 | }; 53 | 54 | [self.view addSubview:segmentView]; 55 | 56 | initY += viewHeight; 57 | } 58 | } 59 | 60 | - (UIColor *)getRandomColor 61 | { 62 | UIColor *color = [UIColor colorWithRed:arc4random()%255/255.0 green:arc4random()%255/255.0 blue:arc4random()%255/255.0 alpha:1]; 63 | return color; 64 | } 65 | 66 | - (void)segmentView:(RFSegmentView * __nullable)segmentView didSelectedIndex:(NSUInteger)selectedIndex 67 | { 68 | NSLog(@"current index is %lu",(unsigned long)index); 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /RFSegmentView/RFAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // RFAppDelegate.m 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | 9 | #import "RFAppDelegate.h" 10 | #import "RFViewController.h" 11 | 12 | @implementation RFAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 17 | // Override point for customization after application launch. 18 | self.window.backgroundColor = [UIColor whiteColor]; 19 | [self.window makeKeyAndVisible]; 20 | 21 | RFViewController *vc = [[RFViewController alloc] init]; 22 | self.window.rootViewController = vc; 23 | 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | // 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. 30 | // 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. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application 34 | { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application 40 | { 41 | // 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. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application 45 | { 46 | // 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. 47 | } 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application 50 | { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /RFSegmentView/RFSegmentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // RFSegmentView.h 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | // This source code is licensed under the MIT-style license found in the 9 | // LICENSE file in the root directory of this source tree. 10 | // 11 | 12 | #import 13 | 14 | @class RFSegmentView; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @protocol RFSegmentViewDelegate 19 | 20 | @required 21 | - (void)segmentView:(RFSegmentView * __nullable)segmentView didSelectedIndex:(NSUInteger)selectedIndex; 22 | 23 | @end 24 | 25 | /** 26 | * This is a SegmentView 27 | * @discussion This class supports iOS5 and above,you can create a segmentView like iOS7's style -- flatting. 28 | 29 | Example: 30 | 31 | RFSegmentView* segmentView = [[RFSegmentView alloc] initWithFrame:aRect titles:@[@"spring",@"summer",@"autumn",@"winnter"]]; 32 | 33 | segmentView.tintColor = [UIColor orangeColor]; 34 | segmentView.selectedIndex = 2; 35 | segmentView.itemHeight = 30.f; 36 | segmentView.leftRightMargin = 50.f; 37 | segmentView.handlder = ^ (RFSegmentView * __nullable view, NSInteger selectedIndex) { 38 | // doSomething 39 | }; 40 | 41 | [self.view addSubview:segmentView]; 42 | 43 | Ps:It also support delegate style callback. 44 | 45 | */ 46 | @interface RFSegmentView : UIView 47 | 48 | typedef void (^selectedHandler)(RFSegmentView * __nullable view, NSUInteger selectedIndex); 49 | 50 | #pragma mark - Accessing the Delegate 51 | 52 | ///============================================================================= 53 | /// @name Accessing the Delegate 54 | ///============================================================================= 55 | 56 | @property (nullable, nonatomic, weak) id delegate; 57 | 58 | #pragma mark - Accessing the BlockHandler 59 | 60 | ///============================================================================= 61 | /// @name Accessing the BlockHandler 62 | ///============================================================================= 63 | 64 | @property (nullable, nonatomic, copy) selectedHandler handlder; 65 | 66 | #pragma mark - Configuring the Text Attributes 67 | 68 | ///============================================================================= 69 | /// @name Configuring the Text Attributes 70 | ///============================================================================= 71 | 72 | @property (nonatomic, strong) UIColor *tintColor; ///< set style color, default blue color. 73 | @property (nonatomic, assign) CGFloat leftRightMargin; ///< set RFSegmentView left and right margin, default 15.f. 74 | @property (nonatomic, assign) CGFloat itemHeight; ///< set RFSegmentView item height, default 30.f. 75 | @property (nonatomic, assign) CGFloat cornerRadius; ///< set RFSegmentView's cornerRadius, default 3.f. 76 | @property (nonatomic, assign, getter=currentSelectedIndex) NSUInteger selectedIndex; ///< set which item is seltected, default 0. 77 | 78 | #pragma mark - Initializer 79 | 80 | ///============================================================================= 81 | /// @name Initializer 82 | ///============================================================================= 83 | 84 | /** 85 | * Creates an RFSegmentView,designated initializer. 86 | * 87 | * @param frame RFSegmentView's frame. 88 | * @param titles a array of titles. 89 | * 90 | * @return a RFSegmentView instance, or nil if fail. 91 | */ 92 | - (instancetype)initWithFrame:(CGRect)frame 93 | titles:(NSArray * _Nonnull)titles; 94 | 95 | - (instancetype)init UNAVAILABLE_ATTRIBUTE; 96 | - (instancetype)initWithFrame:(CGRect)frame UNAVAILABLE_ATTRIBUTE; 97 | + (instancetype)new UNAVAILABLE_ATTRIBUTE; 98 | 99 | @end 100 | 101 | NS_ASSUME_NONNULL_END 102 | -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/xcuserdata/wangruofeng.xcuserdatad/xcschemes/RFSegmentView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 64 | 70 | 71 | 72 | 73 | 79 | 81 | 87 | 88 | 89 | 90 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /RFSegmentView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint RFSegmentView.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |spec| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | spec.name = "RFSegmentView" 19 | spec.version = "1.3.2" 20 | spec.summary = "Imitate iOS7 style segmented controls, simple, practical!" 21 | spec.homepage = "https://github.com/wangruofeng/RFSegmentView" 22 | # spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 23 | 24 | 25 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 26 | # 27 | # Licensing your code is important. See https://choosealicense.com for more info. 28 | # CocoaPods will detect a license file if there is a named LICENSE* 29 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 30 | # 31 | spec.license = { :type => "MIT", :file => "LICENSE.md" } 32 | 33 | 34 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 35 | # 36 | # Specify the authors of the library, with email addresses. Email addresses 37 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 38 | # accepts just a name if you'd rather not provide an email address. 39 | # 40 | # Specify a social_media_url where others can refer to, for example a twitter 41 | # profile URL. 42 | # 43 | 44 | spec.author = { "wangruofeng" => "wangruofeng007@gmail.com" } 45 | 46 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 47 | # 48 | # If this Pod runs only on iOS or OS X, then specify the platform and 49 | # the deployment target. You can optionally include the target after the platform. 50 | # 51 | 52 | # spec.platform = :ios 53 | spec.platform = :ios, "8.0" 54 | 55 | # When using multiple platforms 56 | # spec.ios.deployment_target = "5.0" 57 | # spec.osx.deployment_target = "10.7" 58 | # spec.watchos.deployment_target = "2.0" 59 | # spec.tvos.deployment_target = "9.0" 60 | 61 | 62 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 63 | # 64 | # Specify the location from where the source should be retrieved. 65 | # Supports git, hg, bzr, svn and HTTP. 66 | # 67 | 68 | spec.source = { :git => 'https://github.com/wangruofeng/RFSegmentView.git', :tag => spec.version.to_s} 69 | 70 | 71 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 72 | # 73 | # CocoaPods is smart about how it includes source code. For source files 74 | # giving a folder will include any swift, h, m, mm, c & cpp files. 75 | # For header files it will include any header in the folder. 76 | # Not including the public_header_files will make all headers public. 77 | # 78 | 79 | spec.source_files = "RFSegmentView/RFSegmentView.{h,m}" 80 | # spec.exclude_files = "Classes/Exclude" 81 | 82 | # spec.public_header_files = "Classes/**/*.h" 83 | 84 | 85 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 86 | # 87 | # A list of resources included with the Pod. These are copied into the 88 | # target bundle with a build phase script. Anything else will be cleaned. 89 | # You can preserve files from being cleaned, please don't preserve 90 | # non-essential files like tests, examples and documentation. 91 | # 92 | 93 | # spec.resource = "icon.png" 94 | # spec.resources = "Resources/*.png" 95 | 96 | # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" 97 | 98 | 99 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 100 | # 101 | # Link your library with frameworks, or libraries. Libraries do not include 102 | # the lib prefix of their name. 103 | # 104 | 105 | # spec.framework = "SomeFramework" 106 | spec.frameworks = 'UIKit', 'CoreGraphics', 'Foundation' 107 | 108 | # spec.library = "iconv" 109 | # spec.libraries = "iconv", "xml2" 110 | 111 | 112 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 113 | # 114 | # If your library depends on compiler flags you can set them in the xcconfig hash 115 | # where they will only apply to your library. If you depend on other Podspecs 116 | # you can include multiple dependencies to ensure it works. 117 | 118 | spec.requires_arc = true 119 | 120 | # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 121 | # spec.dependency "JSONKit", "~> 1.4" 122 | 123 | end 124 | -------------------------------------------------------------------------------- /RFSegmentView/RFSegmentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // RFSegmentView.m 3 | // RFSegmentView 4 | // 5 | // Created by 王若风 on 1/15/15. 6 | // Copyright (c) 2015 王若风. All rights reserved. 7 | // 8 | // This source code is licensed under the MIT-style license found in the 9 | // LICENSE file in the root directory of this source tree. 10 | // 11 | 12 | #import "RFSegmentView.h" 13 | 14 | #define RGB(r,g,b) RGBA(r,g,b,1) 15 | #define RGBA(r,g,b,a) ([UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]) 16 | #define kDefaultTintColor RGB(3, 116, 255) 17 | #define KDefaultCornerRadius 3.f 18 | #define kLeftRightMargin 15 19 | #define kItemHeight 30 20 | #define kBorderLineWidth 0.5 21 | 22 | @class RFSegmentItemView; 23 | 24 | @protocol RFSegmentItemViewDelegate 25 | 26 | - (void)itemStateChanged:(RFSegmentItemView *)item 27 | index:(NSUInteger)index 28 | isSelected:(BOOL)isSelected; 29 | @end 30 | 31 | #pragma mark - RFSegmentItemView 32 | 33 | @interface RFSegmentItemView : UIView 34 | 35 | @property (nonatomic, strong) UILabel *titleLabel; 36 | 37 | @property (nonatomic, strong) UIColor *norColor; 38 | @property (nonatomic, strong) UIColor *selColor; 39 | @property (nonatomic, assign) NSInteger index; 40 | @property (nonatomic, assign) BOOL isSelected; 41 | @property (nonatomic, weak ) id delegate; 42 | 43 | @end 44 | 45 | @implementation RFSegmentItemView 46 | 47 | - (instancetype)initWithFrame:(CGRect)frame 48 | index:(NSInteger)index 49 | title:(NSString *)title 50 | norColor:(UIColor *)norColor 51 | selColor:(UIColor *)selColor 52 | isSelected:(BOOL)isSelected; 53 | { 54 | self = [super initWithFrame:frame]; 55 | if (self) { 56 | 57 | _titleLabel = [UILabel new]; 58 | _titleLabel.textAlignment = NSTextAlignmentCenter; 59 | _titleLabel.backgroundColor = [UIColor clearColor]; 60 | _titleLabel.font = [UIFont systemFontOfSize:14]; 61 | 62 | [self addSubview:_titleLabel]; 63 | 64 | _norColor = norColor; 65 | _selColor = selColor; 66 | _titleLabel.text = title; 67 | _index = index; 68 | _isSelected = isSelected; 69 | } 70 | 71 | return self; 72 | } 73 | 74 | - (void)layoutSubviews 75 | { 76 | [super layoutSubviews]; 77 | 78 | _titleLabel.frame = self.bounds; 79 | } 80 | 81 | #pragma mark - Setter 82 | 83 | - (void)setSelColor:(UIColor *)selColor 84 | { 85 | if (_selColor != selColor) { 86 | _selColor = selColor; 87 | 88 | if (_isSelected) { 89 | self.titleLabel.textColor = self.norColor; 90 | self.backgroundColor = self.selColor; 91 | } else { 92 | self.titleLabel.textColor = self.selColor; 93 | self.backgroundColor = self.norColor; 94 | } 95 | 96 | } 97 | } 98 | 99 | - (void)setIsSelected:(BOOL)isSelected 100 | { 101 | _isSelected = isSelected; 102 | 103 | if (_isSelected) { 104 | self.titleLabel.textColor = self.norColor; 105 | self.backgroundColor = self.selColor; 106 | } else { 107 | self.titleLabel.textColor = self.selColor; 108 | self.backgroundColor = self.norColor; 109 | } 110 | 111 | } 112 | 113 | #pragma mark - Event 114 | 115 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 116 | { 117 | self.isSelected = !_isSelected; 118 | 119 | if (_delegate) { 120 | [_delegate itemStateChanged:self 121 | index:self.index 122 | isSelected:self.isSelected]; 123 | } 124 | } 125 | 126 | @end 127 | 128 | #pragma mark - RFSegmentView 129 | 130 | @interface RFSegmentView() 131 | 132 | @property (nonatomic, strong) UIView *bgView; 133 | @property (nonatomic, strong) NSArray *titles; 134 | @property (nonatomic, strong) NSMutableArray *items; 135 | @property (nonatomic, strong) NSMutableArray *lines; 136 | 137 | @end 138 | 139 | @implementation RFSegmentView 140 | 141 | - (instancetype)initWithFrame:(CGRect)frame 142 | titles:(NSArray * _Nonnull)titles 143 | { 144 | self = [super initWithFrame:frame]; 145 | if (self) { 146 | 147 | NSAssert(titles.count >= 2, @"titles's cout at least 2!please check!"); 148 | 149 | self.backgroundColor = [UIColor clearColor]; 150 | 151 | _titles = titles; 152 | 153 | // bgView 154 | _bgView = [[UIView alloc] init]; 155 | _bgView.backgroundColor = [UIColor whiteColor]; 156 | _bgView.clipsToBounds = YES; 157 | _bgView.layer.cornerRadius = KDefaultCornerRadius; 158 | _bgView.layer.borderWidth = kBorderLineWidth; 159 | _bgView.layer.borderColor = kDefaultTintColor.CGColor; 160 | 161 | [self addSubview:_bgView]; 162 | 163 | [self addSubItemView]; 164 | [self addSubLineView]; 165 | } 166 | 167 | return self; 168 | } 169 | 170 | - (void)addSubItemView 171 | { 172 | NSInteger count = _titles.count; 173 | for (NSInteger i = 0; i < count; i++) { 174 | RFSegmentItemView *item = [[RFSegmentItemView alloc] initWithFrame:CGRectZero 175 | index:i 176 | title:_titles[i] 177 | norColor:[UIColor whiteColor] 178 | selColor:kDefaultTintColor 179 | isSelected:(i == 0)? YES: NO]; 180 | [_bgView addSubview:item]; 181 | item.delegate = self; 182 | 183 | //save all items 184 | if (!self.items) { 185 | self.items = [[NSMutableArray alloc] initWithCapacity:count]; 186 | } 187 | [_items addObject:item]; 188 | } 189 | } 190 | 191 | - (void)addSubLineView 192 | { 193 | NSInteger count = _titles.count; 194 | 195 | //add Ver lines 196 | for (NSInteger i = 0; i < count - 1; i++) { 197 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectZero]; 198 | lineView.backgroundColor = kDefaultTintColor; 199 | 200 | [_bgView addSubview:lineView]; 201 | 202 | //save all lines 203 | if (!self.lines) { 204 | self.lines = [[NSMutableArray alloc] initWithCapacity:count]; 205 | } 206 | [_lines addObject:lineView]; 207 | } 208 | } 209 | 210 | #pragma mark - Layout 211 | 212 | - (void)willMoveToSuperview:(UIView *)newSuperview 213 | { 214 | [self layoutUI]; 215 | } 216 | 217 | - (void)layoutUI 218 | { 219 | CGFloat viewWidth = CGRectGetWidth(self.frame); 220 | CGFloat viewHeight = CGRectGetHeight(self.frame); 221 | __block CGFloat initX = 0; 222 | CGFloat initY = 0; 223 | 224 | NSInteger count = self.titles.count; 225 | CGFloat leftRightMargin = self.leftRightMargin ?: kLeftRightMargin; 226 | CGFloat itemWidth = (viewWidth - 2 * leftRightMargin)/count; 227 | CGFloat itemHeight = self.itemHeight ?: kItemHeight; 228 | 229 | //configure bgView 230 | self.bgView.frame = CGRectMake(leftRightMargin, (viewHeight - itemHeight) / 2, viewWidth - 2 * leftRightMargin, itemHeight); 231 | 232 | //configure items 233 | [self.items enumerateObjectsUsingBlock:^(RFSegmentItemView * _Nonnull item, NSUInteger idx, BOOL * _Nonnull stop) { 234 | item.frame = CGRectMake(initX, initY, itemWidth, itemHeight); 235 | initX += itemWidth; 236 | }]; 237 | 238 | initX = 0; 239 | //configure lines 240 | [self.lines enumerateObjectsUsingBlock:^(UIView * _Nonnull lineView, NSUInteger idx, BOOL * _Nonnull stop) { 241 | initX += itemWidth; 242 | lineView.frame = CGRectMake(initX, 0, kBorderLineWidth, itemHeight); 243 | }]; 244 | 245 | } 246 | 247 | #pragma mark - Setter 248 | 249 | - (void)setCornerRadius:(CGFloat)cornerRadius{ 250 | 251 | NSAssert(cornerRadius > 0, @"cornerRadius must be above 0"); 252 | 253 | _cornerRadius = cornerRadius; 254 | _bgView.layer.cornerRadius = cornerRadius; 255 | 256 | [self layoutUI]; 257 | } 258 | 259 | - (void)setTintColor:(UIColor *)tintColor{ 260 | 261 | if (_tintColor != tintColor) { 262 | _tintColor = tintColor; 263 | 264 | self.bgView.layer.borderColor = tintColor.CGColor; 265 | 266 | for (NSInteger i = 0; i < self.items.count; i++) { 267 | RFSegmentItemView *item = self.items[i]; 268 | item.selColor = tintColor; 269 | } 270 | 271 | for (NSInteger i = 0; i < self.lines.count; i++) { 272 | UIView *lineView = self.lines[i]; 273 | lineView.backgroundColor = tintColor; 274 | } 275 | 276 | [self layoutUI]; 277 | } 278 | } 279 | 280 | - (void)setSelectedIndex:(NSUInteger)index 281 | { 282 | _selectedIndex = index; 283 | 284 | if (index < self.items.count) { 285 | for (int i = 0; i < self.items.count; i++) { 286 | RFSegmentItemView *item = self.items[i]; 287 | 288 | if (i == index) { 289 | [item setIsSelected:YES]; 290 | } else { 291 | [item setIsSelected:NO]; 292 | } 293 | } 294 | } 295 | } 296 | 297 | #pragma mark - RFSegmentItemViewDelegate 298 | 299 | - (void)itemStateChanged:(RFSegmentItemView *)currentItem index:(NSUInteger)index isSelected:(BOOL)isSelected 300 | { 301 | // diselect all items 302 | for (int i = 0; i < self.items.count; i++) { 303 | RFSegmentItemView *item = self.items[i]; 304 | item.isSelected = NO; 305 | } 306 | currentItem.isSelected = YES; 307 | 308 | // notify delegate 309 | if ([_delegate respondsToSelector:@selector(segmentView:didSelectedIndex:)]) { 310 | [_delegate segmentView:self didSelectedIndex:index]; 311 | } 312 | 313 | // notify block handler 314 | if (_handlder) { 315 | _handlder(self, index); 316 | } 317 | } 318 | 319 | @end 320 | -------------------------------------------------------------------------------- /RFSegmentView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0E001B6B2380FFD7008B9B03 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 0E001B692380FFD7008B9B03 /* README.md */; }; 11 | 0E001B6C2380FFD7008B9B03 /* LICENSE.md in Resources */ = {isa = PBXBuildFile; fileRef = 0E001B6A2380FFD7008B9B03 /* LICENSE.md */; }; 12 | 0E001B6F2381024E008B9B03 /* RFSegmentView.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 0E001B6E2381024E008B9B03 /* RFSegmentView.podspec */; }; 13 | 0E91C7A523921CDB0042D0A8 /* samplePic.png in Resources */ = {isa = PBXBuildFile; fileRef = 0E91C7A423921CDB0042D0A8 /* samplePic.png */; }; 14 | D872403D1A675E170021D067 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D872403C1A675E170021D067 /* Foundation.framework */; }; 15 | D872403F1A675E170021D067 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D872403E1A675E170021D067 /* CoreGraphics.framework */; }; 16 | D87240411A675E170021D067 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D87240401A675E170021D067 /* UIKit.framework */; }; 17 | D87240471A675E170021D067 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D87240451A675E170021D067 /* InfoPlist.strings */; }; 18 | D87240491A675E170021D067 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D87240481A675E170021D067 /* main.m */; }; 19 | D872404D1A675E170021D067 /* RFAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D872404C1A675E170021D067 /* RFAppDelegate.m */; }; 20 | D872404F1A675E170021D067 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D872404E1A675E170021D067 /* Images.xcassets */; }; 21 | D87240561A675E170021D067 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D87240551A675E170021D067 /* XCTest.framework */; }; 22 | D87240571A675E170021D067 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D872403C1A675E170021D067 /* Foundation.framework */; }; 23 | D87240581A675E170021D067 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D87240401A675E170021D067 /* UIKit.framework */; }; 24 | D87240601A675E170021D067 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D872405E1A675E170021D067 /* InfoPlist.strings */; }; 25 | D87240621A675E170021D067 /* RFSegmentViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D87240611A675E170021D067 /* RFSegmentViewTests.m */; }; 26 | D87240711A675E7D0021D067 /* RFSegmentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D87240701A675E7D0021D067 /* RFSegmentView.m */; }; 27 | D87240741A678D110021D067 /* RFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D87240731A678D110021D067 /* RFViewController.m */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | D87240591A675E170021D067 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = D87240311A675E170021D067 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = D87240381A675E170021D067; 36 | remoteInfo = RFSegmentView; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 0E001B692380FFD7008B9B03 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 42 | 0E001B6A2380FFD7008B9B03 /* LICENSE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = SOURCE_ROOT; }; 43 | 0E001B6E2381024E008B9B03 /* RFSegmentView.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = RFSegmentView.podspec; sourceTree = SOURCE_ROOT; }; 44 | 0E91C7A423921CDB0042D0A8 /* samplePic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = samplePic.png; sourceTree = ""; }; 45 | D87240391A675E170021D067 /* RFSegmentView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RFSegmentView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | D872403C1A675E170021D067 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 47 | D872403E1A675E170021D067 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 48 | D87240401A675E170021D067 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 49 | D87240441A675E170021D067 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | D87240461A675E170021D067 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | D87240481A675E170021D067 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | D872404A1A675E170021D067 /* RFSegmentView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RFSegmentView-Prefix.pch"; sourceTree = ""; }; 53 | D872404B1A675E170021D067 /* RFAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RFAppDelegate.h; sourceTree = ""; }; 54 | D872404C1A675E170021D067 /* RFAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RFAppDelegate.m; sourceTree = ""; }; 55 | D872404E1A675E170021D067 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | D87240541A675E170021D067 /* RFSegmentViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RFSegmentViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | D87240551A675E170021D067 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 58 | D872405D1A675E170021D067 /* RFSegmentViewTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RFSegmentViewTests-Info.plist"; sourceTree = ""; }; 59 | D872405F1A675E170021D067 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | D87240611A675E170021D067 /* RFSegmentViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RFSegmentViewTests.m; sourceTree = ""; }; 61 | D872406F1A675E7D0021D067 /* RFSegmentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RFSegmentView.h; sourceTree = ""; }; 62 | D87240701A675E7D0021D067 /* RFSegmentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFSegmentView.m; sourceTree = ""; }; 63 | D87240721A678D100021D067 /* RFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RFViewController.h; sourceTree = ""; }; 64 | D87240731A678D110021D067 /* RFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFViewController.m; sourceTree = ""; }; 65 | /* End PBXFileReference section */ 66 | 67 | /* Begin PBXFrameworksBuildPhase section */ 68 | D87240361A675E170021D067 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | D872403F1A675E170021D067 /* CoreGraphics.framework in Frameworks */, 73 | D87240411A675E170021D067 /* UIKit.framework in Frameworks */, 74 | D872403D1A675E170021D067 /* Foundation.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | D87240511A675E170021D067 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | D87240561A675E170021D067 /* XCTest.framework in Frameworks */, 83 | D87240581A675E170021D067 /* UIKit.framework in Frameworks */, 84 | D87240571A675E170021D067 /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | D87240301A675E170021D067 = { 92 | isa = PBXGroup; 93 | children = ( 94 | D87240421A675E170021D067 /* RFSegmentView */, 95 | D872405B1A675E170021D067 /* RFSegmentViewTests */, 96 | D872403B1A675E170021D067 /* Frameworks */, 97 | D872403A1A675E170021D067 /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | D872403A1A675E170021D067 /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | D87240391A675E170021D067 /* RFSegmentView.app */, 105 | D87240541A675E170021D067 /* RFSegmentViewTests.xctest */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | D872403B1A675E170021D067 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | D872403C1A675E170021D067 /* Foundation.framework */, 114 | D872403E1A675E170021D067 /* CoreGraphics.framework */, 115 | D87240401A675E170021D067 /* UIKit.framework */, 116 | D87240551A675E170021D067 /* XCTest.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | D87240421A675E170021D067 /* RFSegmentView */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | D872404B1A675E170021D067 /* RFAppDelegate.h */, 125 | D872404C1A675E170021D067 /* RFAppDelegate.m */, 126 | D87240721A678D100021D067 /* RFViewController.h */, 127 | D87240731A678D110021D067 /* RFViewController.m */, 128 | D872406F1A675E7D0021D067 /* RFSegmentView.h */, 129 | D87240701A675E7D0021D067 /* RFSegmentView.m */, 130 | 0E001B6A2380FFD7008B9B03 /* LICENSE.md */, 131 | 0E001B692380FFD7008B9B03 /* README.md */, 132 | 0E001B6E2381024E008B9B03 /* RFSegmentView.podspec */, 133 | D872404E1A675E170021D067 /* Images.xcassets */, 134 | 0E91C7A423921CDB0042D0A8 /* samplePic.png */, 135 | D87240431A675E170021D067 /* Supporting Files */, 136 | ); 137 | path = RFSegmentView; 138 | sourceTree = ""; 139 | }; 140 | D87240431A675E170021D067 /* Supporting Files */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | D87240441A675E170021D067 /* Info.plist */, 144 | D87240451A675E170021D067 /* InfoPlist.strings */, 145 | D87240481A675E170021D067 /* main.m */, 146 | D872404A1A675E170021D067 /* RFSegmentView-Prefix.pch */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | D872405B1A675E170021D067 /* RFSegmentViewTests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | D87240611A675E170021D067 /* RFSegmentViewTests.m */, 155 | D872405C1A675E170021D067 /* Supporting Files */, 156 | ); 157 | path = RFSegmentViewTests; 158 | sourceTree = ""; 159 | }; 160 | D872405C1A675E170021D067 /* Supporting Files */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | D872405D1A675E170021D067 /* RFSegmentViewTests-Info.plist */, 164 | D872405E1A675E170021D067 /* InfoPlist.strings */, 165 | ); 166 | name = "Supporting Files"; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXGroup section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | D87240381A675E170021D067 /* RFSegmentView */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = D87240651A675E170021D067 /* Build configuration list for PBXNativeTarget "RFSegmentView" */; 175 | buildPhases = ( 176 | D87240351A675E170021D067 /* Sources */, 177 | D87240361A675E170021D067 /* Frameworks */, 178 | D87240371A675E170021D067 /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = RFSegmentView; 185 | productName = RFSegmentView; 186 | productReference = D87240391A675E170021D067 /* RFSegmentView.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | D87240531A675E170021D067 /* RFSegmentViewTests */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = D87240681A675E170021D067 /* Build configuration list for PBXNativeTarget "RFSegmentViewTests" */; 192 | buildPhases = ( 193 | D87240501A675E170021D067 /* Sources */, 194 | D87240511A675E170021D067 /* Frameworks */, 195 | D87240521A675E170021D067 /* Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | D872405A1A675E170021D067 /* PBXTargetDependency */, 201 | ); 202 | name = RFSegmentViewTests; 203 | productName = RFSegmentViewTests; 204 | productReference = D87240541A675E170021D067 /* RFSegmentViewTests.xctest */; 205 | productType = "com.apple.product-type.bundle.unit-test"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | D87240311A675E170021D067 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | CLASSPREFIX = RF; 214 | LastUpgradeCheck = 1120; 215 | ORGANIZATIONNAME = "王若风"; 216 | TargetAttributes = { 217 | D87240381A675E170021D067 = { 218 | DevelopmentTeam = Q2T8K3RPZ5; 219 | }; 220 | D87240531A675E170021D067 = { 221 | DevelopmentTeam = 2N5KTK34YU; 222 | TestTargetID = D87240381A675E170021D067; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = D87240341A675E170021D067 /* Build configuration list for PBXProject "RFSegmentView" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = en; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = D87240301A675E170021D067; 235 | productRefGroup = D872403A1A675E170021D067 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | D87240381A675E170021D067 /* RFSegmentView */, 240 | D87240531A675E170021D067 /* RFSegmentViewTests */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXResourcesBuildPhase section */ 246 | D87240371A675E170021D067 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | 0E001B6C2380FFD7008B9B03 /* LICENSE.md in Resources */, 251 | D87240471A675E170021D067 /* InfoPlist.strings in Resources */, 252 | 0E001B6B2380FFD7008B9B03 /* README.md in Resources */, 253 | D872404F1A675E170021D067 /* Images.xcassets in Resources */, 254 | 0E91C7A523921CDB0042D0A8 /* samplePic.png in Resources */, 255 | 0E001B6F2381024E008B9B03 /* RFSegmentView.podspec in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | D87240521A675E170021D067 /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | D87240601A675E170021D067 /* InfoPlist.strings in Resources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | /* End PBXResourcesBuildPhase section */ 268 | 269 | /* Begin PBXSourcesBuildPhase section */ 270 | D87240351A675E170021D067 /* Sources */ = { 271 | isa = PBXSourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | D87240741A678D110021D067 /* RFViewController.m in Sources */, 275 | D87240711A675E7D0021D067 /* RFSegmentView.m in Sources */, 276 | D872404D1A675E170021D067 /* RFAppDelegate.m in Sources */, 277 | D87240491A675E170021D067 /* main.m in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | D87240501A675E170021D067 /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | D87240621A675E170021D067 /* RFSegmentViewTests.m in Sources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXSourcesBuildPhase section */ 290 | 291 | /* Begin PBXTargetDependency section */ 292 | D872405A1A675E170021D067 /* PBXTargetDependency */ = { 293 | isa = PBXTargetDependency; 294 | target = D87240381A675E170021D067 /* RFSegmentView */; 295 | targetProxy = D87240591A675E170021D067 /* PBXContainerItemProxy */; 296 | }; 297 | /* End PBXTargetDependency section */ 298 | 299 | /* Begin PBXVariantGroup section */ 300 | D87240451A675E170021D067 /* InfoPlist.strings */ = { 301 | isa = PBXVariantGroup; 302 | children = ( 303 | D87240461A675E170021D067 /* en */, 304 | ); 305 | name = InfoPlist.strings; 306 | sourceTree = ""; 307 | }; 308 | D872405E1A675E170021D067 /* InfoPlist.strings */ = { 309 | isa = PBXVariantGroup; 310 | children = ( 311 | D872405F1A675E170021D067 /* en */, 312 | ); 313 | name = InfoPlist.strings; 314 | sourceTree = ""; 315 | }; 316 | /* End PBXVariantGroup section */ 317 | 318 | /* Begin XCBuildConfiguration section */ 319 | D87240631A675E170021D067 /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INFINITE_RECURSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 342 | CLANG_WARN_STRICT_PROTOTYPES = YES; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | ENABLE_STRICT_OBJC_MSGSEND = YES; 349 | ENABLE_TESTABILITY = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_DYNAMIC_NO_PIC = NO; 352 | GCC_NO_COMMON_BLOCKS = YES; 353 | GCC_OPTIMIZATION_LEVEL = 0; 354 | GCC_PREPROCESSOR_DEFINITIONS = ( 355 | "DEBUG=1", 356 | "$(inherited)", 357 | ); 358 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 366 | ONLY_ACTIVE_ARCH = YES; 367 | SDKROOT = iphoneos; 368 | }; 369 | name = Debug; 370 | }; 371 | D87240641A675E170021D067 /* Release */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ALWAYS_SEARCH_USER_PATHS = NO; 375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 376 | CLANG_CXX_LIBRARY = "libc++"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 380 | CLANG_WARN_BOOL_CONVERSION = YES; 381 | CLANG_WARN_COMMA = YES; 382 | CLANG_WARN_CONSTANT_CONVERSION = YES; 383 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 385 | CLANG_WARN_EMPTY_BODY = YES; 386 | CLANG_WARN_ENUM_CONVERSION = YES; 387 | CLANG_WARN_INFINITE_RECURSION = YES; 388 | CLANG_WARN_INT_CONVERSION = YES; 389 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 390 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 391 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 393 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 394 | CLANG_WARN_STRICT_PROTOTYPES = YES; 395 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 396 | CLANG_WARN_UNREACHABLE_CODE = YES; 397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 399 | COPY_PHASE_STRIP = YES; 400 | ENABLE_NS_ASSERTIONS = NO; 401 | ENABLE_STRICT_OBJC_MSGSEND = YES; 402 | GCC_C_LANGUAGE_STANDARD = gnu99; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 405 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 406 | GCC_WARN_UNDECLARED_SELECTOR = YES; 407 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 408 | GCC_WARN_UNUSED_FUNCTION = YES; 409 | GCC_WARN_UNUSED_VARIABLE = YES; 410 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 411 | SDKROOT = iphoneos; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | D87240661A675E170021D067 /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 420 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 421 | DEVELOPMENT_TEAM = Q2T8K3RPZ5; 422 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 423 | GCC_PREFIX_HEADER = "RFSegmentView/RFSegmentView-Prefix.pch"; 424 | INFOPLIST_FILE = RFSegmentView/Info.plist; 425 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 426 | MARKETING_VERSION = 1.3.0; 427 | PRODUCT_BUNDLE_IDENTIFIER = "com.wangdada.${PRODUCT_NAME:rfc1034identifier}"; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | WRAPPER_EXTENSION = app; 430 | }; 431 | name = Debug; 432 | }; 433 | D87240671A675E170021D067 /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 438 | DEVELOPMENT_TEAM = Q2T8K3RPZ5; 439 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 440 | GCC_PREFIX_HEADER = "RFSegmentView/RFSegmentView-Prefix.pch"; 441 | INFOPLIST_FILE = RFSegmentView/Info.plist; 442 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 443 | MARKETING_VERSION = 1.3.0; 444 | PRODUCT_BUNDLE_IDENTIFIER = "com.wangdada.${PRODUCT_NAME:rfc1034identifier}"; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | WRAPPER_EXTENSION = app; 447 | }; 448 | name = Release; 449 | }; 450 | D87240691A675E170021D067 /* Debug */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RFSegmentView.app/RFSegmentView"; 454 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; 455 | DEVELOPMENT_TEAM = 2N5KTK34YU; 456 | FRAMEWORK_SEARCH_PATHS = ( 457 | "$(SDKROOT)/Developer/Library/Frameworks", 458 | "$(inherited)", 459 | "$(DEVELOPER_FRAMEWORKS_DIR)", 460 | ); 461 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 462 | GCC_PREFIX_HEADER = "RFSegmentView/RFSegmentView-Prefix.pch"; 463 | GCC_PREPROCESSOR_DEFINITIONS = ( 464 | "DEBUG=1", 465 | "$(inherited)", 466 | ); 467 | INFOPLIST_FILE = "RFSegmentViewTests/RFSegmentViewTests-Info.plist"; 468 | PRODUCT_BUNDLE_IDENTIFIER = "com.wangdada.${PRODUCT_NAME:rfc1034identifier}"; 469 | PRODUCT_NAME = "$(TARGET_NAME)"; 470 | TEST_HOST = "$(BUNDLE_LOADER)"; 471 | WRAPPER_EXTENSION = xctest; 472 | }; 473 | name = Debug; 474 | }; 475 | D872406A1A675E170021D067 /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RFSegmentView.app/RFSegmentView"; 479 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; 480 | DEVELOPMENT_TEAM = 2N5KTK34YU; 481 | FRAMEWORK_SEARCH_PATHS = ( 482 | "$(SDKROOT)/Developer/Library/Frameworks", 483 | "$(inherited)", 484 | "$(DEVELOPER_FRAMEWORKS_DIR)", 485 | ); 486 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 487 | GCC_PREFIX_HEADER = "RFSegmentView/RFSegmentView-Prefix.pch"; 488 | INFOPLIST_FILE = "RFSegmentViewTests/RFSegmentViewTests-Info.plist"; 489 | PRODUCT_BUNDLE_IDENTIFIER = "com.wangdada.${PRODUCT_NAME:rfc1034identifier}"; 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 | D87240341A675E170021D067 /* Build configuration list for PBXProject "RFSegmentView" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | D87240631A675E170021D067 /* Debug */, 503 | D87240641A675E170021D067 /* Release */, 504 | ); 505 | defaultConfigurationIsVisible = 0; 506 | defaultConfigurationName = Release; 507 | }; 508 | D87240651A675E170021D067 /* Build configuration list for PBXNativeTarget "RFSegmentView" */ = { 509 | isa = XCConfigurationList; 510 | buildConfigurations = ( 511 | D87240661A675E170021D067 /* Debug */, 512 | D87240671A675E170021D067 /* Release */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | D87240681A675E170021D067 /* Build configuration list for PBXNativeTarget "RFSegmentViewTests" */ = { 518 | isa = XCConfigurationList; 519 | buildConfigurations = ( 520 | D87240691A675E170021D067 /* Debug */, 521 | D872406A1A675E170021D067 /* Release */, 522 | ); 523 | defaultConfigurationIsVisible = 0; 524 | defaultConfigurationName = Release; 525 | }; 526 | /* End XCConfigurationList section */ 527 | }; 528 | rootObject = D87240311A675E170021D067 /* Project object */; 529 | } 530 | --------------------------------------------------------------------------------