├── .gitattributes ├── .gitignore ├── Classes ├── ALPickerView.h ├── ALPickerView.m ├── ALPickerViewCell.h └── ALPickerViewCell.m ├── Demo ├── Classes │ ├── DemoAppDelegate.h │ ├── DemoAppDelegate.m │ ├── DemoViewController.h │ └── DemoViewController.m ├── Demo-Info.plist ├── Demo.xcodeproj │ └── project.pbxproj ├── DemoViewController.xib ├── Demo_Prefix.pch ├── MainWindow.xib └── main.m ├── ImageRes ├── check@2x.png ├── check_selected@2x.png ├── frame_left@2x.png ├── frame_middle@2x.png ├── frame_right@2x.png ├── wheel_bg@2x.png └── wheel_shadow@2x.png ├── LICENSE.txt ├── README.mdown └── screenshot.png /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -crlf -diff -merge 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | *.mode1 4 | *.mode1v3 5 | *.mode2v3 6 | *.perspective 7 | *.perspectivev3 8 | *.pbxuser 9 | *.xcworkspace 10 | xcuserdata 11 | 12 | .svn 13 | CVS 14 | 15 | .DS_Store 16 | *~.nib 17 | *.swp 18 | -------------------------------------------------------------------------------- /Classes/ALPickerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ALPickerView.h 3 | // 4 | // Created by Alex Leutgöb on 11.11.11. 5 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | @protocol ALPickerViewDelegate; 29 | 30 | 31 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 32 | 33 | 34 | @interface ALPickerView : UIView { 35 | @private 36 | id delegate_; 37 | 38 | UITableView *internalTableView_; 39 | } 40 | 41 | // Set a delegate conforming to ALPickerViewDelegate protocol 42 | @property (nonatomic, assign) id delegate; 43 | // If set to nil the all option row is hidden at all, default is 'All' 44 | @property (nonatomic, copy) NSString *allOptionTitle; 45 | 46 | // Reload whole pickerview from delegate 47 | - (void)reloadAllComponents; 48 | 49 | @end 50 | 51 | 52 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 53 | 54 | 55 | @protocol ALPickerViewDelegate 56 | 57 | // Return the number of elements of your pickerview 58 | - (NSInteger)numberOfRowsForPickerView:(ALPickerView *)pickerView; 59 | // Return a plain UIString to display on the given row 60 | - (NSString *)pickerView:(ALPickerView *)pickerView textForRow:(NSInteger)row; 61 | // Return a boolean selection state on the given row 62 | - (BOOL)pickerView:(ALPickerView *)pickerView selectionStateForRow:(NSInteger)row; 63 | 64 | @optional 65 | 66 | // Inform the delegate that a row got selected, if row = -1 all rows are selected 67 | - (void)pickerView:(ALPickerView *)pickerView didCheckRow:(NSInteger)row; 68 | // Inform the delegate that a row got deselected, if row = -1 all rows are deselected 69 | - (void)pickerView:(ALPickerView *)pickerView didUncheckRow:(NSInteger)row; 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Classes/ALPickerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ALPickerView.m 3 | // 4 | // Created by Alex Leutgöb on 11.11.11. 5 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "ALPickerView.h" 27 | #import "ALPickerViewCell.h" 28 | 29 | 30 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 31 | 32 | 33 | @implementation ALPickerView 34 | 35 | @synthesize delegate = delegate_; 36 | @synthesize allOptionTitle; 37 | 38 | 39 | #pragma mark - NSObject stuff 40 | 41 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 42 | - (id)init { 43 | return [self initWithFrame:CGRectMake(0, 0, 320, 216)]; 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 48 | - (id)initWithFrame:(CGRect)frame { 49 | // Set fix width and height 50 | if ((self = [super initWithFrame:CGRectMake(frame.origin.x, frame.origin.y, 320, 216)])) { 51 | self.backgroundColor = [UIColor blackColor]; 52 | self.clipsToBounds = YES; 53 | self.allOptionTitle = NSLocalizedString(@"All", @"All option title"); 54 | 55 | internalTableView_ = [[UITableView alloc] initWithFrame:CGRectMake(10, -2, 300, 218) style:UITableViewStylePlain]; 56 | internalTableView_.delegate = self; 57 | internalTableView_.dataSource = self; 58 | internalTableView_.separatorStyle = UITableViewCellSeparatorStyleNone; 59 | internalTableView_.showsVerticalScrollIndicator = NO; 60 | internalTableView_.scrollsToTop = NO; 61 | UIImage *backgroundImage = [[UIImage imageNamed:@"wheel_bg"] stretchableImageWithLeftCapWidth:4 topCapHeight:0]; 62 | 63 | internalTableView_.backgroundView = [[[UIImageView alloc] initWithImage:backgroundImage] autorelease]; 64 | [self addSubview:internalTableView_]; 65 | 66 | // Add shadow to wheel 67 | UIImageView *shadow = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wheel_shadow"]] autorelease]; 68 | shadow.frame = internalTableView_.frame; 69 | [self addSubview:shadow]; 70 | 71 | // Add border images 72 | UIImageView *leftBorder = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"frame_left"]] autorelease]; 73 | leftBorder.frame = CGRectMake(0, 0, 15, 216); 74 | [self addSubview:leftBorder]; 75 | UIImageView *rightBorder = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"frame_right"]] autorelease]; 76 | rightBorder.frame = CGRectMake(self.frame.size.width - 15, 0, 15, 216); 77 | [self addSubview:rightBorder]; 78 | UIImageView *middleBorder = [[[UIImageView alloc] initWithImage: 79 | [[UIImage imageNamed:@"frame_middle"] 80 | stretchableImageWithLeftCapWidth:0 topCapHeight:10]] autorelease]; 81 | middleBorder.frame = CGRectMake(15, 0, self.frame.size.width - 30, 216); 82 | [self addSubview:middleBorder]; 83 | } 84 | return self; 85 | } 86 | 87 | 88 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 89 | - (void)dealloc { 90 | [allOptionTitle release]; 91 | 92 | [internalTableView_ release]; 93 | [super dealloc]; 94 | } 95 | 96 | 97 | #pragma mark - Custom methods 98 | 99 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 100 | - (void)reloadAllComponents { 101 | [internalTableView_ reloadData]; 102 | } 103 | 104 | 105 | #pragma mark - UITableView 106 | 107 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 108 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 109 | // Add 4 additional rows for whitespace on top and bottom 110 | if (allOptionTitle) 111 | return [delegate_ numberOfRowsForPickerView:self] ? [delegate_ numberOfRowsForPickerView:self] + 5 : 0; 112 | else 113 | return [delegate_ numberOfRowsForPickerView:self] ? [delegate_ numberOfRowsForPickerView:self] + 4 : 0; 114 | } 115 | 116 | 117 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 118 | - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 119 | static NSString *CellIdentifier = @"ALPVCell"; 120 | 121 | ALPickerViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; 122 | if (cell == nil) { 123 | cell = [[[ALPickerViewCell alloc] initWithReuseIdentifier:CellIdentifier] autorelease]; 124 | } 125 | 126 | if (indexPath.row < 2 || indexPath.row >= ([delegate_ numberOfRowsForPickerView:self] + (allOptionTitle ? 3 : 2))) { 127 | // Whitespace cell 128 | cell.textLabel.text = nil; 129 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 130 | } 131 | else { 132 | if (allOptionTitle && indexPath.row == 2) { 133 | cell.textLabel.text = allOptionTitle; 134 | BOOL allSelected = YES; 135 | for (int i = 0; i < [self.delegate numberOfRowsForPickerView:self]; i++) { 136 | if ([delegate_ pickerView:self selectionStateForRow:i] == NO) { 137 | allSelected = NO; 138 | break; 139 | } 140 | } 141 | cell.selectionState = allSelected; 142 | } 143 | else { 144 | int actualRow = indexPath.row - (allOptionTitle ? 3 : 2); 145 | cell.textLabel.text = [delegate_ pickerView:self textForRow:actualRow]; 146 | cell.selectionState = [delegate_ pickerView:self selectionStateForRow:actualRow]; 147 | } 148 | cell.selectionStyle = UITableViewCellSelectionStyleBlue; 149 | } 150 | 151 | return cell; 152 | } 153 | 154 | 155 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 156 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 157 | if (indexPath.row > 1 && indexPath.row < ([delegate_ numberOfRowsForPickerView:self] + (allOptionTitle ? 3 : 2))) { 158 | // Set selection state 159 | ALPickerViewCell *cell = (ALPickerViewCell *)[tableView cellForRowAtIndexPath:indexPath]; 160 | cell.selectionState = !cell.selectionState; 161 | 162 | // Inform delegate 163 | int actualRow = indexPath.row - (allOptionTitle ? 3 : 2); 164 | 165 | if (cell.selectionState != NO) { 166 | if ([self.delegate respondsToSelector:@selector(pickerView:didCheckRow:)]) 167 | [delegate_ pickerView:self didCheckRow:actualRow]; 168 | } 169 | else { 170 | if ([self.delegate respondsToSelector:@selector(pickerView:didUncheckRow:)]) 171 | [delegate_ pickerView:self didUncheckRow:actualRow]; 172 | } 173 | 174 | // Iterate visible cells and update them too 175 | for (ALPickerViewCell *aCell in tableView.visibleCells) { 176 | int iterateRow = [tableView indexPathForCell:aCell].row - (allOptionTitle ? 3 : 2); 177 | 178 | if (allOptionTitle && iterateRow == -1) { 179 | BOOL allSelected = YES; 180 | for (int i = 0; i < [self.delegate numberOfRowsForPickerView:self]; i++) { 181 | if ([delegate_ pickerView:self selectionStateForRow:i] == NO) { 182 | allSelected = NO; 183 | break; 184 | } 185 | } 186 | aCell.selectionState = allSelected; 187 | } 188 | else if (iterateRow >= 0 && iterateRow < [delegate_ numberOfRowsForPickerView:self]) { 189 | if (iterateRow == actualRow) 190 | continue; 191 | aCell.selectionState = [delegate_ pickerView:self selectionStateForRow:iterateRow]; 192 | } 193 | } 194 | 195 | // Scroll the cell cell to the middle of the tableview 196 | [tableView setContentOffset:CGPointMake(0, tableView.rowHeight * (indexPath.row - 2)) animated:YES]; 197 | } 198 | 199 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 200 | } 201 | 202 | 203 | #pragma mark - ScrollView 204 | 205 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 206 | - (void)scrollViewDidEndDecelerating:(UITableView *)tableView { 207 | int co = ((int)tableView.contentOffset.y % (int)tableView.rowHeight); 208 | if (co < tableView.rowHeight / 2) 209 | [tableView setContentOffset:CGPointMake(0, tableView.contentOffset.y - co) animated:YES]; 210 | else 211 | [tableView setContentOffset:CGPointMake(0, tableView.contentOffset.y + (tableView.rowHeight - co)) animated:YES]; 212 | } 213 | 214 | 215 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 216 | - (void)scrollViewDidEndDragging:(UITableView *)scrollView willDecelerate:(BOOL)decelerate { 217 | if(decelerate) 218 | return; 219 | [self scrollViewDidEndDecelerating:scrollView]; 220 | } 221 | 222 | @end 223 | -------------------------------------------------------------------------------- /Classes/ALPickerViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ALPickerViewCell.h 3 | // 4 | // Created by Alex Leutgöb on 11.11.11. 5 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | 29 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 30 | 31 | 32 | @interface ALPickerViewCell : UITableViewCell { 33 | @private 34 | BOOL selectionState_; 35 | } 36 | 37 | @property (nonatomic, assign) BOOL selectionState; 38 | 39 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Classes/ALPickerViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ALPickerViewCell.m 3 | // 4 | // Created by Alex Leutgöb on 11.11.11. 5 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | // 25 | 26 | #import "ALPickerViewCell.h" 27 | 28 | 29 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 30 | 31 | 32 | @implementation ALPickerViewCell 33 | 34 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 35 | - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier { 36 | if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])) { 37 | selectionState_ = NO; 38 | self.textLabel.font = [UIFont boldSystemFontOfSize:21]; 39 | } 40 | return self; 41 | } 42 | 43 | 44 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 45 | - (void)prepareForReuse { 46 | [super prepareForReuse]; 47 | 48 | self.imageView.image = nil; 49 | self.imageView.highlightedImage = nil; 50 | } 51 | 52 | 53 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 54 | - (BOOL)selectionState { 55 | return selectionState_; 56 | } 57 | 58 | 59 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 60 | - (void)setSelectionState:(BOOL)selectionState { 61 | selectionState_ = selectionState; 62 | 63 | if (selectionState_ != NO) { 64 | self.imageView.image = [UIImage imageNamed:@"check"]; 65 | self.imageView.highlightedImage = [UIImage imageNamed:@"check_selected"]; 66 | self.textLabel.textColor = [UIColor colorWithRed:33/256. green:80/256. blue:134/256. alpha:1]; 67 | } 68 | else { 69 | self.imageView.image = nil; 70 | self.imageView.highlightedImage = nil; 71 | self.textLabel.textColor = [UIColor blackColor]; 72 | } 73 | 74 | [self.imageView setNeedsDisplay]; 75 | [self.textLabel setNeedsDisplay]; 76 | [self setNeedsLayout]; 77 | } 78 | 79 | 80 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 81 | - (void)layoutSubviews { 82 | [super layoutSubviews]; 83 | 84 | self.imageView.frame = CGRectMake(15, 12, 18, 18); 85 | self.textLabel.frame = CGRectMake(44, 9, self.frame.size.width - 54, 24); 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Demo/Classes/DemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoAppDelegate.h 3 | // Demo 4 | // 5 | // Created by Alex Leutgöb on 17.01.11. 6 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DemoViewController; 12 | 13 | @interface DemoAppDelegate : NSObject { 14 | UIWindow *window; 15 | DemoViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet DemoViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Demo/Classes/DemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoAppDelegate.m 3 | // Demo 4 | // 5 | // Created by Alex Leutgöb on 17.01.11. 6 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 7 | // 8 | 9 | #import "DemoAppDelegate.h" 10 | #import "DemoViewController.h" 11 | 12 | @implementation DemoAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [self.window addSubview:viewController.view]; 27 | [self.window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Demo/Classes/DemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DemoViewController.h 3 | // Demo 4 | // 5 | // Created by Alex Leutgöb on 17.01.11. 6 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ALPickerView.h" 11 | 12 | 13 | @interface DemoViewController : UIViewController { 14 | NSArray *entries; 15 | NSMutableDictionary *selectionStates; 16 | 17 | ALPickerView *pickerView; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Demo/Classes/DemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DemoViewController.m 3 | // Demo 4 | // 5 | // Created by Alex Leutgöb on 17.01.11. 6 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 7 | // 8 | 9 | #import "DemoViewController.h" 10 | 11 | 12 | @implementation DemoViewController 13 | 14 | 15 | - (void)viewDidLoad { 16 | [super viewDidLoad]; 17 | 18 | // Create some sample data 19 | entries = [[NSArray alloc] initWithObjects:@"Row 1", @"Row 2", @"Row 3", @"Row 4", @"Row 5", nil]; 20 | selectionStates = [[NSMutableDictionary alloc] init]; 21 | for (NSString *key in entries) 22 | [selectionStates setObject:[NSNumber numberWithBool:NO] forKey:key]; 23 | 24 | // Init picker and add it to view 25 | pickerView = [[ALPickerView alloc] initWithFrame:CGRectMake(0, 244, 0, 0)]; 26 | pickerView.delegate = self; 27 | [self.view addSubview:pickerView]; 28 | } 29 | 30 | - (void)dealloc { 31 | [pickerView release]; 32 | 33 | [selectionStates release]; 34 | [entries release]; 35 | [super dealloc]; 36 | } 37 | 38 | 39 | #pragma mark - 40 | #pragma mark ALPickerView delegate methods 41 | 42 | - (NSInteger)numberOfRowsForPickerView:(ALPickerView *)pickerView { 43 | return [entries count]; 44 | } 45 | 46 | - (NSString *)pickerView:(ALPickerView *)pickerView textForRow:(NSInteger)row { 47 | return [entries objectAtIndex:row]; 48 | } 49 | 50 | - (BOOL)pickerView:(ALPickerView *)pickerView selectionStateForRow:(NSInteger)row { 51 | return [[selectionStates objectForKey:[entries objectAtIndex:row]] boolValue]; 52 | } 53 | 54 | - (void)pickerView:(ALPickerView *)pickerView didCheckRow:(NSInteger)row { 55 | // Check whether all rows are checked or only one 56 | if (row == -1) 57 | for (id key in [selectionStates allKeys]) 58 | [selectionStates setObject:[NSNumber numberWithBool:YES] forKey:key]; 59 | else 60 | [selectionStates setObject:[NSNumber numberWithBool:YES] forKey:[entries objectAtIndex:row]]; 61 | } 62 | 63 | - (void)pickerView:(ALPickerView *)pickerView didUncheckRow:(NSInteger)row { 64 | // Check whether all rows are unchecked or only one 65 | if (row == -1) 66 | for (id key in [selectionStates allKeys]) 67 | [selectionStates setObject:[NSNumber numberWithBool:NO] forKey:key]; 68 | else 69 | [selectionStates setObject:[NSNumber numberWithBool:NO] forKey:[entries objectAtIndex:row]]; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Demo/Demo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* DemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* DemoAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* DemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* DemoViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* DemoViewController.m */; }; 18 | FA36CA2112E4DABB00A49F9F /* ALPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = FA36CA1C12E4DABB00A49F9F /* ALPickerView.m */; }; 19 | FA8EA5EA146EC91100CCACA3 /* ALPickerViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8EA5E9146EC91100CCACA3 /* ALPickerViewCell.m */; }; 20 | FA8EA60A146EDEF300CCACA3 /* check@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5EB146EC92A00CCACA3 /* check@2x.png */; }; 21 | FA8EA60B146EDEF300CCACA3 /* check_selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5EC146EC92A00CCACA3 /* check_selected@2x.png */; }; 22 | FA8EA60C146EDEF300CCACA3 /* frame_left@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5ED146EC92A00CCACA3 /* frame_left@2x.png */; }; 23 | FA8EA60D146EDEF300CCACA3 /* frame_middle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5EE146EC92A00CCACA3 /* frame_middle@2x.png */; }; 24 | FA8EA60E146EDEF300CCACA3 /* frame_right@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5EF146EC92A00CCACA3 /* frame_right@2x.png */; }; 25 | FA8EA60F146EDEF300CCACA3 /* wheel_shadow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5F0146EC92A00CCACA3 /* wheel_shadow@2x.png */; }; 26 | FA8EA610146EDEF300CCACA3 /* wheel_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA8EA5F1146EC92A00CCACA3 /* wheel_bg@2x.png */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 31 | 1D3623240D0F684500981E51 /* DemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoAppDelegate.h; sourceTree = ""; }; 32 | 1D3623250D0F684500981E51 /* DemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoAppDelegate.m; sourceTree = ""; }; 33 | 1D6058910D05DD3D006BFB54 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 35 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 36 | 2899E5210DE3E06400AC0155 /* DemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DemoViewController.xib; sourceTree = ""; }; 37 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 38 | 28D7ACF60DDB3853001CB0EB /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; 39 | 28D7ACF70DDB3853001CB0EB /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; 40 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | 32CA4F630368D1EE00C91783 /* Demo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Demo_Prefix.pch; sourceTree = ""; }; 42 | 8D1107310486CEB800E47090 /* Demo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Demo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 43 | FA36CA1B12E4DABB00A49F9F /* ALPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ALPickerView.h; path = ../Classes/ALPickerView.h; sourceTree = SOURCE_ROOT; }; 44 | FA36CA1C12E4DABB00A49F9F /* ALPickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ALPickerView.m; path = ../Classes/ALPickerView.m; sourceTree = SOURCE_ROOT; }; 45 | FA8EA5E8146EC91100CCACA3 /* ALPickerViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ALPickerViewCell.h; path = ../../Classes/ALPickerViewCell.h; sourceTree = ""; }; 46 | FA8EA5E9146EC91100CCACA3 /* ALPickerViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ALPickerViewCell.m; path = ../../Classes/ALPickerViewCell.m; sourceTree = ""; }; 47 | FA8EA5EB146EC92A00CCACA3 /* check@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "check@2x.png"; path = "../ImageRes/check@2x.png"; sourceTree = ""; }; 48 | FA8EA5EC146EC92A00CCACA3 /* check_selected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "check_selected@2x.png"; path = "../ImageRes/check_selected@2x.png"; sourceTree = ""; }; 49 | FA8EA5ED146EC92A00CCACA3 /* frame_left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "frame_left@2x.png"; path = "../ImageRes/frame_left@2x.png"; sourceTree = ""; }; 50 | FA8EA5EE146EC92A00CCACA3 /* frame_middle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "frame_middle@2x.png"; path = "../ImageRes/frame_middle@2x.png"; sourceTree = ""; }; 51 | FA8EA5EF146EC92A00CCACA3 /* frame_right@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "frame_right@2x.png"; path = "../ImageRes/frame_right@2x.png"; sourceTree = ""; }; 52 | FA8EA5F0146EC92A00CCACA3 /* wheel_shadow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "wheel_shadow@2x.png"; path = "../ImageRes/wheel_shadow@2x.png"; sourceTree = ""; }; 53 | FA8EA5F1146EC92A00CCACA3 /* wheel_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "wheel_bg@2x.png"; path = "../ImageRes/wheel_bg@2x.png"; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 62 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 63 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 080E96DDFE201D6D7F000001 /* Classes */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 1D3623240D0F684500981E51 /* DemoAppDelegate.h */, 74 | 1D3623250D0F684500981E51 /* DemoAppDelegate.m */, 75 | 28D7ACF60DDB3853001CB0EB /* DemoViewController.h */, 76 | 28D7ACF70DDB3853001CB0EB /* DemoViewController.m */, 77 | FA36CA1812E4DA9E00A49F9F /* ALPickerView */, 78 | ); 79 | path = Classes; 80 | sourceTree = ""; 81 | }; 82 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 1D6058910D05DD3D006BFB54 /* Demo.app */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 080E96DDFE201D6D7F000001 /* Classes */, 94 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 95 | 29B97317FDCFA39411CA2CEA /* Resources */, 96 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 97 | 19C28FACFE9D520D11CA2CBB /* Products */, 98 | ); 99 | name = CustomTemplate; 100 | sourceTree = ""; 101 | }; 102 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 32CA4F630368D1EE00C91783 /* Demo_Prefix.pch */, 106 | 29B97316FDCFA39411CA2CEA /* main.m */, 107 | ); 108 | name = "Other Sources"; 109 | sourceTree = ""; 110 | }; 111 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | FA8EA5EB146EC92A00CCACA3 /* check@2x.png */, 115 | FA8EA5EC146EC92A00CCACA3 /* check_selected@2x.png */, 116 | FA8EA5ED146EC92A00CCACA3 /* frame_left@2x.png */, 117 | FA8EA5EE146EC92A00CCACA3 /* frame_middle@2x.png */, 118 | FA8EA5EF146EC92A00CCACA3 /* frame_right@2x.png */, 119 | FA8EA5F0146EC92A00CCACA3 /* wheel_shadow@2x.png */, 120 | FA8EA5F1146EC92A00CCACA3 /* wheel_bg@2x.png */, 121 | 2899E5210DE3E06400AC0155 /* DemoViewController.xib */, 122 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 123 | 8D1107310486CEB800E47090 /* Demo-Info.plist */, 124 | ); 125 | name = Resources; 126 | sourceTree = ""; 127 | }; 128 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 132 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 133 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 134 | ); 135 | name = Frameworks; 136 | sourceTree = ""; 137 | }; 138 | FA36CA1812E4DA9E00A49F9F /* ALPickerView */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | FA36CA1B12E4DABB00A49F9F /* ALPickerView.h */, 142 | FA36CA1C12E4DABB00A49F9F /* ALPickerView.m */, 143 | FA8EA5E8146EC91100CCACA3 /* ALPickerViewCell.h */, 144 | FA8EA5E9146EC91100CCACA3 /* ALPickerViewCell.m */, 145 | ); 146 | name = ALPickerView; 147 | sourceTree = ""; 148 | }; 149 | /* End PBXGroup section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 1D6058900D05DD3D006BFB54 /* Demo */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Demo" */; 155 | buildPhases = ( 156 | 1D60588D0D05DD3D006BFB54 /* Resources */, 157 | 1D60588E0D05DD3D006BFB54 /* Sources */, 158 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = Demo; 165 | productName = Demo; 166 | productReference = 1D6058910D05DD3D006BFB54 /* Demo.app */; 167 | productType = "com.apple.product-type.application"; 168 | }; 169 | /* End PBXNativeTarget section */ 170 | 171 | /* Begin PBXProject section */ 172 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 173 | isa = PBXProject; 174 | attributes = { 175 | LastUpgradeCheck = 0430; 176 | }; 177 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Demo" */; 178 | compatibilityVersion = "Xcode 3.2"; 179 | developmentRegion = English; 180 | hasScannedForEncodings = 1; 181 | knownRegions = ( 182 | English, 183 | Japanese, 184 | French, 185 | German, 186 | ); 187 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 188 | projectDirPath = ""; 189 | projectRoot = ""; 190 | targets = ( 191 | 1D6058900D05DD3D006BFB54 /* Demo */, 192 | ); 193 | }; 194 | /* End PBXProject section */ 195 | 196 | /* Begin PBXResourcesBuildPhase section */ 197 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 202 | 2899E5220DE3E06400AC0155 /* DemoViewController.xib in Resources */, 203 | FA8EA60A146EDEF300CCACA3 /* check@2x.png in Resources */, 204 | FA8EA60B146EDEF300CCACA3 /* check_selected@2x.png in Resources */, 205 | FA8EA60C146EDEF300CCACA3 /* frame_left@2x.png in Resources */, 206 | FA8EA60D146EDEF300CCACA3 /* frame_middle@2x.png in Resources */, 207 | FA8EA60E146EDEF300CCACA3 /* frame_right@2x.png in Resources */, 208 | FA8EA60F146EDEF300CCACA3 /* wheel_shadow@2x.png in Resources */, 209 | FA8EA610146EDEF300CCACA3 /* wheel_bg@2x.png in Resources */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | /* End PBXResourcesBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 221 | 1D3623260D0F684500981E51 /* DemoAppDelegate.m in Sources */, 222 | 28D7ACF80DDB3853001CB0EB /* DemoViewController.m in Sources */, 223 | FA36CA2112E4DABB00A49F9F /* ALPickerView.m in Sources */, 224 | FA8EA5EA146EC91100CCACA3 /* ALPickerViewCell.m in Sources */, 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | }; 228 | /* End PBXSourcesBuildPhase section */ 229 | 230 | /* Begin XCBuildConfiguration section */ 231 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 232 | isa = XCBuildConfiguration; 233 | buildSettings = { 234 | ALWAYS_SEARCH_USER_PATHS = NO; 235 | COPY_PHASE_STRIP = NO; 236 | GCC_DYNAMIC_NO_PIC = NO; 237 | GCC_OPTIMIZATION_LEVEL = 0; 238 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 239 | GCC_PREFIX_HEADER = Demo_Prefix.pch; 240 | INFOPLIST_FILE = "Demo-Info.plist"; 241 | PRODUCT_NAME = Demo; 242 | }; 243 | name = Debug; 244 | }; 245 | 1D6058950D05DD3E006BFB54 /* Release */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ALWAYS_SEARCH_USER_PATHS = NO; 249 | COPY_PHASE_STRIP = YES; 250 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 251 | GCC_PREFIX_HEADER = Demo_Prefix.pch; 252 | INFOPLIST_FILE = "Demo-Info.plist"; 253 | PRODUCT_NAME = Demo; 254 | VALIDATE_PRODUCT = YES; 255 | }; 256 | name = Release; 257 | }; 258 | C01FCF4F08A954540054247B /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | GCC_C_LANGUAGE_STANDARD = c99; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 265 | GCC_WARN_UNUSED_VARIABLE = YES; 266 | SDKROOT = iphoneos; 267 | }; 268 | name = Debug; 269 | }; 270 | C01FCF5008A954540054247B /* Release */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 274 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 275 | GCC_C_LANGUAGE_STANDARD = c99; 276 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 277 | GCC_WARN_UNUSED_VARIABLE = YES; 278 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 279 | SDKROOT = iphoneos; 280 | }; 281 | name = Release; 282 | }; 283 | /* End XCBuildConfiguration section */ 284 | 285 | /* Begin XCConfigurationList section */ 286 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Demo" */ = { 287 | isa = XCConfigurationList; 288 | buildConfigurations = ( 289 | 1D6058940D05DD3E006BFB54 /* Debug */, 290 | 1D6058950D05DD3E006BFB54 /* Release */, 291 | ); 292 | defaultConfigurationIsVisible = 0; 293 | defaultConfigurationName = Release; 294 | }; 295 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Demo" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | C01FCF4F08A954540054247B /* Debug */, 299 | C01FCF5008A954540054247B /* Release */, 300 | ); 301 | defaultConfigurationIsVisible = 0; 302 | defaultConfigurationName = Release; 303 | }; 304 | /* End XCConfigurationList section */ 305 | }; 306 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 307 | } 308 | -------------------------------------------------------------------------------- /Demo/DemoViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J567 6 | 823 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 132 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | {320, 460} 44 | 45 | 46 | 10 47 | 48 | 549453824 49 | {84, 1} 50 | 51 | YES 52 | 53 | YES 54 | 55 | 56 | 57 | TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/ 58 | y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/ 59 | xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/ 60 | xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/ 61 | xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/ 62 | xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB 63 | AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES 64 | AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS 65 | AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA 66 | 67 | 68 | 69 | 70 | 71 | 3 72 | MCAwAA 73 | 74 | 75 | groupTableViewBackgroundColor 76 | 77 | NO 78 | 79 | IBCocoaTouchFramework 80 | 81 | 82 | 83 | 84 | YES 85 | 86 | 87 | view 88 | 89 | 90 | 91 | 7 92 | 93 | 94 | 95 | 96 | YES 97 | 98 | 0 99 | 100 | 101 | 102 | 103 | 104 | -1 105 | 106 | 107 | File's Owner 108 | 109 | 110 | -2 111 | 112 | 113 | 114 | 115 | 6 116 | 117 | 118 | YES 119 | 120 | 121 | 122 | 123 | 124 | 125 | YES 126 | 127 | YES 128 | -1.CustomClassName 129 | -2.CustomClassName 130 | 6.IBEditorWindowLastContentRect 131 | 6.IBPluginDependency 132 | 133 | 134 | YES 135 | DemoViewController 136 | UIResponder 137 | {{736, 419}, {320, 480}} 138 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 139 | 140 | 141 | 142 | YES 143 | 144 | 145 | YES 146 | 147 | 148 | 149 | 150 | YES 151 | 152 | 153 | YES 154 | 155 | 156 | 157 | 8 158 | 159 | 160 | 161 | YES 162 | 163 | DemoViewController 164 | UIViewController 165 | 166 | selectedLabel 167 | UILabel 168 | 169 | 170 | selectedLabel 171 | 172 | selectedLabel 173 | UILabel 174 | 175 | 176 | 177 | IBProjectSource 178 | Classes/DemoViewController.h 179 | 180 | 181 | 182 | 183 | YES 184 | 185 | NSObject 186 | 187 | IBFrameworkSource 188 | Foundation.framework/Headers/NSError.h 189 | 190 | 191 | 192 | NSObject 193 | 194 | IBFrameworkSource 195 | Foundation.framework/Headers/NSFileManager.h 196 | 197 | 198 | 199 | NSObject 200 | 201 | IBFrameworkSource 202 | Foundation.framework/Headers/NSKeyValueCoding.h 203 | 204 | 205 | 206 | NSObject 207 | 208 | IBFrameworkSource 209 | Foundation.framework/Headers/NSKeyValueObserving.h 210 | 211 | 212 | 213 | NSObject 214 | 215 | IBFrameworkSource 216 | Foundation.framework/Headers/NSKeyedArchiver.h 217 | 218 | 219 | 220 | NSObject 221 | 222 | IBFrameworkSource 223 | Foundation.framework/Headers/NSObject.h 224 | 225 | 226 | 227 | NSObject 228 | 229 | IBFrameworkSource 230 | Foundation.framework/Headers/NSRunLoop.h 231 | 232 | 233 | 234 | NSObject 235 | 236 | IBFrameworkSource 237 | Foundation.framework/Headers/NSThread.h 238 | 239 | 240 | 241 | NSObject 242 | 243 | IBFrameworkSource 244 | Foundation.framework/Headers/NSURL.h 245 | 246 | 247 | 248 | NSObject 249 | 250 | IBFrameworkSource 251 | Foundation.framework/Headers/NSURLConnection.h 252 | 253 | 254 | 255 | NSObject 256 | 257 | IBFrameworkSource 258 | UIKit.framework/Headers/UIAccessibility.h 259 | 260 | 261 | 262 | NSObject 263 | 264 | IBFrameworkSource 265 | UIKit.framework/Headers/UINibLoading.h 266 | 267 | 268 | 269 | NSObject 270 | 271 | IBFrameworkSource 272 | UIKit.framework/Headers/UIResponder.h 273 | 274 | 275 | 276 | UILabel 277 | UIView 278 | 279 | IBFrameworkSource 280 | UIKit.framework/Headers/UILabel.h 281 | 282 | 283 | 284 | UIResponder 285 | NSObject 286 | 287 | 288 | 289 | UISearchBar 290 | UIView 291 | 292 | IBFrameworkSource 293 | UIKit.framework/Headers/UISearchBar.h 294 | 295 | 296 | 297 | UISearchDisplayController 298 | NSObject 299 | 300 | IBFrameworkSource 301 | UIKit.framework/Headers/UISearchDisplayController.h 302 | 303 | 304 | 305 | UIView 306 | 307 | IBFrameworkSource 308 | UIKit.framework/Headers/UIPrintFormatter.h 309 | 310 | 311 | 312 | UIView 313 | 314 | IBFrameworkSource 315 | UIKit.framework/Headers/UITextField.h 316 | 317 | 318 | 319 | UIView 320 | UIResponder 321 | 322 | IBFrameworkSource 323 | UIKit.framework/Headers/UIView.h 324 | 325 | 326 | 327 | UIViewController 328 | 329 | IBFrameworkSource 330 | UIKit.framework/Headers/UINavigationController.h 331 | 332 | 333 | 334 | UIViewController 335 | 336 | IBFrameworkSource 337 | UIKit.framework/Headers/UIPopoverController.h 338 | 339 | 340 | 341 | UIViewController 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UISplitViewController.h 345 | 346 | 347 | 348 | UIViewController 349 | 350 | IBFrameworkSource 351 | UIKit.framework/Headers/UITabBarController.h 352 | 353 | 354 | 355 | UIViewController 356 | UIResponder 357 | 358 | IBFrameworkSource 359 | UIKit.framework/Headers/UIViewController.h 360 | 361 | 362 | 363 | 364 | 0 365 | IBCocoaTouchFramework 366 | 367 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 368 | 369 | 370 | 371 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 372 | 373 | 374 | YES 375 | Demo.xcodeproj 376 | 3 377 | 132 378 | 379 | 380 | -------------------------------------------------------------------------------- /Demo/Demo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Demo' target in the 'Demo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Demo/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D571 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | DemoViewController 45 | 46 | 47 | 1 48 | 49 | IBCocoaTouchFramework 50 | NO 51 | 52 | 53 | 54 | 292 55 | {320, 480} 56 | 57 | 1 58 | MSAxIDEAA 59 | 60 | NO 61 | NO 62 | 63 | IBCocoaTouchFramework 64 | YES 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | delegate 73 | 74 | 75 | 76 | 4 77 | 78 | 79 | 80 | viewController 81 | 82 | 83 | 84 | 11 85 | 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 14 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | 3 112 | 113 | 114 | Demo App Delegate 115 | 116 | 117 | -2 118 | 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | 127 | 12 128 | 129 | 130 | 131 | 132 | 133 | 134 | YES 135 | 136 | YES 137 | -1.CustomClassName 138 | -2.CustomClassName 139 | 10.CustomClassName 140 | 10.IBEditorWindowLastContentRect 141 | 10.IBPluginDependency 142 | 12.IBEditorWindowLastContentRect 143 | 12.IBPluginDependency 144 | 3.CustomClassName 145 | 3.IBPluginDependency 146 | 147 | 148 | YES 149 | UIApplication 150 | UIResponder 151 | DemoViewController 152 | {{234, 376}, {320, 480}} 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | {{525, 346}, {320, 480}} 155 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 156 | DemoAppDelegate 157 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 158 | 159 | 160 | 161 | YES 162 | 163 | 164 | YES 165 | 166 | 167 | 168 | 169 | YES 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 15 177 | 178 | 179 | 180 | YES 181 | 182 | UIWindow 183 | UIView 184 | 185 | IBUserSource 186 | 187 | 188 | 189 | 190 | DemoAppDelegate 191 | NSObject 192 | 193 | YES 194 | 195 | YES 196 | viewController 197 | window 198 | 199 | 200 | YES 201 | DemoViewController 202 | UIWindow 203 | 204 | 205 | 206 | YES 207 | 208 | YES 209 | viewController 210 | window 211 | 212 | 213 | YES 214 | 215 | viewController 216 | DemoViewController 217 | 218 | 219 | window 220 | UIWindow 221 | 222 | 223 | 224 | 225 | IBProjectSource 226 | Classes/DemoAppDelegate.h 227 | 228 | 229 | 230 | DemoAppDelegate 231 | NSObject 232 | 233 | IBUserSource 234 | 235 | 236 | 237 | 238 | DemoViewController 239 | UIViewController 240 | 241 | IBProjectSource 242 | Classes/DemoViewController.h 243 | 244 | 245 | 246 | 247 | YES 248 | 249 | NSObject 250 | 251 | IBFrameworkSource 252 | Foundation.framework/Headers/NSError.h 253 | 254 | 255 | 256 | NSObject 257 | 258 | IBFrameworkSource 259 | Foundation.framework/Headers/NSFileManager.h 260 | 261 | 262 | 263 | NSObject 264 | 265 | IBFrameworkSource 266 | Foundation.framework/Headers/NSKeyValueCoding.h 267 | 268 | 269 | 270 | NSObject 271 | 272 | IBFrameworkSource 273 | Foundation.framework/Headers/NSKeyValueObserving.h 274 | 275 | 276 | 277 | NSObject 278 | 279 | IBFrameworkSource 280 | Foundation.framework/Headers/NSKeyedArchiver.h 281 | 282 | 283 | 284 | NSObject 285 | 286 | IBFrameworkSource 287 | Foundation.framework/Headers/NSObject.h 288 | 289 | 290 | 291 | NSObject 292 | 293 | IBFrameworkSource 294 | Foundation.framework/Headers/NSRunLoop.h 295 | 296 | 297 | 298 | NSObject 299 | 300 | IBFrameworkSource 301 | Foundation.framework/Headers/NSThread.h 302 | 303 | 304 | 305 | NSObject 306 | 307 | IBFrameworkSource 308 | Foundation.framework/Headers/NSURL.h 309 | 310 | 311 | 312 | NSObject 313 | 314 | IBFrameworkSource 315 | Foundation.framework/Headers/NSURLConnection.h 316 | 317 | 318 | 319 | NSObject 320 | 321 | IBFrameworkSource 322 | UIKit.framework/Headers/UIAccessibility.h 323 | 324 | 325 | 326 | NSObject 327 | 328 | IBFrameworkSource 329 | UIKit.framework/Headers/UINibLoading.h 330 | 331 | 332 | 333 | NSObject 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UIResponder.h 337 | 338 | 339 | 340 | UIApplication 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIApplication.h 345 | 346 | 347 | 348 | UIResponder 349 | NSObject 350 | 351 | 352 | 353 | UISearchBar 354 | UIView 355 | 356 | IBFrameworkSource 357 | UIKit.framework/Headers/UISearchBar.h 358 | 359 | 360 | 361 | UISearchDisplayController 362 | NSObject 363 | 364 | IBFrameworkSource 365 | UIKit.framework/Headers/UISearchDisplayController.h 366 | 367 | 368 | 369 | UIView 370 | 371 | IBFrameworkSource 372 | UIKit.framework/Headers/UITextField.h 373 | 374 | 375 | 376 | UIView 377 | UIResponder 378 | 379 | IBFrameworkSource 380 | UIKit.framework/Headers/UIView.h 381 | 382 | 383 | 384 | UIViewController 385 | 386 | IBFrameworkSource 387 | UIKit.framework/Headers/UINavigationController.h 388 | 389 | 390 | 391 | UIViewController 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIPopoverController.h 395 | 396 | 397 | 398 | UIViewController 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UISplitViewController.h 402 | 403 | 404 | 405 | UIViewController 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UITabBarController.h 409 | 410 | 411 | 412 | UIViewController 413 | UIResponder 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIViewController.h 417 | 418 | 419 | 420 | UIWindow 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIWindow.h 425 | 426 | 427 | 428 | 429 | 0 430 | IBCocoaTouchFramework 431 | 432 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 433 | 434 | 435 | 436 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 437 | 438 | 439 | YES 440 | Demo.xcodeproj 441 | 3 442 | 112 443 | 444 | 445 | -------------------------------------------------------------------------------- /Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Demo 4 | // 5 | // Created by Alex Leutgöb on 17.01.11. 6 | // Copyright 2011 alexleutgoeb.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /ImageRes/check@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/check@2x.png -------------------------------------------------------------------------------- /ImageRes/check_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/check_selected@2x.png -------------------------------------------------------------------------------- /ImageRes/frame_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/frame_left@2x.png -------------------------------------------------------------------------------- /ImageRes/frame_middle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/frame_middle@2x.png -------------------------------------------------------------------------------- /ImageRes/frame_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/frame_right@2x.png -------------------------------------------------------------------------------- /ImageRes/wheel_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/wheel_bg@2x.png -------------------------------------------------------------------------------- /ImageRes/wheel_shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/ImageRes/wheel_shadow@2x.png -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Alex Leutgöb 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | # ALPickerView 2 | 3 | `ALPickerView` is an attempt to mime the multiple selection behavior of Cocoa Touch's `UIPickerView` (as seen in Mobile Safari). 4 | 5 | ![ALPickerView Screenshot](https://github.com/alexleutgoeb/ALPickerView/raw/master/screenshot.png "ALPickerView Screenshot") 6 | 7 | ~~Requires iOS SDK 4.0 or higher~~ *Update*: `ALPickerView` should now be compatible from iOS3 to latest 8 | 9 | ## How to use 10 | 11 | * Copy class files from Classes folder to your project 12 | * Copy image files from ImageRes folder to your project 13 | * Import `ALPickerView.h` and implement `ALPickerViewDelegate` protocol 14 | * See Demo project for details 15 | 16 | 17 | ## Known limitations 18 | 19 | * `ALPickerView` doesn't play the keyboard input sound on selection changes; though I don't consider this as a problem ;) 20 | * The size is constrained to 320x216 atm (like `UIPickerView`) -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexleutgoeb/ALPickerView/f322bcca57091fb0750c951f1ae32737d64f1c5f/screenshot.png --------------------------------------------------------------------------------