├── FinalStarRatingBarDemo ├── en.lproj │ └── InfoPlist.strings ├── ViewController.h ├── AppDelegate.h ├── main.m ├── FinalStarRatingBarDemo-Prefix.pch ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── FinalStarRatingBarDemo-Info.plist ├── ViewController.m ├── AppDelegate.m └── Base.lproj │ └── Main.storyboard ├── FinalStarRatingBar ├── FinalStarRatingBar.bundle │ ├── star.png │ ├── star@2x.png │ ├── star_highlighted.png │ └── star_highlighted@2x.png ├── FinalStarRatingBar.h └── FinalStarRatingBar.m ├── FinalStarRatingBarDemo.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── Final.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── FinalStarRatingBarDemo.xccheckout ├── xcuserdata │ └── Final.xcuserdatad │ │ ├── xcschemes │ │ ├── xcschememanagement.plist │ │ └── FinalStarRatingBarDemo.xcscheme │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist └── project.pbxproj ├── FinalStarRatingBar.podspec ├── README.md └── LICENSE /FinalStarRatingBarDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.bundle/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matrixOutlaw/useStar/HEAD/FinalStarRatingBar/FinalStarRatingBar.bundle/star.png -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.bundle/star@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matrixOutlaw/useStar/HEAD/FinalStarRatingBar/FinalStarRatingBar.bundle/star@2x.png -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.bundle/star_highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matrixOutlaw/useStar/HEAD/FinalStarRatingBar/FinalStarRatingBar.bundle/star_highlighted.png -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.bundle/star_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matrixOutlaw/useStar/HEAD/FinalStarRatingBar/FinalStarRatingBar.bundle/star_highlighted@2x.png -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/project.xcworkspace/xcuserdata/Final.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matrixOutlaw/useStar/HEAD/FinalStarRatingBarDemo.xcodeproj/project.xcworkspace/xcuserdata/Final.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. 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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/FinalStarRatingBarDemo-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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/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 | } -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // FinalStarRatingBar.h 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface FinalStarRatingBar : UIControl 11 | @property (nonatomic) NSUInteger rating; 12 | @property (nonatomic,copy) void (^ratingChangedBlock)(NSUInteger rating); 13 | -(id)initWithFrame:(CGRect)frame; 14 | -(id)initWithFrame:(CGRect)frame starCount:(NSUInteger)count; 15 | @end 16 | -------------------------------------------------------------------------------- /FinalStarRatingBar.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "FinalStarRatingBar" 3 | s.version = "0.0.2" 4 | s.summary = "Star rating,星星评价" 5 | s.homepage = "https://github.com/loveforgeter/FinalStarRatingBar" 6 | s.license = 'MIT' 7 | s.author = { "Loveforgeter" => "loveforgeter@gmail.com" } 8 | s.source = { :git => "https://github.com/loveforgeter/FinalStarRatingBar.git", :tag => "0.0.22" } 9 | s.platform = :ios,'6.0' 10 | s.source_files = 'FinalStarRatingBar/**/*.{h,m}' 11 | s.resources = 'FinalStarRatingBar/*.bundle' 12 | s.requires_arc = true 13 | end 14 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/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 | } -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/xcuserdata/Final.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FinalStarRatingBarDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 80A70403196BA77C00D38C21 16 | 17 | primary 18 | 19 | 20 | 80A70424196BA77C00D38C21 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/xcuserdata/Final.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FinalStarRatingBar 2 | ================== 3 | StarRating Bar,星星打分控件 4 | 5 | How to use? 6 | ----------- 7 | 8 | #### Create star rating bar.(5 Stars) 9 | FinalStarRatingBar *bar = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 40, 320, 40)]; 10 | [self.view addSubView:bar]; 11 | #### Want more stars? 12 | FinalStarRatingBar *bar = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 40, 320, 40) starCount:10]; 13 | [self.view addSubview:bar]; 14 | #### Use in storyboard or nib 15 | > 1.Drag a view to the nib. 16 | > 17 | > 2.Set its class to FinalRatingBar. 18 | > 19 | > 3.Use **tag** property to control the number of the stars. 20 | 21 | #### Receive rating changed notification 22 | [bar2 setRatingChangedBlock:^(NSUInteger rating) { 23 | NSLog(@"%d",rating); 24 | }]; 25 | 26 | #### Others 27 | > Set Rating 28 | > 29 | >`bar.rating = 3;` 30 | > 31 | >Disable Touch 32 | > 33 | >`bar.enabled = NO;` 34 | 35 | Demo 36 | ---- 37 | ![Demo](https://raw.githubusercontent.com/loveforgeter/DemoGifs/master/FinalStarRating.gif) 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Final 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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/FinalStarRatingBarDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.FinalProject.${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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "FinalStarRatingBar.h" 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | FinalStarRatingBar *bar = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 40, 320, 40)]; 21 | FinalStarRatingBar *bar2 = [[FinalStarRatingBar alloc] initWithFrame:CGRectMake(0, 90, 320, 40) starCount:10]; 22 | [self.view addSubview:bar]; 23 | [self.view addSubview:bar2]; 24 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 130, 320, 20)]; 25 | label.text = @"Current index for second bar"; 26 | UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 150, 320, 20)]; 27 | label2.text = [NSString stringWithFormat:@"%d",bar2.rating]; 28 | [self.view addSubview:label]; 29 | [self.view addSubview:label2]; 30 | [bar setRating:3]; 31 | //using block 32 | [bar2 setRatingChangedBlock:^(NSUInteger rating) { 33 | dispatch_async(dispatch_get_main_queue(), ^{ 34 | label2.text = [NSString stringWithFormat:@"%d",rating]; 35 | }); 36 | }]; 37 | // Do any additional setup after loading the view, typically from a nib. 38 | } 39 | 40 | - (void)didReceiveMemoryWarning 41 | { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | @end 46 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/project.xcworkspace/xcshareddata/FinalStarRatingBarDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | AC800AB0-BAA0-4CCB-9679-D4A6063AD49E 9 | IDESourceControlProjectName 10 | FinalStarRatingBarDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 4790D8B7-C1BB-469A-A910-428A791F7A70 14 | https://github.com/loveforgeter/FinalStarRatingBar.git 15 | 16 | IDESourceControlProjectPath 17 | FinalStarRatingBarDemo/FinalStarRatingBarDemo.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 4790D8B7-C1BB-469A-A910-428A791F7A70 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/loveforgeter/FinalStarRatingBar.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 4790D8B7-C1BB-469A-A910-428A791F7A70 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 4790D8B7-C1BB-469A-A910-428A791F7A70 36 | IDESourceControlWCCName 37 | FinalStarRatingBar 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. 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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo/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 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /FinalStarRatingBar/FinalStarRatingBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // FinalStarRatingBar.m 3 | // FinalStarRatingBarDemo 4 | // 5 | // Created by Final on 14-7-8. 6 | // Copyright (c) 2014年 FinalProject. All rights reserved. 7 | // 8 | 9 | #import "FinalStarRatingBar.h" 10 | const NSUInteger DEFAULT_STAR_COUNT = 5; 11 | @interface FinalStarRatingBar() 12 | @property (nonatomic,strong) NSMutableArray *stars; 13 | -(void)initWithStarCount:(NSUInteger)count; 14 | -(BOOL)touch:(UITouch*)touch inStar:(UIImageView*)star; 15 | @end 16 | @implementation FinalStarRatingBar 17 | -(void)setRating:(NSUInteger)rating 18 | { 19 | if (_rating != rating) { 20 | _rating = MIN(rating, self.stars.count); 21 | if (self.ratingChangedBlock) { 22 | self.ratingChangedBlock(_rating); 23 | } 24 | [self.stars enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 25 | [obj setHighlighted:(idx < rating)]; 26 | }]; 27 | } 28 | } 29 | 30 | -(void)initWithStarCount:(NSUInteger)count 31 | { 32 | self.stars = [NSMutableArray array]; 33 | for (NSUInteger idx = 0; idx < count; ++idx) { 34 | UIImageView *star = [UIImageView new]; 35 | star.image = [UIImage imageNamed:@"FinalStarRatingBar.bundle/star"]; 36 | star.highlightedImage = [UIImage imageNamed:@"FinalStarRatingBar.bundle/star_highlighted"]; 37 | star.contentMode = UIViewContentModeScaleAspectFit; 38 | [self addSubview:star]; 39 | [self.stars addObject:star]; 40 | } 41 | } 42 | 43 | -(id)initWithFrame:(CGRect)frame 44 | { 45 | if (self = [super initWithFrame:frame]) { 46 | [self initWithStarCount:DEFAULT_STAR_COUNT]; 47 | } 48 | return self; 49 | } 50 | 51 | -(id)initWithCoder:(NSCoder *)aDecoder 52 | { 53 | if (self = [super initWithCoder:aDecoder]) { 54 | if(self.tag <= 0) 55 | { 56 | [self initWithStarCount:DEFAULT_STAR_COUNT]; 57 | }else{ 58 | [self initWithStarCount:self.tag]; 59 | } 60 | } 61 | return self; 62 | } 63 | 64 | -(id)initWithFrame:(CGRect)frame starCount:(NSUInteger)count 65 | { 66 | if (self = [super initWithFrame:frame]) { 67 | [self initWithStarCount:count]; 68 | } 69 | return self; 70 | } 71 | 72 | -(void)layoutSubviews 73 | { 74 | const CGFloat BAR_WIDTH = CGRectGetWidth(self.frame); 75 | const CGFloat BAR_HEIGHT = CGRectGetHeight(self.frame); 76 | const CGFloat STAR_WIDTH = BAR_WIDTH / self.stars.count; 77 | [self.stars enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 78 | [obj setFrame:CGRectMake(idx * STAR_WIDTH, 0, STAR_WIDTH, BAR_HEIGHT)]; 79 | }]; 80 | } 81 | 82 | -(BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event 83 | { 84 | __block FinalStarRatingBar *blockSelf = self; 85 | [self.stars enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 86 | if ([blockSelf touch:touch inStar:obj]) { 87 | self.rating = idx + 1; 88 | *stop = YES; 89 | } 90 | }]; 91 | return YES; 92 | } 93 | 94 | -(BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event 95 | { 96 | __block FinalStarRatingBar *blockSelf = self; 97 | [self.stars enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 98 | if ([blockSelf touch:touch inStar:obj]) { 99 | self.rating = idx + 1; 100 | *stop = YES; 101 | } 102 | }]; 103 | return YES; 104 | } 105 | 106 | #pragma mark - Private Method 107 | -(BOOL)touch:(UITouch *)touch inStar:(UIImageView *)star 108 | { 109 | 110 | CGPoint pt = [touch locationInView:self]; 111 | return CGRectContainsPoint(star.frame, pt); 112 | } 113 | @end 114 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/xcuserdata/Final.xcuserdatad/xcschemes/FinalStarRatingBarDemo.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 | -------------------------------------------------------------------------------- /FinalStarRatingBarDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 809F16381970D1F700C19159 /* FinalStarRatingBar.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 809F16351970D1F700C19159 /* FinalStarRatingBar.bundle */; }; 11 | 809F16391970D1F700C19159 /* FinalStarRatingBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 809F16371970D1F700C19159 /* FinalStarRatingBar.m */; }; 12 | 80A70408196BA77C00D38C21 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A70407196BA77C00D38C21 /* Foundation.framework */; }; 13 | 80A7040A196BA77C00D38C21 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A70409196BA77C00D38C21 /* CoreGraphics.framework */; }; 14 | 80A7040C196BA77C00D38C21 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A7040B196BA77C00D38C21 /* UIKit.framework */; }; 15 | 80A70412196BA77C00D38C21 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 80A70410196BA77C00D38C21 /* InfoPlist.strings */; }; 16 | 80A70414196BA77C00D38C21 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 80A70413196BA77C00D38C21 /* main.m */; }; 17 | 80A70418196BA77C00D38C21 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 80A70417196BA77C00D38C21 /* AppDelegate.m */; }; 18 | 80A7041B196BA77C00D38C21 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 80A70419196BA77C00D38C21 /* Main.storyboard */; }; 19 | 80A7041E196BA77C00D38C21 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 80A7041D196BA77C00D38C21 /* ViewController.m */; }; 20 | 80A70420196BA77C00D38C21 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 80A7041F196BA77C00D38C21 /* Images.xcassets */; }; 21 | 80A70427196BA77C00D38C21 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A70426196BA77C00D38C21 /* XCTest.framework */; }; 22 | 80A70428196BA77C00D38C21 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A70407196BA77C00D38C21 /* Foundation.framework */; }; 23 | 80A70429196BA77C00D38C21 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80A7040B196BA77C00D38C21 /* UIKit.framework */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 80A7042A196BA77C00D38C21 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 80A703FC196BA77C00D38C21 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 80A70403196BA77C00D38C21; 32 | remoteInfo = FinalStarRatingBarDemo; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 809F16351970D1F700C19159 /* FinalStarRatingBar.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FinalStarRatingBar.bundle; sourceTree = ""; }; 38 | 809F16361970D1F700C19159 /* FinalStarRatingBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinalStarRatingBar.h; sourceTree = ""; }; 39 | 809F16371970D1F700C19159 /* FinalStarRatingBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinalStarRatingBar.m; sourceTree = ""; }; 40 | 80A70404196BA77C00D38C21 /* FinalStarRatingBarDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FinalStarRatingBarDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 80A70407196BA77C00D38C21 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 | 80A70409196BA77C00D38C21 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 43 | 80A7040B196BA77C00D38C21 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 44 | 80A7040F196BA77C00D38C21 /* FinalStarRatingBarDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FinalStarRatingBarDemo-Info.plist"; sourceTree = ""; }; 45 | 80A70411196BA77C00D38C21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 46 | 80A70413196BA77C00D38C21 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 80A70415196BA77C00D38C21 /* FinalStarRatingBarDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FinalStarRatingBarDemo-Prefix.pch"; sourceTree = ""; }; 48 | 80A70416196BA77C00D38C21 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 80A70417196BA77C00D38C21 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 80A7041A196BA77C00D38C21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 80A7041C196BA77C00D38C21 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 52 | 80A7041D196BA77C00D38C21 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 53 | 80A7041F196BA77C00D38C21 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 54 | 80A70425196BA77C00D38C21 /* FinalStarRatingBarDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FinalStarRatingBarDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 80A70426196BA77C00D38C21 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 80A70401196BA77C00D38C21 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 80A7040A196BA77C00D38C21 /* CoreGraphics.framework in Frameworks */, 64 | 80A7040C196BA77C00D38C21 /* UIKit.framework in Frameworks */, 65 | 80A70408196BA77C00D38C21 /* Foundation.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 80A70422196BA77C00D38C21 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | 80A70427196BA77C00D38C21 /* XCTest.framework in Frameworks */, 74 | 80A70429196BA77C00D38C21 /* UIKit.framework in Frameworks */, 75 | 80A70428196BA77C00D38C21 /* Foundation.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 809F16341970D1F700C19159 /* FinalStarRatingBar */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 809F16351970D1F700C19159 /* FinalStarRatingBar.bundle */, 86 | 809F16361970D1F700C19159 /* FinalStarRatingBar.h */, 87 | 809F16371970D1F700C19159 /* FinalStarRatingBar.m */, 88 | ); 89 | path = FinalStarRatingBar; 90 | sourceTree = SOURCE_ROOT; 91 | }; 92 | 80A703FB196BA77C00D38C21 = { 93 | isa = PBXGroup; 94 | children = ( 95 | 80A7040D196BA77C00D38C21 /* FinalStarRatingBarDemo */, 96 | 80A70406196BA77C00D38C21 /* Frameworks */, 97 | 80A70405196BA77C00D38C21 /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | 80A70405196BA77C00D38C21 /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 80A70404196BA77C00D38C21 /* FinalStarRatingBarDemo.app */, 105 | 80A70425196BA77C00D38C21 /* FinalStarRatingBarDemoTests.xctest */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 80A70406196BA77C00D38C21 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 80A70407196BA77C00D38C21 /* Foundation.framework */, 114 | 80A70409196BA77C00D38C21 /* CoreGraphics.framework */, 115 | 80A7040B196BA77C00D38C21 /* UIKit.framework */, 116 | 80A70426196BA77C00D38C21 /* XCTest.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | 80A7040D196BA77C00D38C21 /* FinalStarRatingBarDemo */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 809F16341970D1F700C19159 /* FinalStarRatingBar */, 125 | 80A70416196BA77C00D38C21 /* AppDelegate.h */, 126 | 80A70417196BA77C00D38C21 /* AppDelegate.m */, 127 | 80A70419196BA77C00D38C21 /* Main.storyboard */, 128 | 80A7041C196BA77C00D38C21 /* ViewController.h */, 129 | 80A7041D196BA77C00D38C21 /* ViewController.m */, 130 | 80A7041F196BA77C00D38C21 /* Images.xcassets */, 131 | 80A7040E196BA77C00D38C21 /* Supporting Files */, 132 | ); 133 | path = FinalStarRatingBarDemo; 134 | sourceTree = ""; 135 | }; 136 | 80A7040E196BA77C00D38C21 /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 80A7040F196BA77C00D38C21 /* FinalStarRatingBarDemo-Info.plist */, 140 | 80A70410196BA77C00D38C21 /* InfoPlist.strings */, 141 | 80A70413196BA77C00D38C21 /* main.m */, 142 | 80A70415196BA77C00D38C21 /* FinalStarRatingBarDemo-Prefix.pch */, 143 | ); 144 | name = "Supporting Files"; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | 80A70403196BA77C00D38C21 /* FinalStarRatingBarDemo */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 80A70436196BA77C00D38C21 /* Build configuration list for PBXNativeTarget "FinalStarRatingBarDemo" */; 153 | buildPhases = ( 154 | 80A70400196BA77C00D38C21 /* Sources */, 155 | 80A70401196BA77C00D38C21 /* Frameworks */, 156 | 80A70402196BA77C00D38C21 /* Resources */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | ); 162 | name = FinalStarRatingBarDemo; 163 | productName = FinalStarRatingBarDemo; 164 | productReference = 80A70404196BA77C00D38C21 /* FinalStarRatingBarDemo.app */; 165 | productType = "com.apple.product-type.application"; 166 | }; 167 | 80A70424196BA77C00D38C21 /* FinalStarRatingBarDemoTests */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = 80A70439196BA77C00D38C21 /* Build configuration list for PBXNativeTarget "FinalStarRatingBarDemoTests" */; 170 | buildPhases = ( 171 | 80A70421196BA77C00D38C21 /* Sources */, 172 | 80A70422196BA77C00D38C21 /* Frameworks */, 173 | 80A70423196BA77C00D38C21 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | 80A7042B196BA77C00D38C21 /* PBXTargetDependency */, 179 | ); 180 | name = FinalStarRatingBarDemoTests; 181 | productName = FinalStarRatingBarDemoTests; 182 | productReference = 80A70425196BA77C00D38C21 /* FinalStarRatingBarDemoTests.xctest */; 183 | productType = "com.apple.product-type.bundle.unit-test"; 184 | }; 185 | /* End PBXNativeTarget section */ 186 | 187 | /* Begin PBXProject section */ 188 | 80A703FC196BA77C00D38C21 /* Project object */ = { 189 | isa = PBXProject; 190 | attributes = { 191 | LastUpgradeCheck = 0510; 192 | ORGANIZATIONNAME = FinalProject; 193 | TargetAttributes = { 194 | 80A70424196BA77C00D38C21 = { 195 | TestTargetID = 80A70403196BA77C00D38C21; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = 80A703FF196BA77C00D38C21 /* Build configuration list for PBXProject "FinalStarRatingBarDemo" */; 200 | compatibilityVersion = "Xcode 3.2"; 201 | developmentRegion = English; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | Base, 206 | ); 207 | mainGroup = 80A703FB196BA77C00D38C21; 208 | productRefGroup = 80A70405196BA77C00D38C21 /* Products */; 209 | projectDirPath = ""; 210 | projectRoot = ""; 211 | targets = ( 212 | 80A70403196BA77C00D38C21 /* FinalStarRatingBarDemo */, 213 | 80A70424196BA77C00D38C21 /* FinalStarRatingBarDemoTests */, 214 | ); 215 | }; 216 | /* End PBXProject section */ 217 | 218 | /* Begin PBXResourcesBuildPhase section */ 219 | 80A70402196BA77C00D38C21 /* Resources */ = { 220 | isa = PBXResourcesBuildPhase; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | 80A70420196BA77C00D38C21 /* Images.xcassets in Resources */, 224 | 80A70412196BA77C00D38C21 /* InfoPlist.strings in Resources */, 225 | 80A7041B196BA77C00D38C21 /* Main.storyboard in Resources */, 226 | 809F16381970D1F700C19159 /* FinalStarRatingBar.bundle in Resources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | 80A70423196BA77C00D38C21 /* Resources */ = { 231 | isa = PBXResourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | /* End PBXResourcesBuildPhase section */ 238 | 239 | /* Begin PBXSourcesBuildPhase section */ 240 | 80A70400196BA77C00D38C21 /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | 80A7041E196BA77C00D38C21 /* ViewController.m in Sources */, 245 | 809F16391970D1F700C19159 /* FinalStarRatingBar.m in Sources */, 246 | 80A70418196BA77C00D38C21 /* AppDelegate.m in Sources */, 247 | 80A70414196BA77C00D38C21 /* main.m in Sources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | 80A70421196BA77C00D38C21 /* Sources */ = { 252 | isa = PBXSourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXSourcesBuildPhase section */ 259 | 260 | /* Begin PBXTargetDependency section */ 261 | 80A7042B196BA77C00D38C21 /* PBXTargetDependency */ = { 262 | isa = PBXTargetDependency; 263 | target = 80A70403196BA77C00D38C21 /* FinalStarRatingBarDemo */; 264 | targetProxy = 80A7042A196BA77C00D38C21 /* PBXContainerItemProxy */; 265 | }; 266 | /* End PBXTargetDependency section */ 267 | 268 | /* Begin PBXVariantGroup section */ 269 | 80A70410196BA77C00D38C21 /* InfoPlist.strings */ = { 270 | isa = PBXVariantGroup; 271 | children = ( 272 | 80A70411196BA77C00D38C21 /* en */, 273 | ); 274 | name = InfoPlist.strings; 275 | sourceTree = ""; 276 | }; 277 | 80A70419196BA77C00D38C21 /* Main.storyboard */ = { 278 | isa = PBXVariantGroup; 279 | children = ( 280 | 80A7041A196BA77C00D38C21 /* Base */, 281 | ); 282 | name = Main.storyboard; 283 | sourceTree = ""; 284 | }; 285 | /* End PBXVariantGroup section */ 286 | 287 | /* Begin XCBuildConfiguration section */ 288 | 80A70434196BA77C00D38C21 /* Debug */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ALWAYS_SEARCH_USER_PATHS = NO; 292 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 293 | CLANG_CXX_LIBRARY = "libc++"; 294 | CLANG_ENABLE_MODULES = YES; 295 | CLANG_ENABLE_OBJC_ARC = YES; 296 | CLANG_WARN_BOOL_CONVERSION = YES; 297 | CLANG_WARN_CONSTANT_CONVERSION = YES; 298 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INT_CONVERSION = YES; 302 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 304 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 305 | COPY_PHASE_STRIP = NO; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_OPTIMIZATION_LEVEL = 0; 309 | GCC_PREPROCESSOR_DEFINITIONS = ( 310 | "DEBUG=1", 311 | "$(inherited)", 312 | ); 313 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 321 | ONLY_ACTIVE_ARCH = YES; 322 | SDKROOT = iphoneos; 323 | }; 324 | name = Debug; 325 | }; 326 | 80A70435196BA77C00D38C21 /* Release */ = { 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 = YES; 344 | ENABLE_NS_ASSERTIONS = NO; 345 | GCC_C_LANGUAGE_STANDARD = gnu99; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 353 | SDKROOT = iphoneos; 354 | VALIDATE_PRODUCT = YES; 355 | }; 356 | name = Release; 357 | }; 358 | 80A70437196BA77C00D38C21 /* Debug */ = { 359 | isa = XCBuildConfiguration; 360 | buildSettings = { 361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 362 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 363 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 364 | GCC_PREFIX_HEADER = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Prefix.pch"; 365 | INFOPLIST_FILE = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Info.plist"; 366 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | WRAPPER_EXTENSION = app; 369 | }; 370 | name = Debug; 371 | }; 372 | 80A70438196BA77C00D38C21 /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 376 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 377 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 378 | GCC_PREFIX_HEADER = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Prefix.pch"; 379 | INFOPLIST_FILE = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Info.plist"; 380 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | WRAPPER_EXTENSION = app; 383 | }; 384 | name = Release; 385 | }; 386 | 80A7043A196BA77C00D38C21 /* Debug */ = { 387 | isa = XCBuildConfiguration; 388 | buildSettings = { 389 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FinalStarRatingBarDemo.app/FinalStarRatingBarDemo"; 390 | FRAMEWORK_SEARCH_PATHS = ( 391 | "$(SDKROOT)/Developer/Library/Frameworks", 392 | "$(inherited)", 393 | "$(DEVELOPER_FRAMEWORKS_DIR)", 394 | ); 395 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 396 | GCC_PREFIX_HEADER = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Prefix.pch"; 397 | GCC_PREPROCESSOR_DEFINITIONS = ( 398 | "DEBUG=1", 399 | "$(inherited)", 400 | ); 401 | INFOPLIST_FILE = "FinalStarRatingBarDemoTests/FinalStarRatingBarDemoTests-Info.plist"; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | TEST_HOST = "$(BUNDLE_LOADER)"; 404 | WRAPPER_EXTENSION = xctest; 405 | }; 406 | name = Debug; 407 | }; 408 | 80A7043B196BA77C00D38C21 /* Release */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FinalStarRatingBarDemo.app/FinalStarRatingBarDemo"; 412 | FRAMEWORK_SEARCH_PATHS = ( 413 | "$(SDKROOT)/Developer/Library/Frameworks", 414 | "$(inherited)", 415 | "$(DEVELOPER_FRAMEWORKS_DIR)", 416 | ); 417 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 418 | GCC_PREFIX_HEADER = "FinalStarRatingBarDemo/FinalStarRatingBarDemo-Prefix.pch"; 419 | INFOPLIST_FILE = "FinalStarRatingBarDemoTests/FinalStarRatingBarDemoTests-Info.plist"; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | TEST_HOST = "$(BUNDLE_LOADER)"; 422 | WRAPPER_EXTENSION = xctest; 423 | }; 424 | name = Release; 425 | }; 426 | /* End XCBuildConfiguration section */ 427 | 428 | /* Begin XCConfigurationList section */ 429 | 80A703FF196BA77C00D38C21 /* Build configuration list for PBXProject "FinalStarRatingBarDemo" */ = { 430 | isa = XCConfigurationList; 431 | buildConfigurations = ( 432 | 80A70434196BA77C00D38C21 /* Debug */, 433 | 80A70435196BA77C00D38C21 /* Release */, 434 | ); 435 | defaultConfigurationIsVisible = 0; 436 | defaultConfigurationName = Release; 437 | }; 438 | 80A70436196BA77C00D38C21 /* Build configuration list for PBXNativeTarget "FinalStarRatingBarDemo" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | 80A70437196BA77C00D38C21 /* Debug */, 442 | 80A70438196BA77C00D38C21 /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | 80A70439196BA77C00D38C21 /* Build configuration list for PBXNativeTarget "FinalStarRatingBarDemoTests" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | 80A7043A196BA77C00D38C21 /* Debug */, 451 | 80A7043B196BA77C00D38C21 /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | /* End XCConfigurationList section */ 457 | }; 458 | rootObject = 80A703FC196BA77C00D38C21 /* Project object */; 459 | } 460 | --------------------------------------------------------------------------------