├── .gitignore
├── AWIconSheet
├── en.lproj
│ ├── InfoPlist.strings
│ ├── ViewController_iPad.xib
│ └── ViewController_iPhone.xib
├── Default.png
├── Default@2x.png
├── Default-568h@2x.png
├── ViewController.h
├── AWIconSheet-Prefix.pch
├── main.m
├── AppDelegate.h
├── AWActionSheet.h
├── AWIconSheet-Info.plist
├── ViewController.m
├── AppDelegate.m
└── AWActionSheet.m
├── AWIconSheetTests
├── en.lproj
│ └── InfoPlist.strings
├── AWIconSheetTests.h
├── AWIconSheetTests.m
└── AWIconSheetTests-Info.plist
├── AWIconSheet.xcodeproj
├── xcuserdata
│ └── Narcissus.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── AWIconSheet.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── Narcissus.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | Build
2 | xcuserdata
--------------------------------------------------------------------------------
/AWIconSheet/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/AWIconSheetTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/AWIconSheet/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appwilldev/AWIconSheet/HEAD/AWIconSheet/Default.png
--------------------------------------------------------------------------------
/AWIconSheet/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appwilldev/AWIconSheet/HEAD/AWIconSheet/Default@2x.png
--------------------------------------------------------------------------------
/AWIconSheet/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appwilldev/AWIconSheet/HEAD/AWIconSheet/Default-568h@2x.png
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/xcuserdata/Narcissus.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/project.xcworkspace/xcuserdata/Narcissus.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/appwilldev/AWIconSheet/HEAD/AWIconSheet.xcodeproj/project.xcworkspace/xcuserdata/Narcissus.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AWIconSheet/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AWIconSheetTests/AWIconSheetTests.h:
--------------------------------------------------------------------------------
1 | //
2 | // AWIconSheetTests.h
3 | // AWIconSheetTests
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AWIconSheetTests : SenTestCase
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AWIconSheet/AWIconSheet-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'AWIconSheet' target in the 'AWIconSheet' 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 |
--------------------------------------------------------------------------------
/AWIconSheet/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. 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 |
--------------------------------------------------------------------------------
/AWIconSheet/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. 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 |
--------------------------------------------------------------------------------
/AWIconSheetTests/AWIconSheetTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // AWIconSheetTests.m
3 | // AWIconSheetTests
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import "AWIconSheetTests.h"
10 |
11 | @implementation AWIconSheetTests
12 |
13 | - (void)setUp
14 | {
15 | [super setUp];
16 |
17 | // Set-up code here.
18 | }
19 |
20 | - (void)tearDown
21 | {
22 | // Tear-down code here.
23 |
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample
28 | {
29 | STFail(@"Unit tests are not implemented yet in AWIconSheetTests");
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/xcuserdata/Narcissus.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AWIconSheet.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DA215FCA163A29CA00A3E18B
16 |
17 | primary
18 |
19 |
20 | DA215FF4163A29CA00A3E18B
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AWIconSheetTests/AWIconSheetTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | NONE.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AWIconSheet/AWActionSheet.h:
--------------------------------------------------------------------------------
1 | //
2 | // AWActionSheet.h
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import
10 | @class AWActionSheetCell;
11 |
12 | @protocol AWActionSheetDelegate
13 |
14 | - (int)numberOfItemsInActionSheet;
15 | - (AWActionSheetCell*)cellForActionAtIndex:(NSInteger)index;
16 | - (void)DidTapOnItemAtIndex:(NSInteger)index title:(NSString*)name;
17 |
18 | @end
19 |
20 | @interface AWActionSheet : UIWindow
21 | -(id)initWithIconSheetDelegate:(id)delegate ItemCount:(int)cout;
22 |
23 | - (void)show;
24 | @end
25 |
26 |
27 | @interface AWActionSheetCell : UIView
28 | @property (nonatomic,retain)UIImageView* iconView;
29 | @property (nonatomic,retain)UILabel* titleLabel;
30 | @property (nonatomic,assign)int index;
31 | @end
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | AWIconSheet
2 | ===========
3 |
4 | iOS 6 share style actionsheet
5 |
6 | 
7 |
8 | License
9 | This code is distributed under the terms and conditions of the MIT license.
10 |
11 | Copyright (c) 2009-2012 Appwill
12 |
13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 |
19 |
--------------------------------------------------------------------------------
/AWIconSheet/AWIconSheet-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | NONE.${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 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/AWIconSheet/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "AWActionSheet.h"
11 | @interface ViewController ()
12 |
13 | @property (nonatomic, retain)UILabel* TapToShowActionsheet;
14 | @end
15 |
16 | @implementation ViewController
17 | @synthesize TapToShowActionsheet;
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 |
23 | self.view.backgroundColor = [UIColor underPageBackgroundColor];
24 |
25 | self.TapToShowActionsheet =[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];
26 | [TapToShowActionsheet setBackgroundColor:[UIColor clearColor]];
27 | [TapToShowActionsheet setFont:[UIFont boldSystemFontOfSize:18]];
28 | [TapToShowActionsheet setTextColor:[UIColor darkGrayColor]];
29 | [TapToShowActionsheet setShadowColor:[UIColor blackColor]];
30 | [TapToShowActionsheet setShadowOffset:CGSizeMake(0, 0.5)];
31 | [TapToShowActionsheet setTextAlignment:NSTextAlignmentCenter];
32 | [TapToShowActionsheet setText:@"Tap To Show IconSheet"];
33 | [self.view addSubview:TapToShowActionsheet];
34 |
35 |
36 |
37 |
38 | UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showAWSheet)];
39 | [self.view addGestureRecognizer:tap];
40 | }
41 |
42 | - (void)showAWSheet
43 | {
44 | AWActionSheet *sheet = [[AWActionSheet alloc] initWithIconSheetDelegate:self ItemCount:[self numberOfItemsInActionSheet]];
45 | [sheet show];
46 | }
47 |
48 | - (void)didReceiveMemoryWarning
49 | {
50 | [super didReceiveMemoryWarning];
51 | // Dispose of any resources that can be recreated.
52 | }
53 |
54 |
55 | -(int)numberOfItemsInActionSheet
56 | {
57 | return 14;
58 | }
59 |
60 | -(AWActionSheetCell *)cellForActionAtIndex:(NSInteger)index
61 | {
62 | AWActionSheetCell* cell = [[AWActionSheetCell alloc] init];
63 |
64 | [[cell iconView] setBackgroundColor:
65 | [UIColor colorWithRed:rand()%255/255.0f
66 | green:rand()%255/255.0f
67 | blue:rand()%255/255.0f
68 | alpha:1]];
69 | [[cell titleLabel] setText:[NSString stringWithFormat:@"item %d",(int)index]];
70 | cell.index = (int)index;
71 | return cell;
72 | }
73 |
74 | -(void)DidTapOnItemAtIndex:(NSInteger)index
75 | {
76 | NSLog(@"tap on %d",(int)index);
77 | [TapToShowActionsheet setText:[NSString stringWithFormat:@"Selected Item %d",(int)index]];
78 | }
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/AWIconSheet/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | #import "ViewController.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18 | // Override point for customization after application launch.
19 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
20 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
21 | } else {
22 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
23 | }
24 | self.window.rootViewController = self.viewController;
25 | [self.window makeKeyAndVisible];
26 | return YES;
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application
30 | {
31 | // 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.
32 | // 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.
33 | }
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application
36 | {
37 | // 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.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application
42 | {
43 | // 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.
44 | }
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application
47 | {
48 | // 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.
49 | }
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application
52 | {
53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/xcuserdata/Narcissus.xcuserdatad/xcschemes/AWIconSheet.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/AWIconSheet/en.lproj/ViewController_iPad.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1536
5 | 12A206j
6 | 2519
7 | 1172.1
8 | 613.00
9 |
13 |
14 | IBProxyObject
15 | IBUIView
16 |
17 |
18 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
19 |
20 |
24 |
25 |
29 |
33 |
51 |
52 |
53 |
54 |
55 |
56 | view
57 |
58 |
59 |
60 | 3
61 |
62 |
63 |
64 |
65 |
66 | 0
67 |
68 |
69 |
70 |
71 |
72 | -1
73 |
74 |
75 | File's Owner
76 |
77 |
78 | -2
79 |
80 |
81 |
82 |
83 | 2
84 |
85 |
86 |
87 |
88 |
89 |
90 | ViewController
91 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
92 | UIResponder
93 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
94 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
95 |
96 |
97 |
98 |
99 |
100 | 3
101 |
102 |
103 |
104 |
105 | ViewController
106 | UIViewController
107 |
108 | IBProjectSource
109 | ./Classes/ViewController.h
110 |
111 |
112 |
113 |
114 | 0
115 | IBIPadFramework
116 | YES
117 | 3
118 | YES
119 | 1856
120 |
121 |
122 |
--------------------------------------------------------------------------------
/AWIconSheet/en.lproj/ViewController_iPhone.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1536
5 | 12A269
6 | 2835
7 | 1187
8 | 624.00
9 |
10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
11 | 1919
12 |
13 |
14 | IBProxyObject
15 | IBUIView
16 |
17 |
18 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
19 |
20 |
21 | PluginDependencyRecalculationVersion
22 |
23 |
24 |
25 |
26 | IBFilesOwner
27 | IBCocoaTouchFramework
28 |
29 |
30 | IBFirstResponder
31 | IBCocoaTouchFramework
32 |
33 |
34 |
35 | 274
36 | {{0, 20}, {320, 548}}
37 |
38 |
39 |
40 |
41 | 3
42 | MC43NQA
43 |
44 | 2
45 |
46 |
47 | NO
48 |
49 |
50 | IBUIScreenMetrics
51 |
52 | YES
53 |
54 |
55 |
56 |
57 |
58 | {320, 568}
59 | {568, 320}
60 |
61 |
62 | IBCocoaTouchFramework
63 | Retina 4 Full Screen
64 | 2
65 |
66 | IBCocoaTouchFramework
67 |
68 |
69 |
70 |
71 |
72 |
73 | view
74 |
75 |
76 |
77 | 7
78 |
79 |
80 |
81 |
82 |
83 | 0
84 |
85 |
86 |
87 |
88 |
89 | -1
90 |
91 |
92 | File's Owner
93 |
94 |
95 | -2
96 |
97 |
98 |
99 |
100 | 6
101 |
102 |
103 |
104 |
105 |
106 |
107 | ViewController
108 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
109 | UIResponder
110 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
111 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
112 |
113 |
114 |
115 |
116 |
117 | 7
118 |
119 |
120 |
121 |
122 | ViewController
123 | UIViewController
124 |
125 | IBProjectSource
126 | ./Classes/ViewController.h
127 |
128 |
129 |
130 |
131 | 0
132 | IBCocoaTouchFramework
133 | YES
134 | 3
135 | YES
136 | 1919
137 |
138 |
139 |
--------------------------------------------------------------------------------
/AWIconSheet/AWActionSheet.m:
--------------------------------------------------------------------------------
1 | //
2 | // AWActionSheet.m
3 | // AWIconSheet
4 | //
5 | // Created by Narcissus on 10/26/12.
6 | // Copyright (c) 2012 Narcissus. All rights reserved.
7 | //
8 |
9 | #import "AWActionSheet.h"
10 | #import
11 |
12 | @interface AWActionSheet()
13 | @property (nonatomic, retain)UIScrollView* scrollView;
14 | @property (nonatomic, retain)UIPageControl* pageControl;
15 | @property (nonatomic, retain)NSMutableArray* items;
16 | @property (nonatomic, assign)id IconDelegate;
17 | @property (nonatomic, assign) NSInteger itemCountforOneLine;
18 |
19 | @property (nonatomic, strong) UIView *backgroundMask;
20 | @property (nonatomic, strong) UIView *contentView;
21 | @end
22 | @implementation AWActionSheet
23 | @synthesize scrollView;
24 | @synthesize pageControl;
25 | @synthesize items;
26 | @synthesize IconDelegate;
27 | -(void)dealloc
28 | {
29 | IconDelegate= nil;
30 | }
31 |
32 |
33 | -(id)initWithIconSheetDelegate:(id)delegate ItemCount:(int)count
34 | {
35 | self = [self initWithFrame:[UIScreen mainScreen].bounds];
36 |
37 | if (self) {
38 | self.backgroundColor = [UIColor clearColor];
39 | self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
40 |
41 | self.backgroundMask = [[UIView alloc] initWithFrame:self.bounds];
42 | self.backgroundMask.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
43 | self.backgroundMask.backgroundColor = [UIColor blackColor];
44 | self.backgroundMask.alpha = 0;
45 | [self addSubview:self.backgroundMask];
46 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)];
47 | [self.backgroundMask addGestureRecognizer:tap];
48 |
49 | self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.bounds), CGRectGetWidth(self.bounds), CGRectGetHeight(self.bounds))];
50 | self.contentView.backgroundColor = [UIColor clearColor];
51 | self.contentView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
52 | [self addSubview:self.contentView];
53 | self.itemCountforOneLine = 4;
54 |
55 | IconDelegate = delegate;
56 | self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 10, CGRectGetWidth(self.contentView.bounds), 105*3)];
57 | [scrollView setPagingEnabled:YES];
58 | [scrollView setBackgroundColor:[UIColor clearColor]];
59 | [scrollView setShowsHorizontalScrollIndicator:NO];
60 | [scrollView setShowsVerticalScrollIndicator:NO];
61 | [scrollView setDelegate:self];
62 | [scrollView setScrollEnabled:YES];
63 | [scrollView setBounces:NO];
64 |
65 | [self.contentView addSubview:scrollView];
66 |
67 | self.pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.scrollView.frame), CGRectGetWidth(self.contentView.bounds), 20)];
68 | [pageControl setNumberOfPages:0];
69 | [pageControl setCurrentPage:0];
70 | pageControl.hidesForSinglePage = YES;
71 | [pageControl addTarget:self action:@selector(changePage:)forControlEvents:UIControlEventValueChanged];
72 | [self.contentView addSubview:pageControl];
73 |
74 | self.items = [[NSMutableArray alloc] initWithCapacity:count];
75 | self.windowLevel = UIWindowLevelAlert;
76 | }
77 |
78 | return self;
79 | }
80 |
81 | static AWActionSheet *sheet = nil;
82 |
83 | - (void)dismiss
84 | {
85 | [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
86 | self.backgroundMask.alpha = 0;
87 | [self setContentViewFrameY:CGRectGetHeight(self.bounds)];
88 | } completion:^(BOOL finished) {
89 | sheet.hidden = YES;
90 | sheet = nil;
91 | }];
92 | }
93 |
94 | - (void)setContentViewFrameY:(CGFloat)y
95 | {
96 | CGRect frame = self.contentView.frame;
97 | frame.origin.y = y;
98 | self.contentView.frame = frame;
99 | }
100 |
101 | - (void)show
102 | {
103 | [self reloadData];
104 |
105 | sheet = self;
106 | sheet.hidden = NO;
107 | [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
108 | self.backgroundMask.alpha = 0.6;
109 | [self setContentViewFrameY:CGRectGetHeight(self.bounds) - CGRectGetHeight(self.contentView.frame)];
110 | } completion:^(BOOL finished) {
111 |
112 | }];
113 | }
114 |
115 | - (void)reloadData
116 | {
117 | for (AWActionSheetCell* cell in items) {
118 | [cell removeFromSuperview];
119 | [items removeObject:cell];
120 | }
121 |
122 | int count = [IconDelegate numberOfItemsInActionSheet];
123 |
124 | if (count <= 0) {
125 | return;
126 | }
127 |
128 | int rowCount = 3;
129 |
130 | if (count <= self.itemCountforOneLine) {
131 | [scrollView setFrame:CGRectMake(0, 10, CGRectGetWidth(self.contentView.bounds), 105)];
132 | rowCount = 1;
133 | } else if (count <= self.itemCountforOneLine*2) {
134 | [scrollView setFrame:CGRectMake(0, 10, CGRectGetWidth(self.contentView.bounds), 210)];
135 | rowCount = 2;
136 | }
137 |
138 | CGFloat pageControlY = CGRectGetMinY(self.scrollView.frame) + CGRectGetHeight(self.scrollView.frame);
139 | CGRect pageControlFrame = self.pageControl.frame;
140 | pageControlFrame.origin.y = pageControlY;
141 | self.pageControl.frame = pageControlFrame;
142 |
143 | NSUInteger itemPerPage = self.itemCountforOneLine*rowCount;
144 | [scrollView setContentSize:CGSizeMake(CGRectGetWidth(self.contentView.bounds)*ceilf((((float)count)/itemPerPage)), scrollView.frame.size.height)];
145 | [pageControl setNumberOfPages:ceilf((((float)count)/itemPerPage))];
146 | [pageControl setCurrentPage:0];
147 |
148 | CGFloat margin = 8;
149 | CGFloat width = self.scrollView.frame.size.width - margin*2;
150 |
151 | for (int i = 0; i< count; i++) {
152 | AWActionSheetCell* cell = [IconDelegate cellForActionAtIndex:i];
153 | int PageNo = i/itemPerPage;
154 | int index = i%itemPerPage;
155 |
156 | int row = index/self.itemCountforOneLine;
157 | int column = index%self.itemCountforOneLine;
158 |
159 | float centerY = (1+row*2)*self.scrollView.frame.size.height/(2*rowCount);
160 | float centerX = (1+column*2)*width/(2*self.itemCountforOneLine);
161 |
162 | [cell setCenter:CGPointMake(margin + centerX+CGRectGetWidth(self.contentView.bounds)*PageNo, centerY)];
163 | [self.scrollView addSubview:cell];
164 |
165 | UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(actionForItem:)];
166 | [cell addGestureRecognizer:tap];
167 |
168 | [items addObject:cell];
169 | }
170 |
171 | UIView *scrollBG = [[UIView alloc] initWithFrame:CGRectMake(margin, 8, CGRectGetWidth(self.scrollView.frame) - margin * 2, CGRectGetHeight(self.scrollView.frame))];
172 | scrollBG.backgroundColor = [UIColor whiteColor];
173 | scrollBG.alpha = 0.9;
174 | scrollBG.clipsToBounds = YES;
175 | scrollBG.layer.cornerRadius = 5;
176 | [self.contentView insertSubview:scrollBG belowSubview:self.scrollView];
177 |
178 | CGFloat y = CGRectGetMinY(self.pageControl.frame) + 5 + (self.pageControl.numberOfPages == 1 ? 0 : CGRectGetHeight(self.pageControl.frame));
179 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
180 | btn.frame = CGRectMake(margin, y, CGRectGetWidth(self.contentView.frame) - margin * 2, 44);
181 | [btn setTitle:@"取消" forState:UIControlStateNormal];
182 | [btn setTitleColor:[UIColor colorWithRed:0.22 green:0.45 blue:1 alpha:1] forState:UIControlStateNormal];
183 | [self setBtn:btn backgroundColor:[UIColor colorWithWhite:1 alpha:0.9]];
184 | btn.layer.cornerRadius = 5;
185 | btn.clipsToBounds = YES;
186 | [btn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
187 | [self.contentView addSubview:btn];
188 |
189 | CGFloat height = CGRectGetMinY(btn.frame) + CGRectGetHeight(btn.frame) + 10;
190 |
191 | CGRect frame = self.contentView.frame;
192 | frame.size.height = height;
193 | self.contentView.frame = frame;
194 | }
195 |
196 | - (void)setBtn:(UIButton*)btn backgroundColor:(UIColor*)color
197 | {
198 | [btn setBackgroundImage:[self singleColor:color size:CGSizeMake(5, 5)] forState:UIControlStateNormal];
199 | }
200 |
201 | - (UIImage*)singleColor:(UIColor*)color size:(CGSize)size
202 | {
203 | CGRect rect = CGRectMake(0, 0, size.width, size.height);
204 | UIGraphicsBeginImageContext(size);
205 | CGContextRef context = UIGraphicsGetCurrentContext();
206 | CGContextSetFillColorWithColor(context, color.CGColor);
207 | CGContextFillRect(context, rect);
208 | UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
209 | UIGraphicsEndImageContext();
210 |
211 | return img;
212 | }
213 |
214 | - (void)actionForItem:(UITapGestureRecognizer*)recongizer
215 | {
216 | AWActionSheetCell* cell = (AWActionSheetCell*)[recongizer view];
217 |
218 | [self dismiss];
219 | [IconDelegate DidTapOnItemAtIndex:cell.index title:cell.titleLabel.text];
220 | }
221 |
222 | - (IBAction)changePage:(id)sender {
223 | int page = (int)pageControl.currentPage;
224 | [scrollView setContentOffset:CGPointMake(CGRectGetWidth(self.contentView.bounds) * page, 0)];
225 | }
226 | #pragma mark -
227 | #pragma scrollview delegate
228 |
229 | - (void)scrollViewDidScroll:(UIScrollView *)sender {
230 | int page = scrollView.contentOffset.x /CGRectGetWidth(self.contentView.bounds);
231 | pageControl.currentPage = page;
232 | }
233 |
234 | @end
235 |
236 | #pragma mark - AWActionSheetCell
237 | @interface AWActionSheetCell ()
238 | @end
239 | @implementation AWActionSheetCell
240 | @synthesize iconView;
241 | @synthesize titleLabel;
242 |
243 | -(id)init
244 | {
245 | self = [super initWithFrame:CGRectMake(0, 0, 70, 70)];
246 | if (self) {
247 | self.backgroundColor = [UIColor clearColor];
248 |
249 | self.iconView = [[UIImageView alloc] initWithFrame:CGRectMake(6.5, 0, 57, 57)];
250 | [iconView setBackgroundColor:[UIColor clearColor]];
251 | [[iconView layer] setCornerRadius:10.5f];
252 | [[iconView layer] setMasksToBounds:YES];
253 |
254 | [self addSubview:iconView];
255 |
256 | self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 63, 70, 13)];
257 | [titleLabel setBackgroundColor:[UIColor clearColor]];
258 | [titleLabel setTextAlignment:NSTextAlignmentCenter];
259 | [titleLabel setFont:[UIFont boldSystemFontOfSize:13]];
260 | [titleLabel setTextColor:[UIColor whiteColor]];
261 | [titleLabel setShadowColor:[UIColor blackColor]];
262 | [titleLabel setShadowOffset:CGSizeMake(0, 0.5)];
263 | [titleLabel setAdjustsFontSizeToFitWidth:YES];
264 | [titleLabel setText:@""];
265 | [self addSubview:titleLabel];
266 |
267 | if ([self isVersionSupport:@"7.0"]) {
268 | titleLabel.textColor = [UIColor colorWithRed:94.0/255.0 green:94.0/255.0 blue:94.0/255.0 alpha:1];
269 | titleLabel.shadowColor = [UIColor clearColor];
270 | titleLabel.shadowOffset = CGSizeZero;
271 | }
272 | }
273 | return self;
274 | }
275 |
276 | - (BOOL)isVersionSupport:(NSString *)reqSysVer {
277 | NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
278 | BOOL osVersionSupported = ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending);
279 | return osVersionSupported;
280 | }
281 |
282 | @end
283 |
284 |
285 |
--------------------------------------------------------------------------------
/AWIconSheet.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DA215FD0163A29CA00A3E18B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FCF163A29CA00A3E18B /* UIKit.framework */; };
11 | DA215FD2163A29CA00A3E18B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FD1163A29CA00A3E18B /* Foundation.framework */; };
12 | DA215FD4163A29CA00A3E18B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FD3163A29CA00A3E18B /* CoreGraphics.framework */; };
13 | DA215FDA163A29CA00A3E18B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA215FD8163A29CA00A3E18B /* InfoPlist.strings */; };
14 | DA215FDC163A29CA00A3E18B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DA215FDB163A29CA00A3E18B /* main.m */; };
15 | DA215FE0163A29CA00A3E18B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA215FDF163A29CA00A3E18B /* AppDelegate.m */; };
16 | DA215FE2163A29CA00A3E18B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = DA215FE1163A29CA00A3E18B /* Default.png */; };
17 | DA215FE4163A29CA00A3E18B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA215FE3163A29CA00A3E18B /* Default@2x.png */; };
18 | DA215FE6163A29CA00A3E18B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA215FE5163A29CA00A3E18B /* Default-568h@2x.png */; };
19 | DA215FE9163A29CA00A3E18B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA215FE8163A29CA00A3E18B /* ViewController.m */; };
20 | DA215FEC163A29CA00A3E18B /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA215FEA163A29CA00A3E18B /* ViewController_iPhone.xib */; };
21 | DA215FEF163A29CA00A3E18B /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA215FED163A29CA00A3E18B /* ViewController_iPad.xib */; };
22 | DA215FF7163A29CA00A3E18B /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FF6163A29CA00A3E18B /* SenTestingKit.framework */; };
23 | DA215FF8163A29CA00A3E18B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FCF163A29CA00A3E18B /* UIKit.framework */; };
24 | DA215FF9163A29CA00A3E18B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA215FD1163A29CA00A3E18B /* Foundation.framework */; };
25 | DA216001163A29CA00A3E18B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA215FFF163A29CA00A3E18B /* InfoPlist.strings */; };
26 | DA216004163A29CA00A3E18B /* AWIconSheetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA216003163A29CA00A3E18B /* AWIconSheetTests.m */; };
27 | DA21600F163A2A0700A3E18B /* AWActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = DA21600E163A2A0700A3E18B /* AWActionSheet.m */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXContainerItemProxy section */
31 | DA215FFA163A29CA00A3E18B /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = DA215FC2163A29C900A3E18B /* Project object */;
34 | proxyType = 1;
35 | remoteGlobalIDString = DA215FCA163A29CA00A3E18B;
36 | remoteInfo = AWIconSheet;
37 | };
38 | /* End PBXContainerItemProxy section */
39 |
40 | /* Begin PBXFileReference section */
41 | DA215FCB163A29CA00A3E18B /* AWIconSheet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AWIconSheet.app; sourceTree = BUILT_PRODUCTS_DIR; };
42 | DA215FCF163A29CA00A3E18B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
43 | DA215FD1163A29CA00A3E18B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
44 | DA215FD3163A29CA00A3E18B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
45 | DA215FD7163A29CA00A3E18B /* AWIconSheet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AWIconSheet-Info.plist"; sourceTree = ""; };
46 | DA215FD9163A29CA00A3E18B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
47 | DA215FDB163A29CA00A3E18B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
48 | DA215FDD163A29CA00A3E18B /* AWIconSheet-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AWIconSheet-Prefix.pch"; sourceTree = ""; };
49 | DA215FDE163A29CA00A3E18B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
50 | DA215FDF163A29CA00A3E18B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
51 | DA215FE1163A29CA00A3E18B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; };
52 | DA215FE3163A29CA00A3E18B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; };
53 | DA215FE5163A29CA00A3E18B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
54 | DA215FE7163A29CA00A3E18B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
55 | DA215FE8163A29CA00A3E18B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
56 | DA215FEB163A29CA00A3E18B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = ""; };
57 | DA215FEE163A29CA00A3E18B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = ""; };
58 | DA215FF5163A29CA00A3E18B /* AWIconSheetTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AWIconSheetTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
59 | DA215FF6163A29CA00A3E18B /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
60 | DA215FFE163A29CA00A3E18B /* AWIconSheetTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AWIconSheetTests-Info.plist"; sourceTree = ""; };
61 | DA216000163A29CA00A3E18B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
62 | DA216002163A29CA00A3E18B /* AWIconSheetTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AWIconSheetTests.h; sourceTree = ""; };
63 | DA216003163A29CA00A3E18B /* AWIconSheetTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AWIconSheetTests.m; sourceTree = ""; };
64 | DA21600D163A2A0700A3E18B /* AWActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AWActionSheet.h; sourceTree = ""; };
65 | DA21600E163A2A0700A3E18B /* AWActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AWActionSheet.m; sourceTree = ""; };
66 | /* End PBXFileReference section */
67 |
68 | /* Begin PBXFrameworksBuildPhase section */
69 | DA215FC8163A29CA00A3E18B /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | DA215FD0163A29CA00A3E18B /* UIKit.framework in Frameworks */,
74 | DA215FD2163A29CA00A3E18B /* Foundation.framework in Frameworks */,
75 | DA215FD4163A29CA00A3E18B /* CoreGraphics.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | DA215FF1163A29CA00A3E18B /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | DA215FF7163A29CA00A3E18B /* SenTestingKit.framework in Frameworks */,
84 | DA215FF8163A29CA00A3E18B /* UIKit.framework in Frameworks */,
85 | DA215FF9163A29CA00A3E18B /* Foundation.framework in Frameworks */,
86 | );
87 | runOnlyForDeploymentPostprocessing = 0;
88 | };
89 | /* End PBXFrameworksBuildPhase section */
90 |
91 | /* Begin PBXGroup section */
92 | DA215FC0163A29C900A3E18B = {
93 | isa = PBXGroup;
94 | children = (
95 | DA216010163A2A1500A3E18B /* AWActionSheet */,
96 | DA215FD5163A29CA00A3E18B /* AWIconSheet */,
97 | DA215FFC163A29CA00A3E18B /* AWIconSheetTests */,
98 | DA215FCE163A29CA00A3E18B /* Frameworks */,
99 | DA215FCC163A29CA00A3E18B /* Products */,
100 | );
101 | sourceTree = "";
102 | };
103 | DA215FCC163A29CA00A3E18B /* Products */ = {
104 | isa = PBXGroup;
105 | children = (
106 | DA215FCB163A29CA00A3E18B /* AWIconSheet.app */,
107 | DA215FF5163A29CA00A3E18B /* AWIconSheetTests.octest */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | DA215FCE163A29CA00A3E18B /* Frameworks */ = {
113 | isa = PBXGroup;
114 | children = (
115 | DA215FCF163A29CA00A3E18B /* UIKit.framework */,
116 | DA215FD1163A29CA00A3E18B /* Foundation.framework */,
117 | DA215FD3163A29CA00A3E18B /* CoreGraphics.framework */,
118 | DA215FF6163A29CA00A3E18B /* SenTestingKit.framework */,
119 | );
120 | name = Frameworks;
121 | sourceTree = "";
122 | };
123 | DA215FD5163A29CA00A3E18B /* AWIconSheet */ = {
124 | isa = PBXGroup;
125 | children = (
126 | DA215FDE163A29CA00A3E18B /* AppDelegate.h */,
127 | DA215FDF163A29CA00A3E18B /* AppDelegate.m */,
128 | DA215FE7163A29CA00A3E18B /* ViewController.h */,
129 | DA215FE8163A29CA00A3E18B /* ViewController.m */,
130 | DA215FEA163A29CA00A3E18B /* ViewController_iPhone.xib */,
131 | DA215FED163A29CA00A3E18B /* ViewController_iPad.xib */,
132 | DA215FD6163A29CA00A3E18B /* Supporting Files */,
133 | );
134 | path = AWIconSheet;
135 | sourceTree = "";
136 | };
137 | DA215FD6163A29CA00A3E18B /* Supporting Files */ = {
138 | isa = PBXGroup;
139 | children = (
140 | DA215FD7163A29CA00A3E18B /* AWIconSheet-Info.plist */,
141 | DA215FD8163A29CA00A3E18B /* InfoPlist.strings */,
142 | DA215FDB163A29CA00A3E18B /* main.m */,
143 | DA215FDD163A29CA00A3E18B /* AWIconSheet-Prefix.pch */,
144 | DA215FE1163A29CA00A3E18B /* Default.png */,
145 | DA215FE3163A29CA00A3E18B /* Default@2x.png */,
146 | DA215FE5163A29CA00A3E18B /* Default-568h@2x.png */,
147 | );
148 | name = "Supporting Files";
149 | sourceTree = "";
150 | };
151 | DA215FFC163A29CA00A3E18B /* AWIconSheetTests */ = {
152 | isa = PBXGroup;
153 | children = (
154 | DA216002163A29CA00A3E18B /* AWIconSheetTests.h */,
155 | DA216003163A29CA00A3E18B /* AWIconSheetTests.m */,
156 | DA215FFD163A29CA00A3E18B /* Supporting Files */,
157 | );
158 | path = AWIconSheetTests;
159 | sourceTree = "";
160 | };
161 | DA215FFD163A29CA00A3E18B /* Supporting Files */ = {
162 | isa = PBXGroup;
163 | children = (
164 | DA215FFE163A29CA00A3E18B /* AWIconSheetTests-Info.plist */,
165 | DA215FFF163A29CA00A3E18B /* InfoPlist.strings */,
166 | );
167 | name = "Supporting Files";
168 | sourceTree = "";
169 | };
170 | DA216010163A2A1500A3E18B /* AWActionSheet */ = {
171 | isa = PBXGroup;
172 | children = (
173 | DA21600D163A2A0700A3E18B /* AWActionSheet.h */,
174 | DA21600E163A2A0700A3E18B /* AWActionSheet.m */,
175 | );
176 | name = AWActionSheet;
177 | path = AWIconSheet;
178 | sourceTree = "";
179 | };
180 | /* End PBXGroup section */
181 |
182 | /* Begin PBXNativeTarget section */
183 | DA215FCA163A29CA00A3E18B /* AWIconSheet */ = {
184 | isa = PBXNativeTarget;
185 | buildConfigurationList = DA216007163A29CA00A3E18B /* Build configuration list for PBXNativeTarget "AWIconSheet" */;
186 | buildPhases = (
187 | DA215FC7163A29CA00A3E18B /* Sources */,
188 | DA215FC8163A29CA00A3E18B /* Frameworks */,
189 | DA215FC9163A29CA00A3E18B /* Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | );
195 | name = AWIconSheet;
196 | productName = AWIconSheet;
197 | productReference = DA215FCB163A29CA00A3E18B /* AWIconSheet.app */;
198 | productType = "com.apple.product-type.application";
199 | };
200 | DA215FF4163A29CA00A3E18B /* AWIconSheetTests */ = {
201 | isa = PBXNativeTarget;
202 | buildConfigurationList = DA21600A163A29CA00A3E18B /* Build configuration list for PBXNativeTarget "AWIconSheetTests" */;
203 | buildPhases = (
204 | DA215FF0163A29CA00A3E18B /* Sources */,
205 | DA215FF1163A29CA00A3E18B /* Frameworks */,
206 | DA215FF2163A29CA00A3E18B /* Resources */,
207 | DA215FF3163A29CA00A3E18B /* ShellScript */,
208 | );
209 | buildRules = (
210 | );
211 | dependencies = (
212 | DA215FFB163A29CA00A3E18B /* PBXTargetDependency */,
213 | );
214 | name = AWIconSheetTests;
215 | productName = AWIconSheetTests;
216 | productReference = DA215FF5163A29CA00A3E18B /* AWIconSheetTests.octest */;
217 | productType = "com.apple.product-type.bundle.ocunit-test";
218 | };
219 | /* End PBXNativeTarget section */
220 |
221 | /* Begin PBXProject section */
222 | DA215FC2163A29C900A3E18B /* Project object */ = {
223 | isa = PBXProject;
224 | attributes = {
225 | LastUpgradeCheck = 0450;
226 | ORGANIZATIONNAME = Narcissus;
227 | };
228 | buildConfigurationList = DA215FC5163A29C900A3E18B /* Build configuration list for PBXProject "AWIconSheet" */;
229 | compatibilityVersion = "Xcode 3.2";
230 | developmentRegion = English;
231 | hasScannedForEncodings = 0;
232 | knownRegions = (
233 | en,
234 | );
235 | mainGroup = DA215FC0163A29C900A3E18B;
236 | productRefGroup = DA215FCC163A29CA00A3E18B /* Products */;
237 | projectDirPath = "";
238 | projectRoot = "";
239 | targets = (
240 | DA215FCA163A29CA00A3E18B /* AWIconSheet */,
241 | DA215FF4163A29CA00A3E18B /* AWIconSheetTests */,
242 | );
243 | };
244 | /* End PBXProject section */
245 |
246 | /* Begin PBXResourcesBuildPhase section */
247 | DA215FC9163A29CA00A3E18B /* Resources */ = {
248 | isa = PBXResourcesBuildPhase;
249 | buildActionMask = 2147483647;
250 | files = (
251 | DA215FDA163A29CA00A3E18B /* InfoPlist.strings in Resources */,
252 | DA215FE2163A29CA00A3E18B /* Default.png in Resources */,
253 | DA215FE4163A29CA00A3E18B /* Default@2x.png in Resources */,
254 | DA215FE6163A29CA00A3E18B /* Default-568h@2x.png in Resources */,
255 | DA215FEC163A29CA00A3E18B /* ViewController_iPhone.xib in Resources */,
256 | DA215FEF163A29CA00A3E18B /* ViewController_iPad.xib in Resources */,
257 | );
258 | runOnlyForDeploymentPostprocessing = 0;
259 | };
260 | DA215FF2163A29CA00A3E18B /* Resources */ = {
261 | isa = PBXResourcesBuildPhase;
262 | buildActionMask = 2147483647;
263 | files = (
264 | DA216001163A29CA00A3E18B /* InfoPlist.strings in Resources */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | /* End PBXResourcesBuildPhase section */
269 |
270 | /* Begin PBXShellScriptBuildPhase section */
271 | DA215FF3163A29CA00A3E18B /* ShellScript */ = {
272 | isa = PBXShellScriptBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | );
276 | inputPaths = (
277 | );
278 | outputPaths = (
279 | );
280 | runOnlyForDeploymentPostprocessing = 0;
281 | shellPath = /bin/sh;
282 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
283 | };
284 | /* End PBXShellScriptBuildPhase section */
285 |
286 | /* Begin PBXSourcesBuildPhase section */
287 | DA215FC7163A29CA00A3E18B /* Sources */ = {
288 | isa = PBXSourcesBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | DA215FDC163A29CA00A3E18B /* main.m in Sources */,
292 | DA215FE0163A29CA00A3E18B /* AppDelegate.m in Sources */,
293 | DA215FE9163A29CA00A3E18B /* ViewController.m in Sources */,
294 | DA21600F163A2A0700A3E18B /* AWActionSheet.m in Sources */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | DA215FF0163A29CA00A3E18B /* Sources */ = {
299 | isa = PBXSourcesBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | DA216004163A29CA00A3E18B /* AWIconSheetTests.m in Sources */,
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | };
306 | /* End PBXSourcesBuildPhase section */
307 |
308 | /* Begin PBXTargetDependency section */
309 | DA215FFB163A29CA00A3E18B /* PBXTargetDependency */ = {
310 | isa = PBXTargetDependency;
311 | target = DA215FCA163A29CA00A3E18B /* AWIconSheet */;
312 | targetProxy = DA215FFA163A29CA00A3E18B /* PBXContainerItemProxy */;
313 | };
314 | /* End PBXTargetDependency section */
315 |
316 | /* Begin PBXVariantGroup section */
317 | DA215FD8163A29CA00A3E18B /* InfoPlist.strings */ = {
318 | isa = PBXVariantGroup;
319 | children = (
320 | DA215FD9163A29CA00A3E18B /* en */,
321 | );
322 | name = InfoPlist.strings;
323 | sourceTree = "";
324 | };
325 | DA215FEA163A29CA00A3E18B /* ViewController_iPhone.xib */ = {
326 | isa = PBXVariantGroup;
327 | children = (
328 | DA215FEB163A29CA00A3E18B /* en */,
329 | );
330 | name = ViewController_iPhone.xib;
331 | sourceTree = "";
332 | };
333 | DA215FED163A29CA00A3E18B /* ViewController_iPad.xib */ = {
334 | isa = PBXVariantGroup;
335 | children = (
336 | DA215FEE163A29CA00A3E18B /* en */,
337 | );
338 | name = ViewController_iPad.xib;
339 | sourceTree = "";
340 | };
341 | DA215FFF163A29CA00A3E18B /* InfoPlist.strings */ = {
342 | isa = PBXVariantGroup;
343 | children = (
344 | DA216000163A29CA00A3E18B /* en */,
345 | );
346 | name = InfoPlist.strings;
347 | sourceTree = "";
348 | };
349 | /* End PBXVariantGroup section */
350 |
351 | /* Begin XCBuildConfiguration section */
352 | DA216005163A29CA00A3E18B /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | ALWAYS_SEARCH_USER_PATHS = NO;
356 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
357 | CLANG_CXX_LIBRARY = "libc++";
358 | CLANG_WARN_EMPTY_BODY = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | GCC_C_LANGUAGE_STANDARD = gnu99;
363 | GCC_DYNAMIC_NO_PIC = NO;
364 | GCC_OPTIMIZATION_LEVEL = 0;
365 | GCC_PREPROCESSOR_DEFINITIONS = (
366 | "DEBUG=1",
367 | "$(inherited)",
368 | );
369 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
370 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
371 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
372 | GCC_WARN_UNUSED_VARIABLE = YES;
373 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
374 | ONLY_ACTIVE_ARCH = YES;
375 | SDKROOT = iphoneos;
376 | TARGETED_DEVICE_FAMILY = "1,2";
377 | };
378 | name = Debug;
379 | };
380 | DA216006163A29CA00A3E18B /* Release */ = {
381 | isa = XCBuildConfiguration;
382 | buildSettings = {
383 | ALWAYS_SEARCH_USER_PATHS = NO;
384 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
385 | CLANG_CXX_LIBRARY = "libc++";
386 | CLANG_WARN_EMPTY_BODY = YES;
387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
389 | COPY_PHASE_STRIP = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu99;
391 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
392 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
393 | GCC_WARN_UNUSED_VARIABLE = YES;
394 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
395 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
396 | SDKROOT = iphoneos;
397 | TARGETED_DEVICE_FAMILY = "1,2";
398 | VALIDATE_PRODUCT = YES;
399 | };
400 | name = Release;
401 | };
402 | DA216008163A29CA00A3E18B /* Debug */ = {
403 | isa = XCBuildConfiguration;
404 | buildSettings = {
405 | CLANG_ENABLE_OBJC_ARC = YES;
406 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
407 | GCC_PREFIX_HEADER = "AWIconSheet/AWIconSheet-Prefix.pch";
408 | INFOPLIST_FILE = "AWIconSheet/AWIconSheet-Info.plist";
409 | PRODUCT_NAME = "$(TARGET_NAME)";
410 | TARGETED_DEVICE_FAMILY = 1;
411 | WRAPPER_EXTENSION = app;
412 | };
413 | name = Debug;
414 | };
415 | DA216009163A29CA00A3E18B /* Release */ = {
416 | isa = XCBuildConfiguration;
417 | buildSettings = {
418 | CLANG_ENABLE_OBJC_ARC = YES;
419 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
420 | GCC_PREFIX_HEADER = "AWIconSheet/AWIconSheet-Prefix.pch";
421 | INFOPLIST_FILE = "AWIconSheet/AWIconSheet-Info.plist";
422 | PRODUCT_NAME = "$(TARGET_NAME)";
423 | TARGETED_DEVICE_FAMILY = 1;
424 | WRAPPER_EXTENSION = app;
425 | };
426 | name = Release;
427 | };
428 | DA21600B163A29CA00A3E18B /* Debug */ = {
429 | isa = XCBuildConfiguration;
430 | buildSettings = {
431 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/AWIconSheet.app/AWIconSheet";
432 | FRAMEWORK_SEARCH_PATHS = (
433 | "\"$(SDKROOT)/Developer/Library/Frameworks\"",
434 | "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
435 | );
436 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
437 | GCC_PREFIX_HEADER = "AWIconSheet/AWIconSheet-Prefix.pch";
438 | INFOPLIST_FILE = "AWIconSheetTests/AWIconSheetTests-Info.plist";
439 | PRODUCT_NAME = "$(TARGET_NAME)";
440 | TEST_HOST = "$(BUNDLE_LOADER)";
441 | WRAPPER_EXTENSION = octest;
442 | };
443 | name = Debug;
444 | };
445 | DA21600C163A29CA00A3E18B /* Release */ = {
446 | isa = XCBuildConfiguration;
447 | buildSettings = {
448 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/AWIconSheet.app/AWIconSheet";
449 | FRAMEWORK_SEARCH_PATHS = (
450 | "\"$(SDKROOT)/Developer/Library/Frameworks\"",
451 | "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
452 | );
453 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
454 | GCC_PREFIX_HEADER = "AWIconSheet/AWIconSheet-Prefix.pch";
455 | INFOPLIST_FILE = "AWIconSheetTests/AWIconSheetTests-Info.plist";
456 | PRODUCT_NAME = "$(TARGET_NAME)";
457 | TEST_HOST = "$(BUNDLE_LOADER)";
458 | WRAPPER_EXTENSION = octest;
459 | };
460 | name = Release;
461 | };
462 | /* End XCBuildConfiguration section */
463 |
464 | /* Begin XCConfigurationList section */
465 | DA215FC5163A29C900A3E18B /* Build configuration list for PBXProject "AWIconSheet" */ = {
466 | isa = XCConfigurationList;
467 | buildConfigurations = (
468 | DA216005163A29CA00A3E18B /* Debug */,
469 | DA216006163A29CA00A3E18B /* Release */,
470 | );
471 | defaultConfigurationIsVisible = 0;
472 | defaultConfigurationName = Release;
473 | };
474 | DA216007163A29CA00A3E18B /* Build configuration list for PBXNativeTarget "AWIconSheet" */ = {
475 | isa = XCConfigurationList;
476 | buildConfigurations = (
477 | DA216008163A29CA00A3E18B /* Debug */,
478 | DA216009163A29CA00A3E18B /* Release */,
479 | );
480 | defaultConfigurationIsVisible = 0;
481 | defaultConfigurationName = Release;
482 | };
483 | DA21600A163A29CA00A3E18B /* Build configuration list for PBXNativeTarget "AWIconSheetTests" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | DA21600B163A29CA00A3E18B /* Debug */,
487 | DA21600C163A29CA00A3E18B /* Release */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = DA215FC2163A29C900A3E18B /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------