├── edstarrating.png ├── sample ├── sample │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── Credits.rtf │ ├── star.png │ ├── starhighlighted.png │ ├── starsbackground.png │ ├── starsbackground iOS.png │ ├── sample-Prefix.pch │ ├── main.m │ ├── AppDelegate.h │ ├── sample-Info.plist │ └── AppDelegate.m └── sample.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ └── project.pbxproj ├── SampleiOS ├── SampleiOS │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ └── ViewController.xib │ ├── Default-568h@2x.png │ ├── ViewController.h │ ├── SampleiOS-Prefix.pch │ ├── main.m │ ├── AppDelegate.h │ ├── SampleiOS-Info.plist │ ├── AppDelegate.m │ └── ViewController.m └── SampleiOS.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ └── project.pbxproj ├── edstarrating-ios.png ├── EDStarRating.podspec ├── README.md └── EDStarRating ├── EDStarRating.h └── EDStarRating.m /edstarrating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/edstarrating.png -------------------------------------------------------------------------------- /sample/sample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /edstarrating-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/edstarrating-ios.png -------------------------------------------------------------------------------- /sample/sample/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/sample/sample/star.png -------------------------------------------------------------------------------- /sample/sample/starhighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/sample/sample/starhighlighted.png -------------------------------------------------------------------------------- /sample/sample/starsbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/sample/sample/starsbackground.png -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/SampleiOS/SampleiOS/Default-568h@2x.png -------------------------------------------------------------------------------- /sample/sample/starsbackground iOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dimillian/EDStarRating/master/sample/sample/starsbackground iOS.png -------------------------------------------------------------------------------- /sample/sample/sample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'sample' target in the 'sample' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /sample/sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/sample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // sample 4 | // 5 | // Created by Ernesto Garcia on 26/02/12. 6 | // Copyright (c) 2012 cocoawithchurros.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SampleiOS 4 | // 5 | // Created by Ernesto Garcia Carril on 22/08/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EDStarRating.h" 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/SampleiOS-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SampleiOS' target in the 'SampleiOS' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SampleiOS 4 | // 5 | // Created by Ernesto Garcia Carril on 22/08/12. 6 | // Copyright (c) 2012 __MyCompanyName__. 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 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SampleiOS 4 | // 5 | // Created by Ernesto Garcia Carril on 22/08/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @property (strong, nonatomic) ViewController *viewController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /sample/sample/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /sample/sample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // sample 4 | // 5 | // Created by Ernesto Garcia on 26/02/12. 6 | // Copyright (c) 2012 cocoawithchurros.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EDStarRating.h" 11 | @interface AppDelegate : NSObject 12 | 13 | @property (assign) IBOutlet NSWindow *window; 14 | @property (assign) IBOutlet EDStarRating *starRatingImage; 15 | @property (assign) IBOutlet EDStarRating *starRating; 16 | 17 | -(IBAction)editableChanged:(id)sender; 18 | -(IBAction)displayModeChanged:(id)sender; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /sample/sample/sample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.cocoawithchurros.${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 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2012 __MyCompanyName__. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/SampleiOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.cocoawitchurros.${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 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /EDStarRating.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "EDStarRating" 3 | s.version = "1.0.1" 4 | s.summary = "A configurable star rating control for OSX and iOS, similar to those found in iTunes and the App Store." 5 | s.ios.frameworks = 'CoreGraphics' 6 | s.ios.deployment_target = '4.3' 7 | s.osx.deployment_target = '10.6' 8 | s.description = <<-DESC 9 | A configurable star rating control for OSX and iOS, similar to those found in iTunes and the App Store. 10 | DESC 11 | s.homepage = "https://github.com/erndev/EDStarRating" 12 | 13 | s.frameworks = 'QuartzCore' 14 | s.author = { "Ernesto García" => "ernesto@cocoawithchurros.com" } 15 | s.source = { :git => "https://github.com/erndev/EDStarRating.git", :tag => s.version.to_s } 16 | s.source_files = 'EDStarRating' 17 | s.license = { 18 | :type => 'MIT', 19 | :text => <<-LICENSE 20 | Copyright (c) 2013 Ernesto García 21 | 22 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 23 | associated documentation files (the "Software"), to deal in the Software without restriction, 24 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 25 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 26 | subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all copies or substantial 29 | portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 32 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 33 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 34 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 35 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 36 | LICENSE 37 | } 38 | end 39 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SampleiOS 4 | // 5 | // Created by Ernesto Garcia Carril on 22/08/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | @synthesize window = _window; 16 | @synthesize viewController = _viewController; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 21 | // Override point for customization after application launch. 22 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; 23 | self.window.rootViewController = self.viewController; 24 | [self.window makeKeyAndVisible]; 25 | return YES; 26 | } 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application 29 | { 30 | // 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. 31 | // 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. 32 | } 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application 35 | { 36 | // 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. 37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 38 | } 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application 41 | { 42 | // 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. 43 | } 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application 46 | { 47 | // 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. 48 | } 49 | 50 | - (void)applicationWillTerminate:(UIApplication *)application 51 | { 52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /sample/sample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // sample 4 | // 5 | // Created by Ernesto Garcia on 26/02/12. 6 | // Copyright (c) 2012 cocoawithchurros.com. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | @synthesize window = _window; 14 | @synthesize starRatingImage=_starRatingImage; 15 | @synthesize starRating=_starRating; 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 18 | { 19 | 20 | // Insert code here to initialize your application 21 | _starRatingImage.backgroundImage=[NSImage imageNamed:@"starsbackground.png"]; 22 | _starRatingImage.backgroundColor = [NSColor clearColor]; 23 | _starRatingImage.starImage = [NSImage imageNamed:@"star.png"]; 24 | _starRatingImage.starHighlightedImage = [NSImage imageNamed:@"starhighlighted.png"]; 25 | _starRatingImage.maxRating = 5.0; 26 | _starRatingImage.delegate = self; 27 | _starRatingImage.horizontalMargin = 12; 28 | _starRatingImage.editable=YES; 29 | _starRatingImage.rating= 2.5; 30 | _starRatingImage.displayMode=EDStarRatingDisplayFull; 31 | [_starRatingImage setTarget:self]; 32 | [_starRatingImage setNeedsDisplay]; 33 | 34 | 35 | _starRating.backgroundColor = [NSColor clearColor]; 36 | _starRating.starImage = [NSImage imageNamed:@"star.png"]; 37 | _starRating.starHighlightedImage = [NSImage imageNamed:@"starhighlighted.png"]; 38 | _starRating.maxRating = 5.0; 39 | _starRating.delegate = self; 40 | _starRating.horizontalMargin = 12; 41 | _starRating.editable=YES; 42 | _starRating.rating= 2.5; 43 | _starRating.displayMode=EDStarRatingDisplayFull; 44 | [_starRating setTarget:self]; 45 | [_starRating setNeedsDisplay]; 46 | // This will use a return block to handle the rating changes 47 | // Setting the return block automatically nils the delegate 48 | _starRating.returnBlock = ^(float rating) 49 | { 50 | NSLog(@"Star Rating changed to %.1f" ,rating); 51 | }; 52 | 53 | 54 | // Set the control size equal to the background image size 55 | NSRect frame =_starRatingImage.frame; 56 | frame.size = _starRatingImage.backgroundImage.size; 57 | [_starRatingImage setFrame:frame]; 58 | } 59 | 60 | -(IBAction)editableChanged:(id)sender 61 | { 62 | _starRatingImage.editable=[sender state]; 63 | [_starRatingImage setNeedsDisplay]; 64 | _starRating.editable=[sender state]; 65 | [_starRating setNeedsDisplay]; 66 | } 67 | -(IBAction)displayModeChanged:(id)sender 68 | { 69 | NSInteger selectedMode = [sender selectedRow]; 70 | _starRatingImage.displayMode= selectedMode; 71 | [_starRatingImage setNeedsDisplay]; 72 | _starRating.displayMode=selectedMode; 73 | [_starRating setNeedsDisplay]; 74 | } 75 | -(IBAction)ratingChanged:(id)sender 76 | { 77 | NSSlider *slider = (NSSlider*)sender; 78 | _starRating.rating = [slider floatValue]; 79 | _starRatingImage.rating = [slider floatValue]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | EDStarRating 2 | --------------- 3 | 4 | A configurable star rating control for OSX and iOS, similar to those found in iTunes and the App Store. 5 | 6 | 7 | ###Installation 8 | 9 | The easiest way to install EDStarRating is via [CocoaPods](http://cocoapods.org). Add this line to your Podfile: 10 | 11 | ```ruby 12 | pod 'EDStarRating' 13 | ``` 14 | 15 | and run `pod install`. 16 | 17 | You can also install it manually by copying to project these two files: EDStarRating.h and EDStarRating.m 18 | 19 | ### Usage 20 | 21 | In order to use EDStarRating, you can instantiate it programmatically, or create a custom view in Interface Builder and assign it to an ivar of your app. Once you have an instance, you can use the control properties to configure it. 22 | 23 | Example: 24 | 25 | ``` 26 | 27 | starRating.starImage = [NSImage imageNamed:@"star.png"]; 28 | starRating.starHighlightedImage = [NSImage imageNamed:@"starhighlighted.png"]; 29 | starRating.maxRating = 5.0; 30 | starRating.delegate = self; 31 | starRating.horizontalMargin = 12; 32 | starRating.editable=YES; 33 | displayMode=EDStarRatingDisplayFull; 34 | 35 | 36 | starRating.rating= 2.5; 37 | 38 | ``` 39 | ### Compatiblity 40 | This control should work in ARC and not ARC projects. On OS X 10.6+ and iOS 4.x+. 41 | But i've only tested it with ARC and Lion 10.7 and iOS 5.0. Let me now if it works fine for you in other environments. 42 | 43 | 44 | ### Screenshots 45 | 46 | ![EDStarRating](https://github.com/erndev/EDStarRating/raw/master/edstarrating.png) 47 | ![EDStarRating](https://github.com/erndev/EDStarRating/raw/master/edstarrating-ios.png) 48 | 49 | ### License 50 | BSD License. 51 | Copyright (c) 2011, Ernesto García 52 | All rights reserved. 53 | 54 | Redistribution and use in source and binary forms, with or without 55 | modification, are permitted provided that the following conditions are met: 56 | * Redistributions of source code must retain the above copyright 57 | notice, this list of conditions and the following disclaimer. 58 | * Redistributions in binary form must reproduce the above copyright 59 | notice, this list of conditions and the following disclaimer in the 60 | documentation and/or other materials provided with the distribution. 61 | * Neither the name of the nor the 62 | names of its contributors may be used to endorse or promote products 63 | derived from this software without specific prior written permission. 64 | 65 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 66 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 67 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 68 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 69 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 70 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 71 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 72 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 73 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 74 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 75 | 76 | ### Star icons 77 | The star icons and backgrounds used in the sample have been created by [Dan Deming-Henes 78 | ](http://strandeddesign.com). 79 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SampleiOS 4 | // 5 | // Created by Ernesto Garcia Carril on 22/08/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "EDStarRating.h" 11 | @interface ViewController () 12 | @property (weak, nonatomic) IBOutlet EDStarRating *starRating; 13 | @property (weak, nonatomic) IBOutlet UILabel *starRatingLabel; 14 | @property (weak, nonatomic) IBOutlet EDStarRating *starRatingImage; 15 | @property (weak, nonatomic) IBOutlet UILabel *starRatingImageLabel; 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | @synthesize starRating=_starRating; 21 | @synthesize starRatingLabel = _starRatingLabel; 22 | @synthesize starRatingImage = _starRatingImage; 23 | @synthesize starRatingImageLabel = _starRatingImageLabel; 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view, typically from a nib. 29 | _starRating.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0]; 30 | _starRating.starImage = [UIImage imageNamed:@"star.png"]; 31 | _starRating.starHighlightedImage = [UIImage imageNamed:@"starhighlighted.png"]; 32 | _starRating.maxRating = 5.0; 33 | _starRating.delegate = self; 34 | _starRating.horizontalMargin = 15.0; 35 | _starRating.editable=YES; 36 | _starRating.rating= 2.5; 37 | _starRating.displayMode=EDStarRatingDisplayHalf; 38 | [_starRating setNeedsDisplay]; 39 | [self starsSelectionChanged:_starRating rating:2.5]; 40 | 41 | 42 | _starRatingImage.backgroundImage=[UIImage imageNamed:@"starsbackground iOS.png"]; 43 | _starRatingImage.starImage = [UIImage imageNamed:@"star.png"]; 44 | _starRatingImage.starHighlightedImage = [UIImage imageNamed:@"starhighlighted.png"]; 45 | _starRatingImage.maxRating = 5.0; 46 | _starRatingImage.delegate = self; 47 | _starRatingImage.horizontalMargin = 12; 48 | _starRatingImage.editable=YES; 49 | _starRatingImage.rating= 2.5; 50 | _starRatingImage.displayMode=EDStarRatingDisplayAccurate; 51 | [self starsSelectionChanged:_starRatingImage rating:2.5]; 52 | // This one will use the returnBlock instead of the delegate 53 | _starRatingImage.returnBlock = ^(float rating ) 54 | { 55 | NSLog(@"ReturnBlock: Star rating changed to %.1f", rating); 56 | // For the sample, Just reuse the other control's delegate method and call it 57 | [self starsSelectionChanged:_starRatingImage rating:rating]; 58 | }; 59 | 60 | 61 | } 62 | 63 | - (void)viewDidUnload 64 | { 65 | [self setStarRating:nil]; 66 | [self setStarRatingLabel:nil]; 67 | [self setStarRatingImage:nil]; 68 | [self setStarRatingImageLabel:nil]; 69 | [super viewDidUnload]; 70 | // Release any retained subviews of the main view. 71 | } 72 | 73 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 74 | { 75 | return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 76 | } 77 | 78 | -(void)starsSelectionChanged:(EDStarRating *)control rating:(float)rating 79 | { 80 | NSString *ratingString = [NSString stringWithFormat:@"Rating: %.1f", rating]; 81 | if( [control isEqual:_starRating] ) 82 | _starRatingLabel.text = ratingString; 83 | else 84 | _starRatingImageLabel.text = ratingString; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /EDStarRating/EDStarRating.h: -------------------------------------------------------------------------------- 1 | // 2 | // EDStarRatingView. 3 | // 4 | // Created by Ernesto Garcia on 26/02/12. 5 | // Copyright (c) 2012 cocoawithchurros.com All rights reserved. 6 | // Distributed under MIT license 7 | 8 | 9 | #import 10 | #ifdef __MAC_OS_X_VERSION_MAX_ALLOWED 11 | #define EDSTAR_MACOSX 1 12 | #define EDSTAR_IOS 0 13 | #else 14 | #define EDSTAR_MACOSX 0 15 | #define EDSTAR_IOS 1 16 | #endif 17 | 18 | 19 | // 20 | // ARC Helper 21 | // 22 | // Version 1.2.1 23 | // 24 | // Created by Nick Lockwood on 05/01/2012. 25 | // Copyright 2012 Charcoal Design 26 | // 27 | // Distributed under the permissive zlib license 28 | // Get the latest version from here: 29 | // 30 | // https://gist.github.com/1563325 31 | // 32 | 33 | #ifndef AH_RETAIN 34 | #if __has_feature(objc_arc) 35 | #define AH_RETAIN(x) (x) 36 | #define AH_RELEASE(x) 37 | #define AH_AUTORELEASE(x) (x) 38 | #define AH_SUPER_DEALLOC 39 | #else 40 | #define __AH_WEAK 41 | #define AH_WEAK assign 42 | #define AH_RETAIN(x) [(x) retain] 43 | #define AH_RELEASE(x) [(x) release] 44 | #define AH_AUTORELEASE(x) [(x) autorelease] 45 | #define AH_SUPER_DEALLOC [super dealloc] 46 | #endif 47 | #endif 48 | 49 | // Weak reference support 50 | 51 | #ifndef AH_WEAK 52 | #if defined __IPHONE_OS_VERSION_MIN_REQUIRED 53 | #if __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_4_3 54 | #define __AH_WEAK __weak 55 | #define AH_WEAK weak 56 | #else 57 | #define __AH_WEAK __unsafe_unretained 58 | #define AH_WEAK unsafe_unretained 59 | #endif 60 | #elif defined __MAC_OS_X_VERSION_MIN_REQUIRED 61 | #if __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_7 62 | #define __AH_WEAK __weak 63 | #define AH_WEAK weak 64 | #else 65 | #define __AH_WEAK __unsafe_unretained 66 | #define AH_WEAK unsafe_unretained 67 | #endif 68 | #endif 69 | #endif 70 | 71 | // ARC Helper ends 72 | 73 | 74 | #if EDSTAR_MACOSX 75 | #import 76 | #else 77 | #import 78 | #endif 79 | 80 | 81 | enum { 82 | EDStarRatingDisplayFull=0, 83 | EDStarRatingDisplayHalf, 84 | EDStarRatingDisplayAccurate 85 | }; 86 | typedef NSUInteger EDStarRatingDisplayMode; 87 | typedef void(^EDStarRatingReturnBlock)(float rating); 88 | @protocol EDStarRatingProtocol; 89 | 90 | #if EDSTAR_MACOSX 91 | #define EDControl NSControl 92 | typedef NSColor EDColor; 93 | typedef NSImage EDImage; 94 | #else 95 | #define EDControl UIControl 96 | typedef UIColor EDColor; 97 | typedef UIImage EDImage; 98 | 99 | #endif 100 | 101 | @interface EDStarRating : EDControl 102 | 103 | #if EDSTAR_MACOSX 104 | @property (nonatomic,strong) EDColor *backgroundColor; 105 | #endif 106 | @property (nonatomic,strong) EDImage *backgroundImage; 107 | @property (nonatomic,strong) EDImage *starHighlightedImage; 108 | @property (nonatomic,strong) EDImage *starImage; 109 | @property (nonatomic) NSInteger maxRating; 110 | @property (nonatomic) float rating; 111 | @property (nonatomic) CGFloat horizontalMargin; 112 | @property (nonatomic) BOOL editable; 113 | @property (nonatomic) EDStarRatingDisplayMode displayMode; 114 | @property (nonatomic) float halfStarThreshold; 115 | 116 | @property (nonatomic,AH_WEAK) id delegate; 117 | @property (nonatomic,copy) EDStarRatingReturnBlock returnBlock; 118 | @end 119 | 120 | 121 | @protocol EDStarRatingProtocol 122 | 123 | @optional 124 | -(void)starsSelectionChanged:(EDStarRating*)control rating:(float)rating; 125 | 126 | @end 127 | 128 | -------------------------------------------------------------------------------- /EDStarRating/EDStarRating.m: -------------------------------------------------------------------------------- 1 | // 2 | // EDStartRatingView. 3 | // 4 | // Created by Ernesto Garcia on 26/02/12. 5 | // Copyright (c) 2012 cocoawithchurros.com All rights reserved. 6 | // Distributed under MIT license 7 | 8 | #import "EDStarRating.h" 9 | 10 | #define ED_DEFAULT_HALFSTAR_THRESHOLD 0.6 11 | 12 | @implementation EDStarRating 13 | @synthesize starImage; 14 | @synthesize starHighlightedImage; 15 | @synthesize rating=_rating; 16 | @synthesize maxRating; 17 | @synthesize backgroundImage; 18 | @synthesize editable; 19 | @synthesize delegate=_delegate; 20 | @synthesize horizontalMargin; 21 | @synthesize halfStarThreshold; 22 | @synthesize displayMode; 23 | #if EDSTAR_MACOSX 24 | @synthesize backgroundColor; 25 | #endif 26 | @synthesize returnBlock=_returnBlock; 27 | 28 | #pragma mark - 29 | #pragma mark Init & dealloc 30 | 31 | 32 | -(void)setDefaultProperties 33 | { 34 | maxRating=5.0; 35 | _rating=0.0; 36 | horizontalMargin=10.0; 37 | displayMode = EDStarRatingDisplayFull; 38 | halfStarThreshold=ED_DEFAULT_HALFSTAR_THRESHOLD; 39 | 40 | } 41 | #if EDSTAR_MACOSX 42 | 43 | - (id)initWithFrame:(NSRect)frame 44 | { 45 | self = [super initWithFrame:frame]; 46 | if (self) 47 | { 48 | [self setDefaultProperties]; 49 | } 50 | 51 | return self; 52 | } 53 | #else 54 | -(id)initWithCoder:(NSCoder *)aDecoder 55 | { 56 | self = [super initWithCoder:aDecoder]; 57 | if( self ) 58 | { 59 | [self setDefaultProperties]; 60 | } 61 | return self; 62 | } 63 | 64 | -(id)initWithFrame:(CGRect)frame 65 | { 66 | self = [super initWithFrame:frame]; 67 | if( self ) 68 | { 69 | [self setDefaultProperties]; 70 | } 71 | return self; 72 | } 73 | #endif 74 | 75 | 76 | 77 | -(void)dealloc 78 | { 79 | AH_RELEASE(starImage); 80 | AH_RELEASE(starHighlightedImage); 81 | AH_RELEASE(backgroundImage); 82 | #if EDSTAR_MACOSX 83 | AH_RELEASE(backgroundColor); 84 | #endif 85 | 86 | #if ! __has_feature(objc_arc) 87 | [super dealloc]; 88 | #endif 89 | } 90 | #pragma mark - 91 | #pragma mark Setters 92 | -(void)setReturnBlock:(EDStarRatingReturnBlock)retBlock 93 | { 94 | _returnBlock = [retBlock copy]; 95 | _delegate = nil; 96 | } 97 | 98 | -(void)setDelegate:(id)delegate 99 | { 100 | _delegate = delegate; 101 | _returnBlock = nil; 102 | } 103 | 104 | -(void)setRating:(float)ratingParam 105 | { 106 | _rating = ratingParam; 107 | [self setNeedsDisplay]; 108 | } 109 | 110 | -(void)setDisplayMode:(EDStarRatingDisplayMode)dispMode 111 | { 112 | displayMode = dispMode; 113 | [self setNeedsDisplay]; 114 | } 115 | 116 | #pragma mark - 117 | #pragma mark Drawing 118 | -(CGPoint)pointOfStarAtPosition:(NSInteger)position highlighted:(BOOL)hightlighted 119 | { 120 | CGSize size = hightlighted?starHighlightedImage.size:starImage.size; 121 | 122 | NSInteger starsSpace = self.bounds.size.width - 2*horizontalMargin; 123 | 124 | NSInteger interSpace = 0; 125 | interSpace = maxRating-1>0?(starsSpace - (maxRating)*size.width)/(maxRating-1):0; 126 | CGFloat x = horizontalMargin + size.width*position; 127 | if( position >0 ) 128 | x+=interSpace*position; 129 | CGFloat y = (self.bounds.size.height - size.height)/2.0; 130 | return CGPointMake(x ,y); 131 | } 132 | 133 | -(void)drawBackgroundImage 134 | { 135 | if( backgroundImage ) 136 | { 137 | #if EDSTAR_MACOSX 138 | [backgroundImage drawInRect:self.bounds fromRect:NSMakeRect(0.0, 0.0, backgroundImage.size.width, backgroundImage.size.height) operation:NSCompositeSourceOver fraction:1.0]; 139 | 140 | #else 141 | [backgroundImage drawInRect:self.bounds]; 142 | 143 | #endif 144 | } 145 | 146 | } 147 | 148 | -(void)drawImage:(EDImage*)image atPosition:(NSInteger)position 149 | { 150 | #if EDSTAR_MACOSX 151 | [image drawAtPoint:[self pointOfStarAtPosition:position highlighted:YES] fromRect:NSMakeRect(0.0, 0.0, image.size.width, image.size.height) operation:NSCompositeSourceOver fraction:1.0]; 152 | 153 | #else 154 | [image drawAtPoint:[self pointOfStarAtPosition:position highlighted:YES]]; 155 | 156 | #endif 157 | 158 | } 159 | 160 | -(CGColorRef)cgColor:(EDColor*)color 161 | { 162 | CGColorRef cgColor = nil; 163 | 164 | #if EDSTAR_MACOSX 165 | NSInteger numberOfComponents = [color numberOfComponents]; 166 | CGFloat components[numberOfComponents]; 167 | 168 | CGColorSpaceRef colorSpace = [[color colorSpace] CGColorSpace]; 169 | 170 | [color getComponents:(CGFloat *)&components]; 171 | #if __has_feature(objc_arc) 172 | cgColor = (__bridge CGColorRef)AH_AUTORELEASE((__bridge id)CGColorCreate(colorSpace, components)); 173 | #else 174 | cgColor = ( CGColorRef)AH_AUTORELEASE(( id)CGColorCreate(colorSpace, components)); 175 | #endif 176 | 177 | #else 178 | cgColor = color.CGColor; 179 | #endif 180 | 181 | return cgColor; 182 | } 183 | 184 | -(CGContextRef)currentContext 185 | { 186 | CGContextRef ctx=nil; 187 | #if EDSTAR_MACOSX 188 | NSGraphicsContext * nsGraphicsContext = [NSGraphicsContext currentContext]; 189 | ctx = (CGContextRef) [nsGraphicsContext graphicsPort]; 190 | #else 191 | ctx = UIGraphicsGetCurrentContext(); 192 | #endif 193 | return ctx; 194 | } 195 | 196 | -(void)drawRect:(CGRect)rect 197 | { 198 | CGRect bounds = self.bounds; 199 | CGContextRef ctx = [self currentContext]; 200 | 201 | // Fill background color 202 | EDColor *colorToDraw = self.backgroundColor==nil?[EDColor clearColor]:self.backgroundColor; 203 | CGContextSetFillColorWithColor(ctx, [self cgColor:colorToDraw]); 204 | CGContextFillRect(ctx, bounds); 205 | 206 | // Draw background Image 207 | if( backgroundImage ) 208 | { 209 | [self drawBackgroundImage]; 210 | } 211 | 212 | // Draw rating Images 213 | CGSize starSize = starHighlightedImage.size; 214 | for( NSInteger i=0 ; i0 ) 241 | CGContextClipToRect( ctx, rectClip); 242 | 243 | } 244 | 245 | [self drawImage:starHighlightedImage atPosition:i]; 246 | } 247 | CGContextRestoreGState(ctx); 248 | } 249 | } 250 | } 251 | 252 | 253 | #pragma mark - 254 | #pragma mark Mouse/Touch Interaction 255 | -(float) starsForPoint:(CGPoint)point 256 | { 257 | float stars=0; 258 | for( NSInteger i=0; i p.x ) 262 | { 263 | float increment=1.0; 264 | 265 | if( self.displayMode == EDStarRatingDisplayHalf ) 266 | { 267 | float difference = (point.x - p.x)/self.starImage.size.width; 268 | if( difference < self.halfStarThreshold ) 269 | { 270 | increment=0.5; 271 | } 272 | } 273 | stars+=increment; 274 | } 275 | } 276 | return stars; 277 | } 278 | 279 | #if EDSTAR_MACOSX 280 | -(void)mouseDown:(NSEvent *)theEvent 281 | { 282 | if( !editable ) 283 | return; 284 | 285 | if ([theEvent type] == NSLeftMouseDown) { 286 | 287 | NSPoint pointInView = [self convertPoint:[theEvent locationInWindow] fromView:nil]; 288 | 289 | self.rating = [self starsForPoint:pointInView]; 290 | [self setNeedsDisplay]; 291 | } 292 | 293 | } 294 | #else 295 | -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 296 | { 297 | if( !editable ) 298 | return; 299 | 300 | UITouch *touch = [touches anyObject]; 301 | CGPoint touchLocation = [touch locationInView:self]; 302 | self.rating =[self starsForPoint:touchLocation]; 303 | [self setNeedsDisplay]; 304 | } 305 | #endif 306 | 307 | #if EDSTAR_MACOSX 308 | -(void)mouseDragged:(NSEvent *)theEvent 309 | { 310 | if( !editable ) 311 | return; 312 | 313 | NSPoint pointInView = [self convertPoint:[theEvent locationInWindow] fromView:nil]; 314 | self.rating = [self starsForPoint:pointInView]; 315 | [self setNeedsDisplay]; 316 | } 317 | #else 318 | -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 319 | { 320 | if( !editable ) 321 | return; 322 | 323 | UITouch *touch = [touches anyObject]; 324 | CGPoint touchLocation = [touch locationInView:self]; 325 | self.rating =[self starsForPoint:touchLocation]; 326 | [self setNeedsDisplay]; 327 | } 328 | 329 | #endif 330 | 331 | #if EDSTAR_MACOSX 332 | - (void)mouseUp:(NSEvent *)theEvent 333 | #else 334 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 335 | #endif 336 | { 337 | if( !editable ) 338 | return; 339 | 340 | if( self.delegate && [self.delegate respondsToSelector:@selector(starsSelectionChanged:rating:)] ) 341 | [self.delegate starsSelectionChanged:self rating:self.rating]; 342 | 343 | if( self.returnBlock) 344 | self.returnBlock(self.rating); 345 | 346 | } 347 | @end 348 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1296 5 | 11E53 6 | 2182 7 | 1138.47 8 | 569.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1181 12 | 13 | 14 | IBProxyObject 15 | IBUIView 16 | IBUILabel 17 | 18 | 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | IBFilesOwner 28 | IBCocoaTouchFramework 29 | 30 | 31 | IBFirstResponder 32 | IBCocoaTouchFramework 33 | 34 | 35 | 36 | 274 37 | 38 | 39 | 40 | 274 41 | {320, 47} 42 | 43 | 44 | 45 | _NS:9 46 | 47 | 3 48 | MC42NjY2NjY2NjY3AA 49 | 50 | IBCocoaTouchFramework 51 | 52 | 53 | 54 | 292 55 | {{20, 91}, {280, 21}} 56 | 57 | 58 | 59 | _NS:9 60 | NO 61 | YES 62 | 7 63 | NO 64 | IBCocoaTouchFramework 65 | Label 66 | 67 | 3 68 | MC4zMzMzMzMzMzMzAA 69 | 70 | 71 | 0 72 | 10 73 | 1 74 | 75 | 1 76 | 17 77 | 78 | 79 | Helvetica 80 | 17 81 | 16 82 | 83 | 84 | 85 | 86 | 292 87 | {{20, 282}, {280, 21}} 88 | 89 | 90 | 91 | _NS:9 92 | NO 93 | YES 94 | 7 95 | NO 96 | IBCocoaTouchFramework 97 | Label 98 | 99 | 100 | 0 101 | 10 102 | 1 103 | 104 | 105 | 106 | 107 | 108 | 274 109 | {{40, 193}, {240, 47}} 110 | 111 | 112 | 113 | _NS:9 114 | 115 | 3 116 | MCAwAA 117 | 118 | IBCocoaTouchFramework 119 | 120 | 121 | {{0, 20}, {320, 460}} 122 | 123 | 124 | 125 | 126 | 3 127 | MQA 128 | 129 | NO 130 | 131 | IBCocoaTouchFramework 132 | 133 | 134 | 135 | 136 | 137 | 138 | view 139 | 140 | 141 | 142 | 7 143 | 144 | 145 | 146 | starRating 147 | 148 | 149 | 150 | 9 151 | 152 | 153 | 154 | starRatingLabel 155 | 156 | 157 | 158 | 11 159 | 160 | 161 | 162 | starRatingImage 163 | 164 | 165 | 166 | 13 167 | 168 | 169 | 170 | starRatingImageLabel 171 | 172 | 173 | 174 | 15 175 | 176 | 177 | 178 | 179 | 180 | 0 181 | 182 | 183 | 184 | 185 | 186 | -1 187 | 188 | 189 | File's Owner 190 | 191 | 192 | -2 193 | 194 | 195 | 196 | 197 | 6 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 8 209 | 210 | 211 | 212 | 213 | 10 214 | 215 | 216 | 217 | 218 | 12 219 | 220 | 221 | 222 | 223 | 14 224 | 225 | 226 | 227 | 228 | 229 | 230 | ViewController 231 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 232 | UIResponder 233 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 234 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 235 | EDStarRating 236 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 237 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 238 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 239 | EDStarRating 240 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 241 | 242 | 243 | 244 | 245 | 246 | 15 247 | 248 | 249 | 250 | 251 | EDStarRating 252 | UIControl 253 | 254 | IBProjectSource 255 | ./Classes/EDStarRating.h 256 | 257 | 258 | 259 | ViewController 260 | UIViewController 261 | 262 | EDStarRating 263 | EDStarRating 264 | UILabel 265 | UILabel 266 | 267 | 268 | 269 | starRating 270 | EDStarRating 271 | 272 | 273 | starRatingImage 274 | EDStarRating 275 | 276 | 277 | starRatingImageLabel 278 | UILabel 279 | 280 | 281 | starRatingLabel 282 | UILabel 283 | 284 | 285 | 286 | IBProjectSource 287 | ./Classes/ViewController.h 288 | 289 | 290 | 291 | 292 | 0 293 | IBCocoaTouchFramework 294 | 295 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 296 | 297 | 298 | YES 299 | 3 300 | 1181 301 | 302 | 303 | -------------------------------------------------------------------------------- /sample/sample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 9469A4AD14FA646D00225162 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9469A4AC14FA646D00225162 /* Cocoa.framework */; }; 11 | 9469A4B714FA646D00225162 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4B514FA646D00225162 /* InfoPlist.strings */; }; 12 | 9469A4B914FA646D00225162 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9469A4B814FA646D00225162 /* main.m */; }; 13 | 9469A4BD14FA646D00225162 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4BB14FA646D00225162 /* Credits.rtf */; }; 14 | 9469A4C014FA646D00225162 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9469A4BF14FA646D00225162 /* AppDelegate.m */; }; 15 | 9469A4C314FA646E00225162 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4C114FA646E00225162 /* MainMenu.xib */; }; 16 | 9469A4CC14FA64CA00225162 /* star.png in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4C914FA64CA00225162 /* star.png */; }; 17 | 9469A4CD14FA64CA00225162 /* starhighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4CA14FA64CA00225162 /* starhighlighted.png */; }; 18 | 9469A4CE14FA64CA00225162 /* starsbackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 9469A4CB14FA64CA00225162 /* starsbackground.png */; }; 19 | 9469A4D514FA64DB00225162 /* EDStarRating.m in Sources */ = {isa = PBXBuildFile; fileRef = 9469A4D114FA64DB00225162 /* EDStarRating.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 9469A4A814FA646D00225162 /* sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 9469A4AC14FA646D00225162 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 25 | 9469A4AF14FA646D00225162 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 26 | 9469A4B014FA646D00225162 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 27 | 9469A4B114FA646D00225162 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 28 | 9469A4B414FA646D00225162 /* sample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sample-Info.plist"; sourceTree = ""; }; 29 | 9469A4B614FA646D00225162 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 30 | 9469A4B814FA646D00225162 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 31 | 9469A4BA14FA646D00225162 /* sample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "sample-Prefix.pch"; sourceTree = ""; }; 32 | 9469A4BC14FA646D00225162 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 33 | 9469A4BE14FA646D00225162 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 34 | 9469A4BF14FA646D00225162 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 35 | 9469A4C214FA646E00225162 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 36 | 9469A4C914FA64CA00225162 /* star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star.png; sourceTree = ""; }; 37 | 9469A4CA14FA64CA00225162 /* starhighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = starhighlighted.png; sourceTree = ""; }; 38 | 9469A4CB14FA64CA00225162 /* starsbackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = starsbackground.png; sourceTree = ""; }; 39 | 9469A4D014FA64DB00225162 /* EDStarRating.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EDStarRating.h; sourceTree = ""; }; 40 | 9469A4D114FA64DB00225162 /* EDStarRating.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EDStarRating.m; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 9469A4A514FA646D00225162 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | 9469A4AD14FA646D00225162 /* Cocoa.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | 9469A49D14FA646D00225162 = { 56 | isa = PBXGroup; 57 | children = ( 58 | 9469A4CF14FA64DB00225162 /* EDStarRating */, 59 | 9469A4B214FA646D00225162 /* sample */, 60 | 9469A4AB14FA646D00225162 /* Frameworks */, 61 | 9469A4A914FA646D00225162 /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 9469A4A914FA646D00225162 /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 9469A4A814FA646D00225162 /* sample.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 9469A4AB14FA646D00225162 /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 9469A4AC14FA646D00225162 /* Cocoa.framework */, 77 | 9469A4AE14FA646D00225162 /* Other Frameworks */, 78 | ); 79 | name = Frameworks; 80 | sourceTree = ""; 81 | }; 82 | 9469A4AE14FA646D00225162 /* Other Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9469A4AF14FA646D00225162 /* AppKit.framework */, 86 | 9469A4B014FA646D00225162 /* CoreData.framework */, 87 | 9469A4B114FA646D00225162 /* Foundation.framework */, 88 | ); 89 | name = "Other Frameworks"; 90 | sourceTree = ""; 91 | }; 92 | 9469A4B214FA646D00225162 /* sample */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 9469A4BE14FA646D00225162 /* AppDelegate.h */, 96 | 9469A4BF14FA646D00225162 /* AppDelegate.m */, 97 | 9469A4C114FA646E00225162 /* MainMenu.xib */, 98 | 9469A4B314FA646D00225162 /* Supporting Files */, 99 | ); 100 | path = sample; 101 | sourceTree = ""; 102 | }; 103 | 9469A4B314FA646D00225162 /* Supporting Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 9469A4C914FA64CA00225162 /* star.png */, 107 | 9469A4CA14FA64CA00225162 /* starhighlighted.png */, 108 | 9469A4CB14FA64CA00225162 /* starsbackground.png */, 109 | 9469A4B414FA646D00225162 /* sample-Info.plist */, 110 | 9469A4B514FA646D00225162 /* InfoPlist.strings */, 111 | 9469A4B814FA646D00225162 /* main.m */, 112 | 9469A4BA14FA646D00225162 /* sample-Prefix.pch */, 113 | 9469A4BB14FA646D00225162 /* Credits.rtf */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | 9469A4CF14FA64DB00225162 /* EDStarRating */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 9469A4D014FA64DB00225162 /* EDStarRating.h */, 122 | 9469A4D114FA64DB00225162 /* EDStarRating.m */, 123 | ); 124 | name = EDStarRating; 125 | path = ../EDStarRating; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 9469A4A714FA646D00225162 /* sample */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 9469A4C614FA646E00225162 /* Build configuration list for PBXNativeTarget "sample" */; 134 | buildPhases = ( 135 | 9469A4A414FA646D00225162 /* Sources */, 136 | 9469A4A514FA646D00225162 /* Frameworks */, 137 | 9469A4A614FA646D00225162 /* Resources */, 138 | ); 139 | buildRules = ( 140 | ); 141 | dependencies = ( 142 | ); 143 | name = sample; 144 | productName = sample; 145 | productReference = 9469A4A814FA646D00225162 /* sample.app */; 146 | productType = "com.apple.product-type.application"; 147 | }; 148 | /* End PBXNativeTarget section */ 149 | 150 | /* Begin PBXProject section */ 151 | 9469A49F14FA646D00225162 /* Project object */ = { 152 | isa = PBXProject; 153 | attributes = { 154 | LastUpgradeCheck = 0460; 155 | }; 156 | buildConfigurationList = 9469A4A214FA646D00225162 /* Build configuration list for PBXProject "sample" */; 157 | compatibilityVersion = "Xcode 3.2"; 158 | developmentRegion = English; 159 | hasScannedForEncodings = 0; 160 | knownRegions = ( 161 | en, 162 | ); 163 | mainGroup = 9469A49D14FA646D00225162; 164 | productRefGroup = 9469A4A914FA646D00225162 /* Products */; 165 | projectDirPath = ""; 166 | projectRoot = ""; 167 | targets = ( 168 | 9469A4A714FA646D00225162 /* sample */, 169 | ); 170 | }; 171 | /* End PBXProject section */ 172 | 173 | /* Begin PBXResourcesBuildPhase section */ 174 | 9469A4A614FA646D00225162 /* Resources */ = { 175 | isa = PBXResourcesBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | 9469A4B714FA646D00225162 /* InfoPlist.strings in Resources */, 179 | 9469A4BD14FA646D00225162 /* Credits.rtf in Resources */, 180 | 9469A4C314FA646E00225162 /* MainMenu.xib in Resources */, 181 | 9469A4CC14FA64CA00225162 /* star.png in Resources */, 182 | 9469A4CD14FA64CA00225162 /* starhighlighted.png in Resources */, 183 | 9469A4CE14FA64CA00225162 /* starsbackground.png in Resources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXResourcesBuildPhase section */ 188 | 189 | /* Begin PBXSourcesBuildPhase section */ 190 | 9469A4A414FA646D00225162 /* Sources */ = { 191 | isa = PBXSourcesBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 9469A4B914FA646D00225162 /* main.m in Sources */, 195 | 9469A4C014FA646D00225162 /* AppDelegate.m in Sources */, 196 | 9469A4D514FA64DB00225162 /* EDStarRating.m in Sources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXSourcesBuildPhase section */ 201 | 202 | /* Begin PBXVariantGroup section */ 203 | 9469A4B514FA646D00225162 /* InfoPlist.strings */ = { 204 | isa = PBXVariantGroup; 205 | children = ( 206 | 9469A4B614FA646D00225162 /* en */, 207 | ); 208 | name = InfoPlist.strings; 209 | sourceTree = ""; 210 | }; 211 | 9469A4BB14FA646D00225162 /* Credits.rtf */ = { 212 | isa = PBXVariantGroup; 213 | children = ( 214 | 9469A4BC14FA646D00225162 /* en */, 215 | ); 216 | name = Credits.rtf; 217 | sourceTree = ""; 218 | }; 219 | 9469A4C114FA646E00225162 /* MainMenu.xib */ = { 220 | isa = PBXVariantGroup; 221 | children = ( 222 | 9469A4C214FA646E00225162 /* en */, 223 | ); 224 | name = MainMenu.xib; 225 | sourceTree = ""; 226 | }; 227 | /* End PBXVariantGroup section */ 228 | 229 | /* Begin XCBuildConfiguration section */ 230 | 9469A4C414FA646E00225162 /* Debug */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ALWAYS_SEARCH_USER_PATHS = NO; 234 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 235 | CLANG_ENABLE_OBJC_ARC = YES; 236 | CLANG_WARN_CONSTANT_CONVERSION = YES; 237 | CLANG_WARN_ENUM_CONVERSION = YES; 238 | CLANG_WARN_INT_CONVERSION = YES; 239 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 240 | COPY_PHASE_STRIP = NO; 241 | GCC_C_LANGUAGE_STANDARD = gnu99; 242 | GCC_DYNAMIC_NO_PIC = NO; 243 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 244 | GCC_OPTIMIZATION_LEVEL = 0; 245 | GCC_PREPROCESSOR_DEFINITIONS = ( 246 | "DEBUG=1", 247 | "$(inherited)", 248 | ); 249 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 250 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 251 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 252 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 253 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 254 | GCC_WARN_UNUSED_VARIABLE = YES; 255 | MACOSX_DEPLOYMENT_TARGET = 10.7; 256 | ONLY_ACTIVE_ARCH = YES; 257 | SDKROOT = macosx; 258 | }; 259 | name = Debug; 260 | }; 261 | 9469A4C514FA646E00225162 /* Release */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 266 | CLANG_ENABLE_OBJC_ARC = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_ENUM_CONVERSION = YES; 269 | CLANG_WARN_INT_CONVERSION = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | COPY_PHASE_STRIP = YES; 272 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 273 | GCC_C_LANGUAGE_STANDARD = gnu99; 274 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 275 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 276 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 277 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 278 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 279 | GCC_WARN_UNUSED_VARIABLE = YES; 280 | MACOSX_DEPLOYMENT_TARGET = 10.7; 281 | SDKROOT = macosx; 282 | }; 283 | name = Release; 284 | }; 285 | 9469A4C714FA646E00225162 /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | COMBINE_HIDPI_IMAGES = YES; 289 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 290 | GCC_PREFIX_HEADER = "sample/sample-Prefix.pch"; 291 | INFOPLIST_FILE = "sample/sample-Info.plist"; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | WRAPPER_EXTENSION = app; 294 | }; 295 | name = Debug; 296 | }; 297 | 9469A4C814FA646E00225162 /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | COMBINE_HIDPI_IMAGES = YES; 301 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 302 | GCC_PREFIX_HEADER = "sample/sample-Prefix.pch"; 303 | INFOPLIST_FILE = "sample/sample-Info.plist"; 304 | PRODUCT_NAME = "$(TARGET_NAME)"; 305 | WRAPPER_EXTENSION = app; 306 | }; 307 | name = Release; 308 | }; 309 | /* End XCBuildConfiguration section */ 310 | 311 | /* Begin XCConfigurationList section */ 312 | 9469A4A214FA646D00225162 /* Build configuration list for PBXProject "sample" */ = { 313 | isa = XCConfigurationList; 314 | buildConfigurations = ( 315 | 9469A4C414FA646E00225162 /* Debug */, 316 | 9469A4C514FA646E00225162 /* Release */, 317 | ); 318 | defaultConfigurationIsVisible = 0; 319 | defaultConfigurationName = Release; 320 | }; 321 | 9469A4C614FA646E00225162 /* Build configuration list for PBXNativeTarget "sample" */ = { 322 | isa = XCConfigurationList; 323 | buildConfigurations = ( 324 | 9469A4C714FA646E00225162 /* Debug */, 325 | 9469A4C814FA646E00225162 /* Release */, 326 | ); 327 | defaultConfigurationIsVisible = 0; 328 | defaultConfigurationName = Release; 329 | }; 330 | /* End XCConfigurationList section */ 331 | }; 332 | rootObject = 9469A49F14FA646D00225162 /* Project object */; 333 | } 334 | -------------------------------------------------------------------------------- /SampleiOS/SampleiOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 01C5BF7A17A3F04800B7B0BC /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 01C5BF7917A3F04800B7B0BC /* Default-568h@2x.png */; }; 11 | 94B6315B15E4E53F00C7F229 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94B6315A15E4E53F00C7F229 /* UIKit.framework */; }; 12 | 94B6315D15E4E53F00C7F229 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94B6315C15E4E53F00C7F229 /* Foundation.framework */; }; 13 | 94B6315F15E4E53F00C7F229 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94B6315E15E4E53F00C7F229 /* CoreGraphics.framework */; }; 14 | 94B6316515E4E53F00C7F229 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94B6316315E4E53F00C7F229 /* InfoPlist.strings */; }; 15 | 94B6316715E4E53F00C7F229 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B6316615E4E53F00C7F229 /* main.m */; }; 16 | 94B6316B15E4E53F00C7F229 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B6316A15E4E53F00C7F229 /* AppDelegate.m */; }; 17 | 94B6316E15E4E53F00C7F229 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B6316D15E4E53F00C7F229 /* ViewController.m */; }; 18 | 94B6317115E4E53F00C7F229 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 94B6316F15E4E53F00C7F229 /* ViewController.xib */; }; 19 | 94B6317A15E4E56100C7F229 /* EDStarRating.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B6317915E4E56100C7F229 /* EDStarRating.m */; }; 20 | 94B6317E15E4E74A00C7F229 /* star.png in Resources */ = {isa = PBXBuildFile; fileRef = 94B6317B15E4E74A00C7F229 /* star.png */; }; 21 | 94B6317F15E4E74A00C7F229 /* starhighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 94B6317C15E4E74A00C7F229 /* starhighlighted.png */; }; 22 | 94B6318215E4EC6200C7F229 /* starsbackground iOS.png in Resources */ = {isa = PBXBuildFile; fileRef = 94B6318115E4EC6200C7F229 /* starsbackground iOS.png */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 01C5BF7917A3F04800B7B0BC /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 27 | 94B6315615E4E53F00C7F229 /* SampleiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleiOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 94B6315A15E4E53F00C7F229 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 94B6315C15E4E53F00C7F229 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | 94B6315E15E4E53F00C7F229 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | 94B6316215E4E53F00C7F229 /* SampleiOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SampleiOS-Info.plist"; sourceTree = ""; }; 32 | 94B6316415E4E53F00C7F229 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 94B6316615E4E53F00C7F229 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 94B6316815E4E53F00C7F229 /* SampleiOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SampleiOS-Prefix.pch"; sourceTree = ""; }; 35 | 94B6316915E4E53F00C7F229 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | 94B6316A15E4E53F00C7F229 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | 94B6316C15E4E53F00C7F229 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 38 | 94B6316D15E4E53F00C7F229 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 39 | 94B6317015E4E53F00C7F229 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 40 | 94B6317815E4E56100C7F229 /* EDStarRating.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EDStarRating.h; path = ../EDStarRating/EDStarRating.h; sourceTree = ""; }; 41 | 94B6317915E4E56100C7F229 /* EDStarRating.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EDStarRating.m; path = ../EDStarRating/EDStarRating.m; sourceTree = ""; }; 42 | 94B6317B15E4E74A00C7F229 /* star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = star.png; path = ../../sample/sample/star.png; sourceTree = ""; }; 43 | 94B6317C15E4E74A00C7F229 /* starhighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = starhighlighted.png; path = ../../sample/sample/starhighlighted.png; sourceTree = ""; }; 44 | 94B6318115E4EC6200C7F229 /* starsbackground iOS.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "starsbackground iOS.png"; path = "../../sample/sample/starsbackground iOS.png"; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 94B6315315E4E53F00C7F229 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 94B6315B15E4E53F00C7F229 /* UIKit.framework in Frameworks */, 53 | 94B6315D15E4E53F00C7F229 /* Foundation.framework in Frameworks */, 54 | 94B6315F15E4E53F00C7F229 /* CoreGraphics.framework in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXFrameworksBuildPhase section */ 59 | 60 | /* Begin PBXGroup section */ 61 | 94B6314B15E4E53F00C7F229 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 94B6317715E4E54F00C7F229 /* EDStarRating */, 65 | 94B6316015E4E53F00C7F229 /* SampleiOS */, 66 | 94B6315915E4E53F00C7F229 /* Frameworks */, 67 | 94B6315715E4E53F00C7F229 /* Products */, 68 | ); 69 | sourceTree = ""; 70 | }; 71 | 94B6315715E4E53F00C7F229 /* Products */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 94B6315615E4E53F00C7F229 /* SampleiOS.app */, 75 | ); 76 | name = Products; 77 | sourceTree = ""; 78 | }; 79 | 94B6315915E4E53F00C7F229 /* Frameworks */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 94B6315A15E4E53F00C7F229 /* UIKit.framework */, 83 | 94B6315C15E4E53F00C7F229 /* Foundation.framework */, 84 | 94B6315E15E4E53F00C7F229 /* CoreGraphics.framework */, 85 | ); 86 | name = Frameworks; 87 | sourceTree = ""; 88 | }; 89 | 94B6316015E4E53F00C7F229 /* SampleiOS */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 94B6318115E4EC6200C7F229 /* starsbackground iOS.png */, 93 | 94B6317B15E4E74A00C7F229 /* star.png */, 94 | 94B6317C15E4E74A00C7F229 /* starhighlighted.png */, 95 | 94B6316915E4E53F00C7F229 /* AppDelegate.h */, 96 | 94B6316A15E4E53F00C7F229 /* AppDelegate.m */, 97 | 94B6316C15E4E53F00C7F229 /* ViewController.h */, 98 | 94B6316D15E4E53F00C7F229 /* ViewController.m */, 99 | 94B6316F15E4E53F00C7F229 /* ViewController.xib */, 100 | 94B6316115E4E53F00C7F229 /* Supporting Files */, 101 | ); 102 | path = SampleiOS; 103 | sourceTree = ""; 104 | }; 105 | 94B6316115E4E53F00C7F229 /* Supporting Files */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 01C5BF7917A3F04800B7B0BC /* Default-568h@2x.png */, 109 | 94B6316215E4E53F00C7F229 /* SampleiOS-Info.plist */, 110 | 94B6316315E4E53F00C7F229 /* InfoPlist.strings */, 111 | 94B6316615E4E53F00C7F229 /* main.m */, 112 | 94B6316815E4E53F00C7F229 /* SampleiOS-Prefix.pch */, 113 | ); 114 | name = "Supporting Files"; 115 | sourceTree = ""; 116 | }; 117 | 94B6317715E4E54F00C7F229 /* EDStarRating */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 94B6317815E4E56100C7F229 /* EDStarRating.h */, 121 | 94B6317915E4E56100C7F229 /* EDStarRating.m */, 122 | ); 123 | name = EDStarRating; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 94B6315515E4E53F00C7F229 /* SampleiOS */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 94B6317415E4E53F00C7F229 /* Build configuration list for PBXNativeTarget "SampleiOS" */; 132 | buildPhases = ( 133 | 94B6315215E4E53F00C7F229 /* Sources */, 134 | 94B6315315E4E53F00C7F229 /* Frameworks */, 135 | 94B6315415E4E53F00C7F229 /* Resources */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | ); 141 | name = SampleiOS; 142 | productName = SampleiOS; 143 | productReference = 94B6315615E4E53F00C7F229 /* SampleiOS.app */; 144 | productType = "com.apple.product-type.application"; 145 | }; 146 | /* End PBXNativeTarget section */ 147 | 148 | /* Begin PBXProject section */ 149 | 94B6314D15E4E53F00C7F229 /* Project object */ = { 150 | isa = PBXProject; 151 | attributes = { 152 | LastUpgradeCheck = 0460; 153 | }; 154 | buildConfigurationList = 94B6315015E4E53F00C7F229 /* Build configuration list for PBXProject "SampleiOS" */; 155 | compatibilityVersion = "Xcode 3.2"; 156 | developmentRegion = English; 157 | hasScannedForEncodings = 0; 158 | knownRegions = ( 159 | en, 160 | ); 161 | mainGroup = 94B6314B15E4E53F00C7F229; 162 | productRefGroup = 94B6315715E4E53F00C7F229 /* Products */; 163 | projectDirPath = ""; 164 | projectRoot = ""; 165 | targets = ( 166 | 94B6315515E4E53F00C7F229 /* SampleiOS */, 167 | ); 168 | }; 169 | /* End PBXProject section */ 170 | 171 | /* Begin PBXResourcesBuildPhase section */ 172 | 94B6315415E4E53F00C7F229 /* Resources */ = { 173 | isa = PBXResourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 94B6316515E4E53F00C7F229 /* InfoPlist.strings in Resources */, 177 | 94B6317115E4E53F00C7F229 /* ViewController.xib in Resources */, 178 | 94B6317E15E4E74A00C7F229 /* star.png in Resources */, 179 | 94B6317F15E4E74A00C7F229 /* starhighlighted.png in Resources */, 180 | 94B6318215E4EC6200C7F229 /* starsbackground iOS.png in Resources */, 181 | 01C5BF7A17A3F04800B7B0BC /* Default-568h@2x.png in Resources */, 182 | ); 183 | runOnlyForDeploymentPostprocessing = 0; 184 | }; 185 | /* End PBXResourcesBuildPhase section */ 186 | 187 | /* Begin PBXSourcesBuildPhase section */ 188 | 94B6315215E4E53F00C7F229 /* Sources */ = { 189 | isa = PBXSourcesBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | 94B6316715E4E53F00C7F229 /* main.m in Sources */, 193 | 94B6316B15E4E53F00C7F229 /* AppDelegate.m in Sources */, 194 | 94B6316E15E4E53F00C7F229 /* ViewController.m in Sources */, 195 | 94B6317A15E4E56100C7F229 /* EDStarRating.m in Sources */, 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | }; 199 | /* End PBXSourcesBuildPhase section */ 200 | 201 | /* Begin PBXVariantGroup section */ 202 | 94B6316315E4E53F00C7F229 /* InfoPlist.strings */ = { 203 | isa = PBXVariantGroup; 204 | children = ( 205 | 94B6316415E4E53F00C7F229 /* en */, 206 | ); 207 | name = InfoPlist.strings; 208 | sourceTree = ""; 209 | }; 210 | 94B6316F15E4E53F00C7F229 /* ViewController.xib */ = { 211 | isa = PBXVariantGroup; 212 | children = ( 213 | 94B6317015E4E53F00C7F229 /* en */, 214 | ); 215 | name = ViewController.xib; 216 | sourceTree = ""; 217 | }; 218 | /* End PBXVariantGroup section */ 219 | 220 | /* Begin XCBuildConfiguration section */ 221 | 94B6317215E4E53F00C7F229 /* Debug */ = { 222 | isa = XCBuildConfiguration; 223 | buildSettings = { 224 | ALWAYS_SEARCH_USER_PATHS = NO; 225 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 226 | CLANG_ENABLE_OBJC_ARC = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_ENUM_CONVERSION = YES; 229 | CLANG_WARN_INT_CONVERSION = YES; 230 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 231 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 232 | COPY_PHASE_STRIP = NO; 233 | GCC_C_LANGUAGE_STANDARD = gnu99; 234 | GCC_DYNAMIC_NO_PIC = NO; 235 | GCC_OPTIMIZATION_LEVEL = 0; 236 | GCC_PREPROCESSOR_DEFINITIONS = ( 237 | "DEBUG=1", 238 | "$(inherited)", 239 | ); 240 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 241 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 242 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 243 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 244 | GCC_WARN_UNUSED_VARIABLE = YES; 245 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 246 | SDKROOT = iphoneos; 247 | }; 248 | name = Debug; 249 | }; 250 | 94B6317315E4E53F00C7F229 /* Release */ = { 251 | isa = XCBuildConfiguration; 252 | buildSettings = { 253 | ALWAYS_SEARCH_USER_PATHS = NO; 254 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 261 | COPY_PHASE_STRIP = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 265 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 266 | GCC_WARN_UNUSED_VARIABLE = YES; 267 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 268 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 269 | SDKROOT = iphoneos; 270 | VALIDATE_PRODUCT = YES; 271 | }; 272 | name = Release; 273 | }; 274 | 94B6317515E4E53F00C7F229 /* Debug */ = { 275 | isa = XCBuildConfiguration; 276 | buildSettings = { 277 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 278 | GCC_PREFIX_HEADER = "SampleiOS/SampleiOS-Prefix.pch"; 279 | INFOPLIST_FILE = "SampleiOS/SampleiOS-Info.plist"; 280 | PRODUCT_NAME = "$(TARGET_NAME)"; 281 | WRAPPER_EXTENSION = app; 282 | }; 283 | name = Debug; 284 | }; 285 | 94B6317615E4E53F00C7F229 /* Release */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 289 | GCC_PREFIX_HEADER = "SampleiOS/SampleiOS-Prefix.pch"; 290 | INFOPLIST_FILE = "SampleiOS/SampleiOS-Info.plist"; 291 | PRODUCT_NAME = "$(TARGET_NAME)"; 292 | WRAPPER_EXTENSION = app; 293 | }; 294 | name = Release; 295 | }; 296 | /* End XCBuildConfiguration section */ 297 | 298 | /* Begin XCConfigurationList section */ 299 | 94B6315015E4E53F00C7F229 /* Build configuration list for PBXProject "SampleiOS" */ = { 300 | isa = XCConfigurationList; 301 | buildConfigurations = ( 302 | 94B6317215E4E53F00C7F229 /* Debug */, 303 | 94B6317315E4E53F00C7F229 /* Release */, 304 | ); 305 | defaultConfigurationIsVisible = 0; 306 | defaultConfigurationName = Release; 307 | }; 308 | 94B6317415E4E53F00C7F229 /* Build configuration list for PBXNativeTarget "SampleiOS" */ = { 309 | isa = XCConfigurationList; 310 | buildConfigurations = ( 311 | 94B6317515E4E53F00C7F229 /* Debug */, 312 | 94B6317615E4E53F00C7F229 /* Release */, 313 | ); 314 | defaultConfigurationIsVisible = 0; 315 | defaultConfigurationName = Release; 316 | }; 317 | /* End XCConfigurationList section */ 318 | }; 319 | rootObject = 94B6314D15E4E53F00C7F229 /* Project object */; 320 | } 321 | --------------------------------------------------------------------------------