├── MyRatingBar ├── en.lproj │ └── InfoPlist.strings ├── IMG_1115.PNG ├── ViewController.h ├── AppDelegate.h ├── main.m ├── MyRatingBar-Prefix.pch ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── ViewController.m ├── MyRatingBar-Info.plist ├── Base.lproj │ └── Main.storyboard └── AppDelegate.m ├── MyRatingBarTests ├── en.lproj │ └── InfoPlist.strings ├── MyRatingBarTests-Info.plist └── MyRatingBarTests.m ├── RatingBar ├── Images.xcassets │ ├── bt_star_a.imageset │ │ ├── bt_star_b.png │ │ ├── bt_star_a@2x.png │ │ └── Contents.json │ └── bt_star_b.imageset │ │ ├── bt_star_b.png │ │ ├── bt_star_b@2x.png │ │ └── Contents.json ├── RatingBar.h └── RatingBar.m ├── MyRatingBar.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── wang.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── ehlpc07.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── MyRatingBar.xccheckout ├── xcuserdata │ ├── wang.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── MyRatingBar.xcscheme │ ├── ehlpc07.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── MyRatingBar.xcscheme │ └── wangyeqing.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── MyRatingBar.xcscheme └── project.pbxproj ├── .gitignore ├── README.md ├── RatingBar.podspec └── LICENSE /MyRatingBar/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /MyRatingBarTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /MyRatingBar/IMG_1115.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/MyRatingBar/IMG_1115.PNG -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_a.imageset/bt_star_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/RatingBar/Images.xcassets/bt_star_a.imageset/bt_star_b.png -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_b.imageset/bt_star_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/RatingBar/Images.xcassets/bt_star_b.imageset/bt_star_b.png -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_a.imageset/bt_star_a@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/RatingBar/Images.xcassets/bt_star_a.imageset/bt_star_a@2x.png -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_b.imageset/bt_star_b@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/RatingBar/Images.xcassets/bt_star_b.imageset/bt_star_b@2x.png -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/project.xcworkspace/xcuserdata/wang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/MyRatingBar.xcodeproj/project.xcworkspace/xcuserdata/wang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/project.xcworkspace/xcuserdata/ehlpc07.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuyedaidao/RatingBar/HEAD/MyRatingBar.xcodeproj/project.xcworkspace/xcuserdata/ehlpc07.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MyRatingBar/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | # 3 | # We recommend against adding the Pods directory to your .gitignore. However 4 | # you should judge for yourself, the pros and cons are mentioned at: 5 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control? 6 | # 7 | # Pods/ 8 | 9 | -------------------------------------------------------------------------------- /MyRatingBar/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | RatingBar 2 | ========= 3 | ![pic](https://github.com/yuyedaidao/RatingBar/blob/master/MyRatingBar/IMG_1115.PNG) 4 | 5 | ####使用说明 6 | > pod RatingBar, '~>0.0.1' 7 | 8 | RatingBar *bar = [[RatingBar alloc] initWithFrame:CGRectMake(50, 50, 180, 30)]; 9 | [view addSubview:bar]; 10 | 如果评分最后只需 11 | 12 | bar.starNumber 13 | 就可获得星星的数量 14 | 15 | 如果展示只需 16 | 17 | bar.starNumber = count; 18 | -------------------------------------------------------------------------------- /MyRatingBar/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MyRatingBar/MyRatingBar-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /MyRatingBar/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_a.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "bt_star_b.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "bt_star_a@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /RatingBar/Images.xcassets/bt_star_b.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "bt_star_b.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "bt_star_b@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /MyRatingBar/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RatingBar.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = 'RatingBar' #我的开源名字 4 | s.version = '0.0.2' #版本号 5 | s.author = { 'yuyedaidao' => 'wyqpadding@gmail.com' } #作者信息 6 | s.homepage = 'https://github.com/yuyedaidao/RatingBar.git' #项目的主页 7 | s.summary = 'a ratingbar like the one on appstore' #项目描述 8 | s.license = 'MIT' #开源项目遵守的协议 9 | s.source = { :git => 'https://github.com/yuyedaidao/RatingBar.git', :tag => s.version.to_s } #开源项目的资源,版本号一般以tag作为标识 10 | s.source_files = 'RatingBar/*.{h,m,xcassets}' #开源文件目录 11 | s.platform = :ios #平台 12 | s.ios.deployment_target = '6.0' #面向的目标 13 | s.requires_arc = true #是否需要ARC 14 | end 15 | -------------------------------------------------------------------------------- /RatingBar/RatingBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // RatingBar.h 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol RatingDelegate 12 | @optional 13 | -(void) setRating:(NSInteger)rating isHuman:(BOOL) isHuman; 14 | @end 15 | 16 | @interface RatingBar : UIView 17 | @property (nonatomic,assign) NSInteger starNumber; 18 | /* 19 | *调整底部视图的颜色 20 | */ 21 | @property (nonatomic,strong) UIColor *viewColor; 22 | 23 | /* 24 | *是否允许可触摸 25 | */ 26 | @property (nonatomic,assign) BOOL enable; 27 | 28 | @property (nonatomic, assign) id delegate; 29 | @end 30 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/wang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MyRatingBar.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 213D864B19AF5E04006DD902 16 | 17 | primary 18 | 19 | 20 | 213D866C19AF5E04006DD902 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/ehlpc07.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MyRatingBar.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 213D864B19AF5E04006DD902 16 | 17 | primary 18 | 19 | 20 | 213D866C19AF5E04006DD902 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/wangyeqing.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MyRatingBar.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 213D864B19AF5E04006DD902 16 | 17 | primary 18 | 19 | 20 | 213D866C19AF5E04006DD902 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MyRatingBarTests/MyRatingBarTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.leaf.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MyRatingBarTests/MyRatingBarTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyRatingBarTests.m 3 | // MyRatingBarTests 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyRatingBarTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MyRatingBarTests 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 | -------------------------------------------------------------------------------- /MyRatingBar/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "RatingBar.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | 23 | RatingBar *bar = [[RatingBar alloc] initWithFrame:CGRectMake(50, 50, 180, 30)]; 24 | [self.view addSubview:bar]; 25 | 26 | bar.center = self.view.center; 27 | 28 | } 29 | 30 | - (void)didReceiveMemoryWarning 31 | { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 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 | -------------------------------------------------------------------------------- /MyRatingBar/MyRatingBar-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.wyq.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/project.xcworkspace/xcshareddata/MyRatingBar.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 717C64E0-6BCD-4708-B1A5-ABE21BF22B06 9 | IDESourceControlProjectName 10 | MyRatingBar 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 6A8070A9A947E6BEE396C98D54017058C674F76C 14 | https://github.com/yuyedaidao/RatingBar.git 15 | 16 | IDESourceControlProjectPath 17 | MyRatingBar.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 6A8070A9A947E6BEE396C98D54017058C674F76C 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/yuyedaidao/RatingBar.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 6A8070A9A947E6BEE396C98D54017058C674F76C 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 6A8070A9A947E6BEE396C98D54017058C674F76C 36 | IDESourceControlWCCName 37 | RatingBar 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MyRatingBar/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 | -------------------------------------------------------------------------------- /MyRatingBar/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/wangyeqing.xcuserdatad/xcschemes/MyRatingBar.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /RatingBar/RatingBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // RatingBar.m 3 | // MyRatingBar 4 | // 5 | // Created by Leaf on 14-8-28. 6 | // Copyright (c) 2014年 Leaf. All rights reserved. 7 | // 8 | 9 | #import "RatingBar.h" 10 | #define ZOOM 0.8f 11 | @interface RatingBar() 12 | @property (nonatomic,strong) UIView *bottomView; 13 | @property (nonatomic,strong) UIView *topView; 14 | @property (nonatomic,assign) CGFloat starWidth; 15 | @end 16 | 17 | @implementation RatingBar 18 | 19 | @synthesize delegate; 20 | 21 | - (id)initWithFrame:(CGRect)frame 22 | { 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | // Initialization code 26 | self.backgroundColor = [UIColor whiteColor]; 27 | self.bottomView = [[UIView alloc] initWithFrame:self.bounds]; 28 | self.topView = [[UIView alloc] initWithFrame:CGRectZero]; 29 | 30 | [self addSubview:self.bottomView]; 31 | [self addSubview:self.topView]; 32 | 33 | self.topView.clipsToBounds = YES; 34 | self.topView.userInteractionEnabled = NO; 35 | self.bottomView.userInteractionEnabled = NO; 36 | self.userInteractionEnabled = YES; 37 | 38 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)]; 39 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)]; 40 | [self addGestureRecognizer:tap]; 41 | [self addGestureRecognizer:pan]; 42 | 43 | // 44 | CGFloat width = frame.size.width/7.0; 45 | self.starWidth = width; 46 | for(int i = 0;i<5;i++){ 47 | UIImageView *img = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, width*ZOOM, width*ZOOM)]; 48 | img.center = CGPointMake((i+1.5)*width, frame.size.height/2); 49 | img.image = [UIImage imageNamed:@"bt_star_a"]; 50 | [self.bottomView addSubview:img]; 51 | UIImageView *img2 = [[UIImageView alloc] initWithFrame:img.frame]; 52 | img2.center = img.center; 53 | img2.image = [UIImage imageNamed:@"bt_star_b"]; 54 | [self.topView addSubview:img2]; 55 | } 56 | self.enable = YES; 57 | 58 | } 59 | return self; 60 | } 61 | -(void)setViewColor:(UIColor *)backgroundColor{ 62 | if(_viewColor!=backgroundColor){ 63 | self.backgroundColor = backgroundColor; 64 | self.topView.backgroundColor = backgroundColor; 65 | self.bottomView.backgroundColor = backgroundColor; 66 | } 67 | } 68 | -(void)setStarNumber:(NSInteger)starNumber{ 69 | if(_starNumber!=starNumber){ 70 | _starNumber = starNumber; 71 | self.topView.frame = CGRectMake(0, 0, self.starWidth*(starNumber+1), self.bounds.size.height); 72 | } 73 | if([delegate respondsToSelector:@selector(setRating:isHuman:)]){ 74 | [delegate setRating:_starNumber isHuman:NO]; 75 | } 76 | } 77 | -(void)tap:(UITapGestureRecognizer *)gesture{ 78 | if(self.enable){ 79 | CGPoint point = [gesture locationInView:self]; 80 | NSInteger count = (int)(point.x/self.starWidth)+1; 81 | self.topView.frame = CGRectMake(0, 0, self.starWidth*count, self.bounds.size.height); 82 | if(count>5){ 83 | _starNumber = 5; 84 | }else{ 85 | _starNumber = count-1; 86 | } 87 | } 88 | if([delegate respondsToSelector:@selector(setRating:isHuman:)]){ 89 | [delegate setRating:_starNumber isHuman:YES]; 90 | } 91 | } 92 | -(void)pan:(UIPanGestureRecognizer *)gesture{ 93 | if(self.enable){ 94 | CGPoint point = [gesture locationInView:self]; 95 | NSInteger count = (int)(point.x/self.starWidth); 96 | if(count>=0 && count<=5 && _starNumber!=count){ 97 | self.topView.frame = CGRectMake(0, 0, self.starWidth*(count+1), self.bounds.size.height); 98 | _starNumber = count; 99 | } 100 | } 101 | } 102 | /* 103 | // Only override drawRect: if you perform custom drawing. 104 | // An empty implementation adversely affects performance during animation. 105 | - (void)drawRect:(CGRect)rect 106 | { 107 | // Drawing code 108 | } 109 | */ 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/ehlpc07.xcuserdatad/xcschemes/MyRatingBar.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/xcuserdata/wang.xcuserdatad/xcschemes/MyRatingBar.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /MyRatingBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 211985EB19B01123007DAB2D /* IMG_1115.PNG in Resources */ = {isa = PBXBuildFile; fileRef = 211985EA19B01123007DAB2D /* IMG_1115.PNG */; }; 11 | 213D865019AF5E04006DD902 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D864F19AF5E04006DD902 /* Foundation.framework */; }; 12 | 213D865219AF5E04006DD902 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D865119AF5E04006DD902 /* CoreGraphics.framework */; }; 13 | 213D865419AF5E04006DD902 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D865319AF5E04006DD902 /* UIKit.framework */; }; 14 | 213D865A19AF5E04006DD902 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 213D865819AF5E04006DD902 /* InfoPlist.strings */; }; 15 | 213D865C19AF5E04006DD902 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 213D865B19AF5E04006DD902 /* main.m */; }; 16 | 213D866019AF5E04006DD902 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 213D865F19AF5E04006DD902 /* AppDelegate.m */; }; 17 | 213D866319AF5E04006DD902 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 213D866119AF5E04006DD902 /* Main.storyboard */; }; 18 | 213D866619AF5E04006DD902 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 213D866519AF5E04006DD902 /* ViewController.m */; }; 19 | 213D866819AF5E04006DD902 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 213D866719AF5E04006DD902 /* Images.xcassets */; }; 20 | 213D866F19AF5E04006DD902 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D866E19AF5E04006DD902 /* XCTest.framework */; }; 21 | 213D867019AF5E04006DD902 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D864F19AF5E04006DD902 /* Foundation.framework */; }; 22 | 213D867119AF5E04006DD902 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 213D865319AF5E04006DD902 /* UIKit.framework */; }; 23 | 213D867919AF5E04006DD902 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 213D867719AF5E04006DD902 /* InfoPlist.strings */; }; 24 | 213D867B19AF5E04006DD902 /* MyRatingBarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 213D867A19AF5E04006DD902 /* MyRatingBarTests.m */; }; 25 | 213D868719AF5F38006DD902 /* RatingBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 213D868619AF5F38006DD902 /* RatingBar.m */; }; 26 | 5CE295EE1AA4798000B7BD8D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5CE295ED1AA4798000B7BD8D /* Images.xcassets */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 213D867219AF5E04006DD902 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 213D864419AF5E04006DD902 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 213D864B19AF5E04006DD902; 35 | remoteInfo = MyRatingBar; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 211985EA19B01123007DAB2D /* IMG_1115.PNG */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = IMG_1115.PNG; sourceTree = ""; }; 41 | 213D864C19AF5E04006DD902 /* MyRatingBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyRatingBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 213D864F19AF5E04006DD902 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 43 | 213D865119AF5E04006DD902 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 44 | 213D865319AF5E04006DD902 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 45 | 213D865719AF5E04006DD902 /* MyRatingBar-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MyRatingBar-Info.plist"; sourceTree = ""; }; 46 | 213D865919AF5E04006DD902 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 47 | 213D865B19AF5E04006DD902 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 48 | 213D865D19AF5E04006DD902 /* MyRatingBar-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MyRatingBar-Prefix.pch"; sourceTree = ""; }; 49 | 213D865E19AF5E04006DD902 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 50 | 213D865F19AF5E04006DD902 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 51 | 213D866219AF5E04006DD902 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 213D866419AF5E04006DD902 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 53 | 213D866519AF5E04006DD902 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 54 | 213D866719AF5E04006DD902 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 55 | 213D866D19AF5E04006DD902 /* MyRatingBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyRatingBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 213D866E19AF5E04006DD902 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 57 | 213D867619AF5E04006DD902 /* MyRatingBarTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MyRatingBarTests-Info.plist"; sourceTree = ""; }; 58 | 213D867819AF5E04006DD902 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 59 | 213D867A19AF5E04006DD902 /* MyRatingBarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyRatingBarTests.m; sourceTree = ""; }; 60 | 213D868519AF5F38006DD902 /* RatingBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RatingBar.h; sourceTree = ""; }; 61 | 213D868619AF5F38006DD902 /* RatingBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RatingBar.m; sourceTree = ""; }; 62 | 5CE295ED1AA4798000B7BD8D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 213D864919AF5E04006DD902 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 213D865219AF5E04006DD902 /* CoreGraphics.framework in Frameworks */, 71 | 213D865419AF5E04006DD902 /* UIKit.framework in Frameworks */, 72 | 213D865019AF5E04006DD902 /* Foundation.framework in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 213D866A19AF5E04006DD902 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | 213D866F19AF5E04006DD902 /* XCTest.framework in Frameworks */, 81 | 213D867119AF5E04006DD902 /* UIKit.framework in Frameworks */, 82 | 213D867019AF5E04006DD902 /* Foundation.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | /* End PBXFrameworksBuildPhase section */ 87 | 88 | /* Begin PBXGroup section */ 89 | 213D864319AF5E04006DD902 = { 90 | isa = PBXGroup; 91 | children = ( 92 | 213D868419AF5F11006DD902 /* RatingBar */, 93 | 213D865519AF5E04006DD902 /* MyRatingBar */, 94 | 213D867419AF5E04006DD902 /* MyRatingBarTests */, 95 | 213D864E19AF5E04006DD902 /* Frameworks */, 96 | 213D864D19AF5E04006DD902 /* Products */, 97 | ); 98 | sourceTree = ""; 99 | }; 100 | 213D864D19AF5E04006DD902 /* Products */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 213D864C19AF5E04006DD902 /* MyRatingBar.app */, 104 | 213D866D19AF5E04006DD902 /* MyRatingBarTests.xctest */, 105 | ); 106 | name = Products; 107 | sourceTree = ""; 108 | }; 109 | 213D864E19AF5E04006DD902 /* Frameworks */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 213D864F19AF5E04006DD902 /* Foundation.framework */, 113 | 213D865119AF5E04006DD902 /* CoreGraphics.framework */, 114 | 213D865319AF5E04006DD902 /* UIKit.framework */, 115 | 213D866E19AF5E04006DD902 /* XCTest.framework */, 116 | ); 117 | name = Frameworks; 118 | sourceTree = ""; 119 | }; 120 | 213D865519AF5E04006DD902 /* MyRatingBar */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 211985EA19B01123007DAB2D /* IMG_1115.PNG */, 124 | 213D865E19AF5E04006DD902 /* AppDelegate.h */, 125 | 213D865F19AF5E04006DD902 /* AppDelegate.m */, 126 | 213D866119AF5E04006DD902 /* Main.storyboard */, 127 | 213D866419AF5E04006DD902 /* ViewController.h */, 128 | 213D866519AF5E04006DD902 /* ViewController.m */, 129 | 213D866719AF5E04006DD902 /* Images.xcassets */, 130 | 213D865619AF5E04006DD902 /* Supporting Files */, 131 | ); 132 | path = MyRatingBar; 133 | sourceTree = ""; 134 | }; 135 | 213D865619AF5E04006DD902 /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 213D865719AF5E04006DD902 /* MyRatingBar-Info.plist */, 139 | 213D865819AF5E04006DD902 /* InfoPlist.strings */, 140 | 213D865B19AF5E04006DD902 /* main.m */, 141 | 213D865D19AF5E04006DD902 /* MyRatingBar-Prefix.pch */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | 213D867419AF5E04006DD902 /* MyRatingBarTests */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 213D867A19AF5E04006DD902 /* MyRatingBarTests.m */, 150 | 213D867519AF5E04006DD902 /* Supporting Files */, 151 | ); 152 | path = MyRatingBarTests; 153 | sourceTree = ""; 154 | }; 155 | 213D867519AF5E04006DD902 /* Supporting Files */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 213D867619AF5E04006DD902 /* MyRatingBarTests-Info.plist */, 159 | 213D867719AF5E04006DD902 /* InfoPlist.strings */, 160 | ); 161 | name = "Supporting Files"; 162 | sourceTree = ""; 163 | }; 164 | 213D868419AF5F11006DD902 /* RatingBar */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 213D868519AF5F38006DD902 /* RatingBar.h */, 168 | 213D868619AF5F38006DD902 /* RatingBar.m */, 169 | 5CE295ED1AA4798000B7BD8D /* Images.xcassets */, 170 | ); 171 | path = RatingBar; 172 | sourceTree = ""; 173 | }; 174 | /* End PBXGroup section */ 175 | 176 | /* Begin PBXNativeTarget section */ 177 | 213D864B19AF5E04006DD902 /* MyRatingBar */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = 213D867E19AF5E04006DD902 /* Build configuration list for PBXNativeTarget "MyRatingBar" */; 180 | buildPhases = ( 181 | 213D864819AF5E04006DD902 /* Sources */, 182 | 213D864919AF5E04006DD902 /* Frameworks */, 183 | 213D864A19AF5E04006DD902 /* Resources */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | ); 189 | name = MyRatingBar; 190 | productName = MyRatingBar; 191 | productReference = 213D864C19AF5E04006DD902 /* MyRatingBar.app */; 192 | productType = "com.apple.product-type.application"; 193 | }; 194 | 213D866C19AF5E04006DD902 /* MyRatingBarTests */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 213D868119AF5E04006DD902 /* Build configuration list for PBXNativeTarget "MyRatingBarTests" */; 197 | buildPhases = ( 198 | 213D866919AF5E04006DD902 /* Sources */, 199 | 213D866A19AF5E04006DD902 /* Frameworks */, 200 | 213D866B19AF5E04006DD902 /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 213D867319AF5E04006DD902 /* PBXTargetDependency */, 206 | ); 207 | name = MyRatingBarTests; 208 | productName = MyRatingBarTests; 209 | productReference = 213D866D19AF5E04006DD902 /* MyRatingBarTests.xctest */; 210 | productType = "com.apple.product-type.bundle.unit-test"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | 213D864419AF5E04006DD902 /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | LastUpgradeCheck = 0510; 219 | ORGANIZATIONNAME = Leaf; 220 | TargetAttributes = { 221 | 213D866C19AF5E04006DD902 = { 222 | TestTargetID = 213D864B19AF5E04006DD902; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = 213D864719AF5E04006DD902 /* Build configuration list for PBXProject "MyRatingBar" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = 213D864319AF5E04006DD902; 235 | productRefGroup = 213D864D19AF5E04006DD902 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | 213D864B19AF5E04006DD902 /* MyRatingBar */, 240 | 213D866C19AF5E04006DD902 /* MyRatingBarTests */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXResourcesBuildPhase section */ 246 | 213D864A19AF5E04006DD902 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | 5CE295EE1AA4798000B7BD8D /* Images.xcassets in Resources */, 251 | 213D866819AF5E04006DD902 /* Images.xcassets in Resources */, 252 | 211985EB19B01123007DAB2D /* IMG_1115.PNG in Resources */, 253 | 213D865A19AF5E04006DD902 /* InfoPlist.strings in Resources */, 254 | 213D866319AF5E04006DD902 /* Main.storyboard in Resources */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | 213D866B19AF5E04006DD902 /* Resources */ = { 259 | isa = PBXResourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | 213D867919AF5E04006DD902 /* InfoPlist.strings in Resources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | /* End PBXResourcesBuildPhase section */ 267 | 268 | /* Begin PBXSourcesBuildPhase section */ 269 | 213D864819AF5E04006DD902 /* Sources */ = { 270 | isa = PBXSourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | 213D868719AF5F38006DD902 /* RatingBar.m in Sources */, 274 | 213D866619AF5E04006DD902 /* ViewController.m in Sources */, 275 | 213D866019AF5E04006DD902 /* AppDelegate.m in Sources */, 276 | 213D865C19AF5E04006DD902 /* main.m in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 213D866919AF5E04006DD902 /* Sources */ = { 281 | isa = PBXSourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 213D867B19AF5E04006DD902 /* MyRatingBarTests.m in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXSourcesBuildPhase section */ 289 | 290 | /* Begin PBXTargetDependency section */ 291 | 213D867319AF5E04006DD902 /* PBXTargetDependency */ = { 292 | isa = PBXTargetDependency; 293 | target = 213D864B19AF5E04006DD902 /* MyRatingBar */; 294 | targetProxy = 213D867219AF5E04006DD902 /* PBXContainerItemProxy */; 295 | }; 296 | /* End PBXTargetDependency section */ 297 | 298 | /* Begin PBXVariantGroup section */ 299 | 213D865819AF5E04006DD902 /* InfoPlist.strings */ = { 300 | isa = PBXVariantGroup; 301 | children = ( 302 | 213D865919AF5E04006DD902 /* en */, 303 | ); 304 | name = InfoPlist.strings; 305 | sourceTree = ""; 306 | }; 307 | 213D866119AF5E04006DD902 /* Main.storyboard */ = { 308 | isa = PBXVariantGroup; 309 | children = ( 310 | 213D866219AF5E04006DD902 /* Base */, 311 | ); 312 | name = Main.storyboard; 313 | sourceTree = ""; 314 | }; 315 | 213D867719AF5E04006DD902 /* InfoPlist.strings */ = { 316 | isa = PBXVariantGroup; 317 | children = ( 318 | 213D867819AF5E04006DD902 /* en */, 319 | ); 320 | name = InfoPlist.strings; 321 | sourceTree = ""; 322 | }; 323 | /* End PBXVariantGroup section */ 324 | 325 | /* Begin XCBuildConfiguration section */ 326 | 213D867C19AF5E04006DD902 /* Debug */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 331 | CLANG_CXX_LIBRARY = "libc++"; 332 | CLANG_ENABLE_MODULES = YES; 333 | CLANG_ENABLE_OBJC_ARC = YES; 334 | CLANG_WARN_BOOL_CONVERSION = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_EMPTY_BODY = YES; 338 | CLANG_WARN_ENUM_CONVERSION = YES; 339 | CLANG_WARN_INT_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 342 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 343 | COPY_PHASE_STRIP = NO; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_DYNAMIC_NO_PIC = NO; 346 | GCC_OPTIMIZATION_LEVEL = 0; 347 | GCC_PREPROCESSOR_DEFINITIONS = ( 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 359 | ONLY_ACTIVE_ARCH = YES; 360 | SDKROOT = iphoneos; 361 | }; 362 | name = Debug; 363 | }; 364 | 213D867D19AF5E04006DD902 /* Release */ = { 365 | isa = XCBuildConfiguration; 366 | buildSettings = { 367 | ALWAYS_SEARCH_USER_PATHS = NO; 368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 369 | CLANG_CXX_LIBRARY = "libc++"; 370 | CLANG_ENABLE_MODULES = YES; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_WARN_BOOL_CONVERSION = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INT_CONVERSION = YES; 378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 381 | COPY_PHASE_STRIP = YES; 382 | ENABLE_NS_ASSERTIONS = NO; 383 | GCC_C_LANGUAGE_STANDARD = gnu99; 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | 213D867F19AF5E04006DD902 /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 401 | CODE_SIGN_IDENTITY = "iPhone Developer"; 402 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 403 | GCC_PREFIX_HEADER = "MyRatingBar/MyRatingBar-Prefix.pch"; 404 | INFOPLIST_FILE = "MyRatingBar/MyRatingBar-Info.plist"; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | WRAPPER_EXTENSION = app; 407 | }; 408 | name = Debug; 409 | }; 410 | 213D868019AF5E04006DD902 /* Release */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 414 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 415 | CODE_SIGN_IDENTITY = "iPhone Developer"; 416 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 417 | GCC_PREFIX_HEADER = "MyRatingBar/MyRatingBar-Prefix.pch"; 418 | INFOPLIST_FILE = "MyRatingBar/MyRatingBar-Info.plist"; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | WRAPPER_EXTENSION = app; 421 | }; 422 | name = Release; 423 | }; 424 | 213D868219AF5E04006DD902 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MyRatingBar.app/MyRatingBar"; 428 | FRAMEWORK_SEARCH_PATHS = ( 429 | "$(SDKROOT)/Developer/Library/Frameworks", 430 | "$(inherited)", 431 | "$(DEVELOPER_FRAMEWORKS_DIR)", 432 | ); 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | GCC_PREFIX_HEADER = "MyRatingBar/MyRatingBar-Prefix.pch"; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | INFOPLIST_FILE = "MyRatingBarTests/MyRatingBarTests-Info.plist"; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | TEST_HOST = "$(BUNDLE_LOADER)"; 442 | WRAPPER_EXTENSION = xctest; 443 | }; 444 | name = Debug; 445 | }; 446 | 213D868319AF5E04006DD902 /* Release */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MyRatingBar.app/MyRatingBar"; 450 | FRAMEWORK_SEARCH_PATHS = ( 451 | "$(SDKROOT)/Developer/Library/Frameworks", 452 | "$(inherited)", 453 | "$(DEVELOPER_FRAMEWORKS_DIR)", 454 | ); 455 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 456 | GCC_PREFIX_HEADER = "MyRatingBar/MyRatingBar-Prefix.pch"; 457 | INFOPLIST_FILE = "MyRatingBarTests/MyRatingBarTests-Info.plist"; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | TEST_HOST = "$(BUNDLE_LOADER)"; 460 | WRAPPER_EXTENSION = xctest; 461 | }; 462 | name = Release; 463 | }; 464 | /* End XCBuildConfiguration section */ 465 | 466 | /* Begin XCConfigurationList section */ 467 | 213D864719AF5E04006DD902 /* Build configuration list for PBXProject "MyRatingBar" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | 213D867C19AF5E04006DD902 /* Debug */, 471 | 213D867D19AF5E04006DD902 /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | 213D867E19AF5E04006DD902 /* Build configuration list for PBXNativeTarget "MyRatingBar" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | 213D867F19AF5E04006DD902 /* Debug */, 480 | 213D868019AF5E04006DD902 /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | 213D868119AF5E04006DD902 /* Build configuration list for PBXNativeTarget "MyRatingBarTests" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | 213D868219AF5E04006DD902 /* Debug */, 489 | 213D868319AF5E04006DD902 /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | /* End XCConfigurationList section */ 495 | }; 496 | rootObject = 213D864419AF5E04006DD902 /* Project object */; 497 | } 498 | --------------------------------------------------------------------------------