├── .DS_Store
├── CCPActionSheetDemo
├── .DS_Store
├── Assets.xcassets
│ ├── Contents.json
│ ├── SelectedBtnBg
│ │ ├── Contents.json
│ │ ├── .DS_Store
│ │ ├── xuanzhong.imageset
│ │ │ ├── xuanzhong@2x.png
│ │ │ ├── xuanzhong@3x.png
│ │ │ └── Contents.json
│ │ └── weiXuanZhong.imageset
│ │ │ ├── weiXuanZhong@2x.png
│ │ │ ├── weiXuanZhong@3x.png
│ │ │ └── Contents.json
│ ├── .DS_Store
│ ├── image0.imageset
│ │ ├── image0.jpeg
│ │ └── Contents.json
│ ├── image1.imageset
│ │ ├── image1.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Image
│ └── CCPActionSheetImage.gif
├── Class
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ └── ViewController.m
├── CCPMultiplechoiceView
│ ├── CCPMultipleChoiceCell.m
│ ├── CCPMultipleChoiceCell.h
│ ├── CCPMultipleChoiceView.h
│ ├── CCPMultipleChoiceCell.xib
│ └── CCPMultipleChoiceView.m
├── main.m
├── CCPActionSheetView
│ ├── CCPActionSheetCell.m
│ ├── CCPActionSheetCell.h
│ ├── CCPActionSheetView.h
│ ├── CCPActionSheetCell.xib
│ └── CCPActionSheetView.m
├── Category
│ ├── UIView+CCPExtension.h
│ ├── Foundation+Log.m
│ └── UIView+CCPExtension.m
├── Info.plist
└── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── CCPActionSheetDemo.xcodeproj
├── xcuserdata
│ ├── DR.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── CCPActionSheetDemo.xcscheme
│ └── ccp.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── CCPActionSheetDemo.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── DR.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── ccp.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
├── CCPActionSheetDemoTests
├── Info.plist
└── CCPActionSheetDemoTests.m
├── CCPActionSheetDemoUITests
├── Info.plist
└── CCPActionSheetDemoUITests.m
├── .gitignore
├── README.md
└── LICENSE
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/.DS_Store
--------------------------------------------------------------------------------
/CCPActionSheetDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/.DS_Store
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/.DS_Store
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Image/CCPActionSheetImage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Image/CCPActionSheetImage.gif
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/.DS_Store
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/image0.imageset/image0.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/image0.imageset/image0.jpeg
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/image1.imageset/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/image1.imageset/image1.png
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/DR.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/ccp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/xuanzhong.imageset/xuanzhong@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/xuanzhong.imageset/xuanzhong@2x.png
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/xuanzhong.imageset/xuanzhong@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/xuanzhong.imageset/xuanzhong@3x.png
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/weiXuanZhong.imageset/weiXuanZhong@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/weiXuanZhong.imageset/weiXuanZhong@2x.png
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/weiXuanZhong.imageset/weiXuanZhong@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/weiXuanZhong.imageset/weiXuanZhong@3x.png
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/project.xcworkspace/xcuserdata/DR.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo.xcodeproj/project.xcworkspace/xcuserdata/DR.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/project.xcworkspace/xcuserdata/ccp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iccpeng/CCPActionSheetDemo/HEAD/CCPActionSheetDemo.xcodeproj/project.xcworkspace/xcuserdata/ccp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Class/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Class/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPMultiplechoiceView/CCPMultipleChoiceCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPMultipleChoiceCell.m
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "CCPMultipleChoiceCell.h"
10 |
11 | @implementation CCPMultipleChoiceCell
12 |
13 | - (void)awakeFromNib {
14 |
15 |
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPActionSheetView/CCPActionSheetCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetCell.m
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/22.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "CCPActionSheetCell.h"
10 |
11 | @interface CCPActionSheetCell ()
12 |
13 |
14 |
15 | @end
16 |
17 | @implementation CCPActionSheetCell
18 |
19 | - (void)awakeFromNib {
20 |
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/image1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "image1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/image0.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "image0.jpeg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPMultiplechoiceView/CCPMultipleChoiceCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCPMultipleChoiceCell.h
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCPMultipleChoiceCell : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UILabel *showInfoLabel;
13 | @property (weak, nonatomic) IBOutlet UIButton *HUDBtn;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/xuanzhong.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "xuanzhong@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "xuanzhong@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/SelectedBtnBg/weiXuanZhong.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "weiXuanZhong@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "weiXuanZhong@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPActionSheetView/CCPActionSheetCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetCell.h
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/22.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCPActionSheetCell : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIView *topView;
13 |
14 | @property (weak, nonatomic) IBOutlet UILabel *infoLabel;
15 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *toTopCconstraint;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Category/UIView+CCPExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+CCPExtension.h
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (CCPExtension)
12 |
13 | @property (nonatomic, assign) CGSize size;
14 | @property (nonatomic, assign) CGFloat width;
15 | @property (nonatomic, assign) CGFloat height;
16 | @property (nonatomic, assign) CGFloat x;
17 | @property (nonatomic, assign) CGFloat y;
18 | @property (nonatomic, assign) CGFloat centerX;
19 | @property (nonatomic, assign) CGFloat centerY;
20 | @property (nonatomic, assign) CGPoint origin;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/CCPActionSheetDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CCPActionSheetDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/DR.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CCPActionSheetDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 7E1EF20E1D3FBFAE00F21012
16 |
17 | primary
18 |
19 |
20 | 7E1EF2271D3FBFAE00F21012
21 |
22 | primary
23 |
24 |
25 | 7E1EF2321D3FBFAE00F21012
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/ccp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CCPActionSheetDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 7E1EF20E1D3FBFAE00F21012
16 |
17 | primary
18 |
19 |
20 | 7E1EF2271D3FBFAE00F21012
21 |
22 | primary
23 |
24 |
25 | 7E1EF2321D3FBFAE00F21012
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPMultiplechoiceView/CCPMultipleChoiceView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCPMultipleChoiceView.h
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^clickSureBtnBlock)(NSString *combinedString,NSArray *backArray);
12 | typedef void(^clickCancelBtnBlock)();
13 |
14 | @interface CCPMultipleChoiceView : UIView
15 |
16 | @property (copy,nonatomic) void (^clickSureBtnBlock)(NSString *combinedString,NSArray *backArray);
17 | @property (copy,nonatomic) void (^clickCancelBtnBlock)();
18 |
19 | //已经选中的数据源数组
20 | @property (strong,nonatomic)NSArray *selectedArray;
21 |
22 | - (instancetype)initWithDataArr:(NSArray *)dataArray andClickSureBtnBlock:(clickSureBtnBlock)clickSureBtnBlock andClickCancelBtnBlock:(clickCancelBtnBlock)clickCancelBtnBlock ;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/CCPActionSheetDemoTests/CCPActionSheetDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetDemoTests.m
3 | // CCPActionSheetDemoTests
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCPActionSheetDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CCPActionSheetDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPActionSheetView/CCPActionSheetView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetView.h
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^cellDidSelectBlock)(NSString *indexString,NSInteger index);
12 |
13 | typedef void(^closeAlertviewBlock)();
14 |
15 | //动画样式
16 | typedef enum viewAnimateDirection {
17 | ViewAnimateFromTop,
18 | ViewAnimateFromLeft,
19 | ViewAnimateFromRight,
20 | ViewAnimateFromBottom,
21 | ViewAnimateScale,
22 | ViewAnimateNone
23 | } viewAnimateStyle;
24 |
25 |
26 | @interface CCPActionSheetView : UIView
27 |
28 | @property (nonatomic,copy)void(^cellDidSelectBlock)(NSString *indexString,NSInteger index);
29 |
30 | @property (nonatomic,copy)void(^closeAlertviewBlock)();
31 |
32 | @property (nonatomic,assign) viewAnimateStyle viewAnimateStyle;
33 |
34 | @property (nonatomic,assign) BOOL isBGClose;
35 |
36 | - (instancetype)initWithActionSheetArray:(NSArray *)indexTextArray;
37 |
38 | - (void)cellDidSelectBlock:(cellDidSelectBlock) cellDidSelectBlock;
39 |
40 | - (instancetype) initWithAlertView:(UIView *)alertView;
41 |
42 | - (void) closeAlertView:(closeAlertviewBlock) closeAlertviewBlock;
43 |
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/CCPActionSheetDemoUITests/CCPActionSheetDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetDemoUITests.m
3 | // CCPActionSheetDemoUITests
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCPActionSheetDemoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CCPActionSheetDemoUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Category/Foundation+Log.m:
--------------------------------------------------------------------------------
1 |
2 | #import
3 |
4 | @implementation NSDictionary (Log)
5 | - (NSString *)descriptionWithLocale:(id)locale
6 | {
7 | NSMutableString *str = [NSMutableString string];
8 |
9 | [str appendString:@"{\n"];
10 |
11 | // 遍历字典的所有键值对
12 | [self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
13 | [str appendFormat:@"\t%@ = %@,\n", key, obj];
14 | }];
15 |
16 | [str appendString:@"}"];
17 |
18 | // 查出最后一个,的范围
19 | NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
20 | if (range.length) {
21 | // 删掉最后一个,
22 | [str deleteCharactersInRange:range];
23 | }
24 |
25 | return str;
26 | }
27 | @end
28 |
29 | @implementation NSArray (Log)
30 | - (NSString *)descriptionWithLocale:(id)locale
31 | {
32 | NSMutableString *str = [NSMutableString string];
33 |
34 | [str appendString:@"[\n"];
35 |
36 | // 遍历数组的所有元素
37 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
38 | [str appendFormat:@"%@,\n", obj];
39 | }];
40 |
41 | [str appendString:@"]"];
42 |
43 | // 查出最后一个,的范围
44 | NSRange range = [str rangeOfString:@"," options:NSBackwardsSearch];
45 | if (range.length) {
46 | // 删掉最后一个,
47 | [str deleteCharactersInRange:range];
48 | }
49 |
50 | return str;
51 | }
52 | @end
53 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "83.5x83.5",
66 | "scale" : "2x"
67 | }
68 | ],
69 | "info" : {
70 | "version" : 1,
71 | "author" : "xcode"
72 | }
73 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | # Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Category/UIView+CCPExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+CCPExtension.m
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "UIView+CCPExtension.h"
10 |
11 | @implementation UIView (CCPExtension)
12 | -(void)setSize:(CGSize)size
13 | {
14 | CGRect frame = self.frame;
15 | frame.size = size;
16 | self.frame = frame;
17 | }
18 | -(CGSize)size
19 | {
20 | return self.frame.size;
21 | }
22 |
23 | -(void)setWidth:(CGFloat)width
24 | {
25 | CGRect frame = self.frame;
26 | frame.size.width = width;
27 | self.frame = frame;
28 | }
29 | -(CGFloat)width
30 | {
31 | return self.frame.size.width;
32 | }
33 |
34 | - (void)setHeight:(CGFloat)height
35 | {
36 | CGRect frame = self.frame;
37 | frame.size.height = height;
38 | self.frame = frame;
39 | }
40 |
41 | - (void)setX:(CGFloat)x
42 | {
43 | CGRect frame = self.frame;
44 | frame.origin.x = x;
45 | self.frame = frame;
46 | }
47 |
48 | - (void)setY:(CGFloat)y
49 | {
50 | CGRect frame = self.frame;
51 | frame.origin.y = y;
52 | self.frame = frame;
53 | }
54 |
55 | - (void)setCenterX:(CGFloat)centerX
56 | {
57 | CGPoint center = self.center;
58 | center.x = centerX;
59 | self.center = center;
60 | }
61 |
62 | - (void)setCenterY:(CGFloat)centerY
63 | {
64 | CGPoint center = self.center;
65 | center.y = centerY;
66 | self.center = center;
67 | }
68 |
69 | - (CGFloat)centerY
70 | {
71 | return self.center.y;
72 | }
73 |
74 | - (CGFloat)centerX
75 | {
76 | return self.center.x;
77 | }
78 |
79 | - (CGFloat)height
80 | {
81 | return self.frame.size.height;
82 | }
83 |
84 | - (CGFloat)x
85 | {
86 | return self.frame.origin.x;
87 | }
88 |
89 | - (CGFloat)y
90 | {
91 | return self.frame.origin.y;
92 | }
93 | - (void)setOrigin:(CGPoint)origin
94 | {
95 | CGRect frame = self.frame;
96 | frame.origin = origin;
97 | self.frame = frame;
98 | }
99 |
100 | - (CGPoint)origin
101 | {
102 | return self.frame.origin;
103 | }
104 |
105 | @end
106 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Class/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CCPActionSheetDemo
2 |
3 | ##a.解决的需求:
4 |
5 | ####0.微信样式底部弹窗
6 |
7 | ####1.带有动画效果的弹窗提示框
8 |
9 | ####2.多项选择视图
10 |
11 | ##b.效果图
12 |
13 | 
14 |
15 | ##c.使用示例
16 |
17 | ####1.微信样式底部弹窗示例代码如下
18 |
19 | - (IBAction)clickStyle1Button:(UIButton *)sender {
20 |
21 | __weak typeof(self) weakSelf = self;
22 |
23 | //选择数组
24 |
25 | NSArray *dataArray = [NSArray arrayWithObjects:@"小视频", @"拍照",@"从手机相册选择",@"取消",nil];
26 |
27 | CCPActionSheetView *actionSheetView = [[CCPActionSheetView alloc]initWithActionSheetArray:dataArray];
28 |
29 | //点击完成后的回调
30 |
31 | [actionSheetView cellDidSelectBlock:^(NSString *indexString, NSInteger index) {
32 |
33 | weakSelf.selectedContentLabel.text = [NSString stringWithFormat:@"%ld----%@",(long)index,indexString];
34 |
35 | }];
36 | }
37 |
38 | ####2.带有动画效果的弹窗示例代码如下
39 |
40 | - (IBAction)clickStyle2Button:(UIButton *)sender {
41 |
42 | //自定义的弹窗view
43 |
44 | UIImageView *testView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
45 |
46 | testView.userInteractionEnabled = YES;
47 |
48 | testView.image = [UIImage imageNamed:@"image0"];
49 |
50 | CCPActionSheetView *alertview = [[CCPActionSheetView alloc] initWithAlertView:testView];
51 |
52 | //动画样式
53 |
54 | alertview.viewAnimateStyle = ViewAnimateScale;
55 |
56 | }
57 |
58 |
59 | ####3.多项选择示例代码如下
60 |
61 | - (IBAction)clickMakeChoiceBtn:(UIButton *)sender {
62 |
63 | //测试数据源数组
64 |
65 | NSArray *dataArray = [NSArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21", nil];
66 |
67 | //ClickSureBtnBlock —> 确定按钮的回调,将拼接好的字符串,以及选择成功的数组回调到当前VC
68 |
69 | //ClickCancelBtnBlock —> 取消按钮的回调
70 |
71 | CCPMultipleChoiceView *ChoiceView = [[CCPMultipleChoiceView alloc] initWithDataArr:dataArray andClickSureBtnBlock:^(NSString *combinedString, NSArray *backArray) {
72 |
73 | self.choiceResultLabel.text = combinedString;
74 |
75 | NSLog(@"%@",backArray);
76 |
77 | } andClickCancelBtnBlock:^{
78 |
79 | }];
80 | //测试已经选中的数据源数组
81 |
82 | 如果不需要进入选择视图时显示已经选择的选项则 设置 ChoiceView.selectedArray = nil;
83 |
84 | //如果需要进入选择视图时显示已经选择的选项 则设置已经选中的数据源数组
85 |
86 | //@[@"1",@"3",@"10",@"0",@"20"]; 为对应的选中数据的下标
87 |
88 | ChoiceView.selectedArray = @[@"1",@"3",@"10",@"0",@"20"];
89 |
90 | }
91 |
92 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Class/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "CCPActionSheetView.h"
11 | #import "CCPMultipleChoiceView.h"
12 |
13 | @interface ViewController ()
14 |
15 | @property (weak, nonatomic) IBOutlet UILabel *selectedContentLabel;
16 |
17 | @property (nonatomic,strong) CCPActionSheetView *actionSheetView;
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | }
26 |
27 | //多项选择
28 | - (IBAction)clickStyle0Button:(UIButton *)sender {
29 |
30 | __weak typeof(self) weakSelf = self;
31 | NSArray *dataArray = [NSArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21", nil];
32 |
33 | CCPMultipleChoiceView *ChoiceView = [[CCPMultipleChoiceView alloc] initWithDataArr:dataArray andClickSureBtnBlock:^(NSString *combinedString, NSArray *backArray) {
34 | weakSelf.selectedContentLabel.text = combinedString;
35 | NSLog(@"%@",backArray);
36 |
37 | } andClickCancelBtnBlock:^{
38 |
39 |
40 | }];
41 | //已经选中的选项数组
42 | ChoiceView.selectedArray = @[@"1",@"3",@"10",@"0",@"20"];
43 | // ChoiceView.selectedArray = nil;
44 |
45 | }
46 |
47 | //微信样式的底部选择菜单
48 | - (IBAction)clickStyle1Button:(UIButton *)sender {
49 |
50 | __weak typeof(self) weakSelf = self;
51 |
52 | NSArray *dataArray = [NSArray arrayWithObjects:@"小视频", @"拍照",@"从手机相册选择",@"取消",nil];
53 |
54 | CCPActionSheetView *actionSheetView = [[CCPActionSheetView alloc]initWithActionSheetArray:dataArray];
55 |
56 | [actionSheetView cellDidSelectBlock:^(NSString *indexString, NSInteger index) {
57 |
58 | weakSelf.selectedContentLabel.text = [NSString stringWithFormat:@"%ld----%@",(long)index,indexString];
59 |
60 |
61 | }];
62 |
63 | }
64 |
65 |
66 | //带有遮罩的弹窗 --只需要传入自定义的弹窗 view
67 | - (IBAction)clickStyle2Button:(UIButton *)sender {
68 |
69 | UIImageView *testView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
70 | testView.userInteractionEnabled = YES;
71 |
72 | testView.image = [UIImage imageNamed:@"image0"];
73 |
74 | UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(180, 0, 120, 120)];
75 |
76 | [button setBackgroundImage:[UIImage imageNamed:@"image1"] forState:UIControlStateNormal];
77 |
78 | [button setTitle:@"clcikMe" forState:UIControlStateNormal];
79 |
80 | [button addTarget:self action:@selector(clickButton) forControlEvents:UIControlEventTouchUpInside];
81 | [testView addSubview:button];
82 |
83 |
84 | CCPActionSheetView *alertview = [[CCPActionSheetView alloc] initWithAlertView:testView];
85 | self.actionSheetView = alertview;
86 | if (sender.tag == 100) {
87 |
88 | alertview.viewAnimateStyle = ViewAnimateScale;
89 |
90 | } else if (sender.tag == 101) {
91 |
92 | alertview.viewAnimateStyle = ViewAnimateFromLeft;
93 |
94 | }else if (sender.tag == 102) {
95 |
96 | alertview.viewAnimateStyle = ViewAnimateFromRight;
97 |
98 | }else if (sender.tag == 103) {
99 |
100 | alertview.viewAnimateStyle = ViewAnimateFromTop;
101 |
102 | }else if (sender.tag == 104) {
103 | alertview.viewAnimateStyle = ViewAnimateFromBottom;
104 |
105 |
106 | }else {
107 | alertview.viewAnimateStyle = ViewAnimateNone;
108 |
109 | }
110 |
111 | }
112 |
113 | - (void)clickButton {
114 |
115 | [self.actionSheetView closeAlertView:^{
116 |
117 | NSLog(@"点击按钮,取消弹窗");
118 |
119 | }];
120 |
121 | }
122 |
123 | @end
124 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPMultiplechoiceView/CCPMultipleChoiceCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
27 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/DR.xcuserdatad/xcschemes/CCPActionSheetDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/xcuserdata/ccp.xcuserdatad/xcschemes/CCPActionSheetDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPActionSheetView/CCPActionSheetCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPMultiplechoiceView/CCPMultipleChoiceView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPMultipleChoiceView.m
3 | // CCPMultipleChoiceDemo
4 | //
5 | // Created by C CP on 16/7/16.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "CCPMultipleChoiceView.h"
10 | #import "CCPMultipleChoiceCell.h"
11 | #import "UIView+CCPExtension.h"
12 | #define CCPWIDTH [UIScreen mainScreen].bounds.size.width
13 | #define CCPHEIGHT [UIScreen mainScreen].bounds.size.height
14 |
15 | @interface CCPMultipleChoiceView ()
16 |
17 | @property (strong,nonatomic) NSArray *dataArray;
18 |
19 | @property (strong,nonatomic) NSMutableArray *selectDataArray;
20 |
21 | @property (strong,nonatomic) NSMutableArray *backArray;
22 |
23 | @property (copy,nonatomic) NSString *combinedString;
24 |
25 | @property (nonatomic,strong) UITableView *showTableView;
26 |
27 | @property (nonatomic,strong) UIView *showTableHeaderView;
28 |
29 | @property (nonatomic,assign) CGFloat recodeTableViewHeight;
30 |
31 | @end
32 |
33 | @implementation CCPMultipleChoiceView
34 |
35 | - (UITableView *)showTableView {
36 |
37 | if (_showTableView == nil) {
38 |
39 | _showTableView = [[UITableView alloc] init];
40 |
41 | NSAssert(self.dataArray.count > 0, @"self.dataArray.count = 0 or self.dataArray = nil");
42 |
43 | CGFloat showTableViewHeight = (self.dataArray.count + 1) * 44;
44 |
45 | if (showTableViewHeight > CCPHEIGHT/3 * 2) {
46 |
47 | showTableViewHeight = CCPHEIGHT/3 * 2;
48 |
49 | }
50 |
51 | self.recodeTableViewHeight = showTableViewHeight;
52 |
53 | _showTableView.frame = CGRectMake(0, CCPHEIGHT, CCPWIDTH, showTableViewHeight);
54 |
55 |
56 | }
57 |
58 | return _showTableView;
59 |
60 | }
61 |
62 |
63 | - (UIView *)showTableHeaderView {
64 |
65 | if (_showTableHeaderView == nil) {
66 |
67 | _showTableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CCPWIDTH, 44)];
68 |
69 | //cancel button
70 | UIButton *cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake(15, 10, 80, 40)];
71 | [cancelBtn setTitle:@"cancel" forState:UIControlStateNormal];
72 | [cancelBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
73 | [cancelBtn addTarget:self action:@selector(clickCancelBtn) forControlEvents:UIControlEventTouchUpInside];
74 | [_showTableHeaderView addSubview:cancelBtn];
75 | cancelBtn.centerY = _showTableHeaderView.centerY;
76 |
77 | //sure button
78 | UIButton *sureBtn = [[UIButton alloc] initWithFrame:CGRectMake(CCPWIDTH - 80 - 15, 10, 80 , 40)];
79 | [sureBtn setTitle:@"sure" forState:UIControlStateNormal];
80 | [sureBtn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
81 | [sureBtn addTarget:self action:@selector(clickSureBtn) forControlEvents:UIControlEventTouchUpInside];
82 | [_showTableHeaderView addSubview:sureBtn];
83 | sureBtn.centerY = _showTableHeaderView.centerY;
84 |
85 | }
86 |
87 | return _showTableHeaderView;
88 |
89 | }
90 |
91 |
92 | - (NSMutableArray *)selectDataArray {
93 |
94 | if (_selectDataArray == nil) {
95 |
96 | _selectDataArray = [NSMutableArray array];
97 |
98 | for (int i = 0; i < self.dataArray.count; i ++) {
99 |
100 | [_selectDataArray addObject:@""];
101 | }
102 | }
103 | return _selectDataArray;
104 | }
105 |
106 | - (NSMutableArray *)backArray {
107 |
108 | if (_backArray == nil) {
109 | _backArray = [NSMutableArray array];
110 | }
111 | return _backArray;
112 |
113 | }
114 |
115 |
116 | - (void)setSelectedArray:(NSArray *)selectedArray {
117 |
118 | _selectedArray = selectedArray;
119 |
120 | NSAssert(selectedArray.count <= self.dataArray.count , @"self.dataArray.count = 0 or self.dataArray = nil");
121 |
122 | for (NSString *indexString in selectedArray) {
123 |
124 | NSUInteger index = [indexString integerValue];
125 |
126 | NSAssert(selectedArray.count <= self.dataArray.count && index <= self.dataArray.count - 1, @"The selectedArray is error");
127 |
128 | [self.selectDataArray replaceObjectAtIndex:index withObject:self.dataArray[index]];
129 |
130 | }
131 |
132 | [self.backArray removeAllObjects];
133 |
134 | for (NSString *backString in self.selectDataArray) {
135 |
136 | if (![backString isEqualToString:@""]) {
137 |
138 | [self.backArray addObject:backString];
139 | }
140 | }
141 |
142 | self.combinedString = [self.backArray componentsJoinedByString:@","];
143 |
144 | }
145 |
146 | - (void)clickCancelBtn {
147 |
148 | if (self.clickCancelBtnBlock) {
149 |
150 | self.clickCancelBtnBlock();
151 | }
152 |
153 | [self dissMissView];
154 | }
155 |
156 | - (void)clickSureBtn {
157 |
158 | if (self.clickSureBtnBlock) {
159 |
160 | self.clickSureBtnBlock(self.combinedString,self.backArray);
161 | }
162 | [self dissMissView];
163 | }
164 |
165 | static NSString *cellIdentifier = @"MultipleChoiceCell";
166 |
167 | - (instancetype)initWithDataArr:(NSArray *)dataArray andClickSureBtnBlock:(clickSureBtnBlock)clickSureBtnBlock andClickCancelBtnBlock:(clickCancelBtnBlock)clickCancelBtnBlock {
168 |
169 | if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
170 | self.clickSureBtnBlock = clickSureBtnBlock;
171 | self.clickCancelBtnBlock = clickCancelBtnBlock;
172 | self.dataArray = dataArray;
173 | [self.showTableView registerNib:[UINib nibWithNibName:@"CCPMultipleChoiceCell" bundle:nil] forCellReuseIdentifier:cellIdentifier];
174 | self.showTableView.dataSource = self;
175 | self.showTableView.delegate = self;
176 | self.showTableView.tableHeaderView = self.showTableHeaderView;
177 |
178 | [self addSubview:self.showTableView];
179 |
180 | [UIView animateWithDuration:.3 animations:^{
181 |
182 | self.showTableView.y = CCPHEIGHT - self.recodeTableViewHeight;
183 |
184 | }];
185 |
186 | UIWindow *currentWindows = [UIApplication sharedApplication].keyWindow;
187 | self.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.2];
188 |
189 | currentWindows.backgroundColor = [UIColor redColor];
190 | [currentWindows addSubview:self];
191 |
192 | }
193 |
194 | return self;
195 | }
196 |
197 |
198 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
199 |
200 | return self.dataArray.count;
201 |
202 | }
203 |
204 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
205 |
206 | CCPMultipleChoiceCell *multipleChoiceCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
207 |
208 | multipleChoiceCell.HUDBtn.selected = [self.selectDataArray[indexPath.row] isEqualToString:@""] ? NO:YES;
209 |
210 | multipleChoiceCell.selectedBackgroundView = [[UIView alloc] initWithFrame:multipleChoiceCell.frame];
211 | multipleChoiceCell.selectedBackgroundView.backgroundColor = [UIColor redColor];
212 |
213 | multipleChoiceCell.showInfoLabel.text = self.dataArray[indexPath.row];
214 |
215 | return multipleChoiceCell;
216 |
217 | }
218 |
219 | - (BOOL)isSelected:(NSInteger)row {
220 |
221 | return [self.selectDataArray[row] isEqualToString:@""];
222 |
223 | }
224 |
225 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
226 |
227 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
228 |
229 | CCPMultipleChoiceCell *cell = (CCPMultipleChoiceCell *)[tableView cellForRowAtIndexPath:indexPath];
230 |
231 | if (cell.HUDBtn.selected) {
232 |
233 | cell.HUDBtn.selected = NO;
234 | } else {
235 |
236 | cell.HUDBtn.selected = YES;
237 | }
238 |
239 | NSString *selectString = @"";
240 | if (cell.HUDBtn.selected == YES) {
241 | selectString = [NSString stringWithFormat:@"%@",self.dataArray[indexPath.row]];
242 | } else {
243 | selectString = @"";
244 | }
245 |
246 | [self.selectDataArray replaceObjectAtIndex:indexPath.row withObject:selectString];
247 |
248 | [self.backArray removeAllObjects];
249 |
250 | for (NSString *backString in self.selectDataArray) {
251 |
252 | if (![backString isEqualToString:@""]) {
253 |
254 | [self.backArray addObject:backString];
255 | }
256 | }
257 |
258 | self.combinedString = [self.backArray componentsJoinedByString:@","];
259 | // NSLog(@"%@",self.backArray);
260 | }
261 |
262 |
263 | - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
264 |
265 | return 44;
266 | }
267 |
268 |
269 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
270 | [self dissMissView];
271 | }
272 |
273 | - (void)dissMissView{
274 |
275 | [UIView animateWithDuration:.3 animations:^{
276 | [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
277 | self.showTableView.frame = CGRectMake(0, CCPHEIGHT, CCPWIDTH, self.recodeTableViewHeight);
278 | } completion:^(BOOL finished) {
279 | [self removeFromSuperview];
280 | }];
281 | }
282 |
283 |
284 | @end
285 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/CCPActionSheetView/CCPActionSheetView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPActionSheetView.m
3 | // CCPActionSheetDemo
4 | //
5 | // Created by C CP on 16/7/20.
6 | // Copyright © 2016年 C CP. All rights reserved.
7 | //
8 |
9 | #import "CCPActionSheetView.h"
10 | #import "UIView+CCPExtension.h"
11 | #import "CCPActionSheetCell.h"
12 | #define CCPWIDTH [UIScreen mainScreen].bounds.size.width
13 | #define CCPHEIGHT [UIScreen mainScreen].bounds.size.height
14 |
15 | @interface CCPActionSheetView ()
16 |
17 | @property (strong,nonatomic)NSArray *dataArray;
18 |
19 | @property (strong,nonatomic)UITableView *actionSheetTableView;
20 |
21 | @property (nonatomic,assign) CGFloat recodeTableViewHeight;
22 |
23 | @property (nonatomic,strong) UIView *alertView;
24 |
25 | @property (nonatomic,copy) NSString *viewStyle;
26 |
27 | @property (nonatomic,strong)UITapGestureRecognizer *sheetTap;
28 |
29 | @property (nonatomic,strong)UITapGestureRecognizer *alertTap;
30 |
31 | @property (nonatomic,assign)CGFloat alertViewW;
32 | @property (nonatomic,assign)CGFloat alertViewH;
33 |
34 | @end
35 |
36 | @implementation CCPActionSheetView
37 |
38 | - (UITableView *)actionSheetTableView {
39 |
40 | if (!_actionSheetTableView) {
41 |
42 | _actionSheetTableView = [[UITableView alloc] init];
43 |
44 | NSAssert(self.dataArray.count > 0, @"self.dataArray.count = 0 or self.dataArray = nil");
45 |
46 | CGFloat showTableViewHeight = self.dataArray.count * 44 + 10;
47 |
48 | if (showTableViewHeight > CCPHEIGHT/3 * 2) {
49 |
50 | showTableViewHeight = CCPHEIGHT/3 * 2;
51 |
52 | _actionSheetTableView.scrollEnabled = YES;
53 |
54 | } else {
55 |
56 | _actionSheetTableView.scrollEnabled = NO;
57 |
58 | }
59 |
60 | self.recodeTableViewHeight = showTableViewHeight;
61 |
62 | _actionSheetTableView.frame = CGRectMake(0, CCPHEIGHT, CCPWIDTH, showTableViewHeight);
63 |
64 | [self addSubview:_actionSheetTableView];
65 |
66 | }
67 |
68 | return _actionSheetTableView;
69 |
70 | }
71 |
72 |
73 | - (instancetype)initWithActionSheetArray:(NSArray *)indexTextArray {
74 |
75 | if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
76 |
77 | self.viewStyle = @"actionSheetView";
78 | __weak typeof(self) weakSelf = self;
79 | self.dataArray =indexTextArray;
80 | self.actionSheetTableView.dataSource = self;
81 | self.actionSheetTableView.delegate = self;
82 |
83 | [UIView animateWithDuration:0.25 animations:^{
84 | weakSelf.actionSheetTableView.frame = CGRectMake(0, CCPHEIGHT - weakSelf.recodeTableViewHeight, CCPWIDTH, weakSelf.recodeTableViewHeight);
85 |
86 | }];
87 |
88 | UIWindow *currentWindows = [UIApplication sharedApplication].keyWindow;
89 | self.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.1];
90 | [currentWindows addSubview:self];
91 |
92 | [self.actionSheetTableView registerNib:[UINib nibWithNibName:@"CCPActionSheetCell" bundle:nil] forCellReuseIdentifier:@"actionSheetCell"];
93 |
94 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
95 | self.sheetTap = tap;
96 |
97 | tap.delegate = self;
98 |
99 | [self addGestureRecognizer:tap];
100 |
101 | }
102 |
103 | return self;
104 |
105 | }
106 |
107 |
108 |
109 | - (instancetype) initWithAlertView:(UIView *)alertView {
110 |
111 | if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
112 |
113 | self.viewStyle = @"alertView";
114 | self.alertView = alertView;
115 |
116 | self.alertViewH = alertView.height;
117 |
118 | self.alertViewW = alertView.width;
119 |
120 | self.viewAnimateStyle = ViewAnimateNone;//默认无动画
121 |
122 | UIWindow *currentWindows = [UIApplication sharedApplication].keyWindow;
123 | self.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.1];
124 | [currentWindows addSubview:self];
125 |
126 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
127 |
128 | self.alertTap = tap;
129 |
130 | tap.delegate = self;
131 |
132 | [self addGestureRecognizer:tap];
133 |
134 | }
135 |
136 | return self;
137 | }
138 |
139 |
140 | - (void)setViewAnimateStyle:(viewAnimateStyle)viewAnimateStyle {
141 |
142 | _viewAnimateStyle = viewAnimateStyle;
143 |
144 | if (viewAnimateStyle == ViewAnimateFromLeft) {
145 |
146 | self.alertView.frame = CGRectMake(- self.alertViewW, self.centerY - self.alertViewH/2 , self.alertViewW, self.alertViewH);
147 |
148 | } else if (viewAnimateStyle == ViewAnimateFromRight) {
149 |
150 | self.alertView.frame = CGRectMake(CCPWIDTH, self.centerY - self.alertViewH/2 , self.alertViewW, self.alertViewH);
151 |
152 | } else if (viewAnimateStyle == ViewAnimateFromTop) {
153 |
154 | self.alertView.frame = CGRectMake((CCPWIDTH - self.alertViewW) / 2, - self.alertViewH , self.alertViewW, self.alertViewH);
155 |
156 | } else if (viewAnimateStyle == ViewAnimateFromBottom) {
157 |
158 | self.alertView.frame = CGRectMake((CCPWIDTH - self.alertViewW) / 2, CCPHEIGHT , self.alertViewW, self.alertViewH);
159 |
160 | } else if (viewAnimateStyle == ViewAnimateScale) {
161 |
162 | self.alertView.center = self.center;
163 | self.alertView.transform = CGAffineTransformMakeScale(0.0f, 0.0f);
164 |
165 | } else {
166 |
167 | self.alertView.center = self.center;
168 |
169 | }
170 | __weak typeof(self) weakSelf = self;
171 |
172 | [UIView animateWithDuration:0.5 delay:0.0 usingSpringWithDamping:0.5 initialSpringVelocity:0.5 options:UIViewAnimationOptionCurveLinear animations:^{
173 |
174 | if (weakSelf.viewAnimateStyle == ViewAnimateScale) {
175 |
176 | weakSelf.alertView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
177 | }
178 |
179 | weakSelf.alertView.center = weakSelf.center;
180 |
181 | } completion:^(BOOL finished) {
182 |
183 | }];
184 |
185 | [self addSubview:self.alertView];
186 |
187 | }
188 |
189 |
190 | - (void)closeAlertView:(closeAlertviewBlock)closeAlertviewBlock {
191 |
192 | self.closeAlertviewBlock = closeAlertviewBlock;
193 |
194 | [self tap:nil];
195 |
196 | }
197 |
198 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
199 |
200 | return self.dataArray.count;
201 | }
202 |
203 |
204 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
205 |
206 | CCPActionSheetCell *cell = [tableView dequeueReusableCellWithIdentifier:@"actionSheetCell"];
207 | cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame];
208 | cell.selectedBackgroundView.backgroundColor = [UIColor colorWithRed:246.0/255.0 green:246.0/255.0 blue:246.0/255.0 alpha:1.0];
209 |
210 | cell.infoLabel.text = self.dataArray[indexPath.row];
211 |
212 | if (indexPath.row == self.dataArray.count - 1) {
213 |
214 | cell.topView.hidden = NO;
215 |
216 | } else {
217 |
218 | cell.topView.hidden = YES;
219 | cell.toTopCconstraint.constant = -10;
220 |
221 | }
222 |
223 |
224 | return cell;
225 | }
226 |
227 |
228 |
229 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
230 |
231 | if (self.cellDidSelectBlock) {
232 |
233 | self.cellDidSelectBlock(self.dataArray[indexPath.row],indexPath.row);
234 | }
235 |
236 | [self dissMissView];
237 | }
238 |
239 |
240 | - (void)cellDidSelectBlock:(cellDidSelectBlock)cellDidSelectBlock {
241 |
242 | self.cellDidSelectBlock = cellDidSelectBlock;
243 |
244 | }
245 |
246 |
247 | -(void)setIsBGClose:(BOOL)isBGClose {
248 |
249 | _isBGClose = isBGClose;
250 |
251 | if (isBGClose) {
252 |
253 | [self removeGestureRecognizer:self.alertTap];
254 |
255 | }
256 |
257 | }
258 |
259 | - (void)tap:(UITapGestureRecognizer *)tap {
260 |
261 | if (self.closeAlertviewBlock) {
262 |
263 | self.closeAlertviewBlock();
264 | }
265 |
266 | if ([self.viewStyle isEqualToString:@"alertView"]) {
267 |
268 | [self dissMissAlertView];
269 |
270 | } else {
271 |
272 | [self dissMissView];
273 |
274 | }
275 |
276 | }
277 |
278 |
279 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
280 | {
281 |
282 | if (gestureRecognizer == self.sheetTap) {
283 |
284 | if ([touch.view isDescendantOfView:self.actionSheetTableView]) {
285 | return NO;
286 | }
287 |
288 | } else {
289 |
290 | if ([touch.view isDescendantOfView:self.alertView] ) {
291 | return NO;
292 | }
293 |
294 | }
295 |
296 | return YES;
297 | }
298 |
299 |
300 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
301 |
302 |
303 | if (indexPath.row == self.dataArray.count - 1) {
304 |
305 | return 54;
306 |
307 | } else {
308 |
309 | return 44;
310 | }
311 |
312 | }
313 |
314 |
315 | - (void)dissMissView{
316 | __weak typeof(self) weakSelf = self;
317 | [UIView animateWithDuration:.3 animations:^{
318 | [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
319 | weakSelf.actionSheetTableView.frame = CGRectMake(0, CCPHEIGHT, CCPWIDTH, weakSelf.recodeTableViewHeight);
320 | } completion:^(BOOL finished) {
321 |
322 | weakSelf.actionSheetTableView = nil;
323 |
324 | [weakSelf removeFromSuperview];
325 | }];
326 | }
327 |
328 |
329 | - (void)dissMissAlertView {
330 | __weak typeof(self) weakSelf = self;
331 | [UIView animateWithDuration:0.5 animations:^{
332 |
333 | if (weakSelf.viewAnimateStyle == ViewAnimateFromLeft) {
334 |
335 | weakSelf.alertView.frame = CGRectMake(CCPWIDTH, weakSelf.centerY - weakSelf.alertViewH / 2, weakSelf.alertViewW, weakSelf.alertViewH);
336 |
337 | } else if (weakSelf.viewAnimateStyle == ViewAnimateFromRight) {
338 |
339 | weakSelf.alertView.frame = CGRectMake(- weakSelf.alertViewW, weakSelf.centerY - weakSelf.alertViewH/2 , weakSelf.alertViewW, weakSelf.alertViewH);
340 |
341 | } else if (weakSelf.viewAnimateStyle == ViewAnimateFromTop) {
342 |
343 | weakSelf.alertView.frame = CGRectMake((CCPWIDTH - weakSelf.alertViewW) / 2, CCPHEIGHT , weakSelf.alertViewW, weakSelf.alertViewH);
344 |
345 | } else if (weakSelf.viewAnimateStyle == ViewAnimateFromBottom) {
346 |
347 | weakSelf.alertView.frame = CGRectMake((CCPWIDTH - weakSelf.alertViewW) / 2, - weakSelf.alertViewH , weakSelf.alertViewW, weakSelf.alertViewH);
348 |
349 | } else if (self.viewAnimateStyle == ViewAnimateScale) {
350 |
351 | weakSelf.alertView.center = weakSelf.center;
352 | weakSelf.alertView.transform = CGAffineTransformMakeScale(0.01f, 0.01f);
353 |
354 | }
355 |
356 | } completion:^(BOOL finished) {
357 |
358 | [weakSelf removeFromSuperview];
359 |
360 | }];
361 |
362 | }
363 |
364 | @end
365 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
38 |
49 |
60 |
71 |
82 |
93 |
104 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/CCPActionSheetDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 210AAB451D50519F00B7EF24 /* Foundation+Log.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB421D50519F00B7EF24 /* Foundation+Log.m */; };
11 | 210AAB461D50519F00B7EF24 /* UIView+CCPExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB441D50519F00B7EF24 /* UIView+CCPExtension.m */; };
12 | 210AAB4D1D5051B100B7EF24 /* CCPActionSheetCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB491D5051B100B7EF24 /* CCPActionSheetCell.m */; };
13 | 210AAB4E1D5051B100B7EF24 /* CCPActionSheetCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 210AAB4A1D5051B100B7EF24 /* CCPActionSheetCell.xib */; };
14 | 210AAB4F1D5051B100B7EF24 /* CCPActionSheetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB4C1D5051B100B7EF24 /* CCPActionSheetView.m */; };
15 | 210AAB551D5051C000B7EF24 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB521D5051C000B7EF24 /* AppDelegate.m */; };
16 | 210AAB561D5051C000B7EF24 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 210AAB541D5051C000B7EF24 /* ViewController.m */; };
17 | 210AAB591D5051F400B7EF24 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 210AAB571D5051F400B7EF24 /* Main.storyboard */; };
18 | 212F5BA21D62DB6600F71FA6 /* CCPActionSheetImage.gif in Resources */ = {isa = PBXBuildFile; fileRef = 212F5BA11D62DB6600F71FA6 /* CCPActionSheetImage.gif */; };
19 | 7E1EF2141D3FBFAE00F21012 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E1EF2131D3FBFAE00F21012 /* main.m */; };
20 | 7E1EF21F1D3FBFAE00F21012 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7E1EF21E1D3FBFAE00F21012 /* Assets.xcassets */; };
21 | 7E1EF2221D3FBFAE00F21012 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E1EF2201D3FBFAE00F21012 /* LaunchScreen.storyboard */; };
22 | 7E1EF22D1D3FBFAE00F21012 /* CCPActionSheetDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E1EF22C1D3FBFAE00F21012 /* CCPActionSheetDemoTests.m */; };
23 | 7E1EF2381D3FBFAE00F21012 /* CCPActionSheetDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E1EF2371D3FBFAE00F21012 /* CCPActionSheetDemoUITests.m */; };
24 | 7EFA35831D4CAED400B686D9 /* CCPMultipleChoiceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EFA357F1D4CAED400B686D9 /* CCPMultipleChoiceCell.m */; };
25 | 7EFA35841D4CAED400B686D9 /* CCPMultipleChoiceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7EFA35801D4CAED400B686D9 /* CCPMultipleChoiceCell.xib */; };
26 | 7EFA35851D4CAED400B686D9 /* CCPMultipleChoiceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EFA35821D4CAED400B686D9 /* CCPMultipleChoiceView.m */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | 7E1EF2291D3FBFAE00F21012 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 7E1EF2071D3FBFAE00F21012 /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 7E1EF20E1D3FBFAE00F21012;
35 | remoteInfo = CCPActionSheetDemo;
36 | };
37 | 7E1EF2341D3FBFAE00F21012 /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = 7E1EF2071D3FBFAE00F21012 /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = 7E1EF20E1D3FBFAE00F21012;
42 | remoteInfo = CCPActionSheetDemo;
43 | };
44 | /* End PBXContainerItemProxy section */
45 |
46 | /* Begin PBXFileReference section */
47 | 210AAB421D50519F00B7EF24 /* Foundation+Log.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Foundation+Log.m"; sourceTree = ""; };
48 | 210AAB431D50519F00B7EF24 /* UIView+CCPExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CCPExtension.h"; sourceTree = ""; };
49 | 210AAB441D50519F00B7EF24 /* UIView+CCPExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CCPExtension.m"; sourceTree = ""; };
50 | 210AAB481D5051B100B7EF24 /* CCPActionSheetCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPActionSheetCell.h; sourceTree = ""; };
51 | 210AAB491D5051B100B7EF24 /* CCPActionSheetCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPActionSheetCell.m; sourceTree = ""; };
52 | 210AAB4A1D5051B100B7EF24 /* CCPActionSheetCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCPActionSheetCell.xib; sourceTree = ""; };
53 | 210AAB4B1D5051B100B7EF24 /* CCPActionSheetView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPActionSheetView.h; sourceTree = ""; };
54 | 210AAB4C1D5051B100B7EF24 /* CCPActionSheetView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPActionSheetView.m; sourceTree = ""; };
55 | 210AAB511D5051C000B7EF24 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
56 | 210AAB521D5051C000B7EF24 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
57 | 210AAB531D5051C000B7EF24 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
58 | 210AAB541D5051C000B7EF24 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
59 | 210AAB581D5051F400B7EF24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
60 | 212F5BA11D62DB6600F71FA6 /* CCPActionSheetImage.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = CCPActionSheetImage.gif; sourceTree = ""; };
61 | 7E1EF20F1D3FBFAE00F21012 /* CCPActionSheetDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CCPActionSheetDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
62 | 7E1EF2131D3FBFAE00F21012 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
63 | 7E1EF21E1D3FBFAE00F21012 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
64 | 7E1EF2211D3FBFAE00F21012 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
65 | 7E1EF2231D3FBFAE00F21012 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | 7E1EF2281D3FBFAE00F21012 /* CCPActionSheetDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CCPActionSheetDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
67 | 7E1EF22C1D3FBFAE00F21012 /* CCPActionSheetDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPActionSheetDemoTests.m; sourceTree = ""; };
68 | 7E1EF22E1D3FBFAE00F21012 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
69 | 7E1EF2331D3FBFAE00F21012 /* CCPActionSheetDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CCPActionSheetDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
70 | 7E1EF2371D3FBFAE00F21012 /* CCPActionSheetDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPActionSheetDemoUITests.m; sourceTree = ""; };
71 | 7E1EF2391D3FBFAE00F21012 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
72 | 7EFA357E1D4CAED400B686D9 /* CCPMultipleChoiceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPMultipleChoiceCell.h; sourceTree = ""; };
73 | 7EFA357F1D4CAED400B686D9 /* CCPMultipleChoiceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPMultipleChoiceCell.m; sourceTree = ""; };
74 | 7EFA35801D4CAED400B686D9 /* CCPMultipleChoiceCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCPMultipleChoiceCell.xib; sourceTree = ""; };
75 | 7EFA35811D4CAED400B686D9 /* CCPMultipleChoiceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPMultipleChoiceView.h; sourceTree = ""; };
76 | 7EFA35821D4CAED400B686D9 /* CCPMultipleChoiceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPMultipleChoiceView.m; sourceTree = ""; };
77 | /* End PBXFileReference section */
78 |
79 | /* Begin PBXFrameworksBuildPhase section */
80 | 7E1EF20C1D3FBFAE00F21012 /* Frameworks */ = {
81 | isa = PBXFrameworksBuildPhase;
82 | buildActionMask = 2147483647;
83 | files = (
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | 7E1EF2251D3FBFAE00F21012 /* Frameworks */ = {
88 | isa = PBXFrameworksBuildPhase;
89 | buildActionMask = 2147483647;
90 | files = (
91 | );
92 | runOnlyForDeploymentPostprocessing = 0;
93 | };
94 | 7E1EF2301D3FBFAE00F21012 /* Frameworks */ = {
95 | isa = PBXFrameworksBuildPhase;
96 | buildActionMask = 2147483647;
97 | files = (
98 | );
99 | runOnlyForDeploymentPostprocessing = 0;
100 | };
101 | /* End PBXFrameworksBuildPhase section */
102 |
103 | /* Begin PBXGroup section */
104 | 210AAB411D50519F00B7EF24 /* Category */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 210AAB421D50519F00B7EF24 /* Foundation+Log.m */,
108 | 210AAB431D50519F00B7EF24 /* UIView+CCPExtension.h */,
109 | 210AAB441D50519F00B7EF24 /* UIView+CCPExtension.m */,
110 | );
111 | path = Category;
112 | sourceTree = "";
113 | };
114 | 210AAB471D5051B100B7EF24 /* CCPActionSheetView */ = {
115 | isa = PBXGroup;
116 | children = (
117 | 210AAB481D5051B100B7EF24 /* CCPActionSheetCell.h */,
118 | 210AAB491D5051B100B7EF24 /* CCPActionSheetCell.m */,
119 | 210AAB4A1D5051B100B7EF24 /* CCPActionSheetCell.xib */,
120 | 210AAB4B1D5051B100B7EF24 /* CCPActionSheetView.h */,
121 | 210AAB4C1D5051B100B7EF24 /* CCPActionSheetView.m */,
122 | );
123 | path = CCPActionSheetView;
124 | sourceTree = "";
125 | };
126 | 210AAB501D5051C000B7EF24 /* Class */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 210AAB511D5051C000B7EF24 /* AppDelegate.h */,
130 | 210AAB521D5051C000B7EF24 /* AppDelegate.m */,
131 | 210AAB531D5051C000B7EF24 /* ViewController.h */,
132 | 210AAB541D5051C000B7EF24 /* ViewController.m */,
133 | );
134 | path = Class;
135 | sourceTree = "";
136 | };
137 | 212F5BA01D62DB3400F71FA6 /* Image */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 212F5BA11D62DB6600F71FA6 /* CCPActionSheetImage.gif */,
141 | );
142 | path = Image;
143 | sourceTree = "";
144 | };
145 | 7E1EF2061D3FBFAE00F21012 = {
146 | isa = PBXGroup;
147 | children = (
148 | 7E1EF2111D3FBFAE00F21012 /* CCPActionSheetDemo */,
149 | 7E1EF22B1D3FBFAE00F21012 /* CCPActionSheetDemoTests */,
150 | 7E1EF2361D3FBFAE00F21012 /* CCPActionSheetDemoUITests */,
151 | 7E1EF2101D3FBFAE00F21012 /* Products */,
152 | );
153 | sourceTree = "";
154 | };
155 | 7E1EF2101D3FBFAE00F21012 /* Products */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 7E1EF20F1D3FBFAE00F21012 /* CCPActionSheetDemo.app */,
159 | 7E1EF2281D3FBFAE00F21012 /* CCPActionSheetDemoTests.xctest */,
160 | 7E1EF2331D3FBFAE00F21012 /* CCPActionSheetDemoUITests.xctest */,
161 | );
162 | name = Products;
163 | sourceTree = "";
164 | };
165 | 7E1EF2111D3FBFAE00F21012 /* CCPActionSheetDemo */ = {
166 | isa = PBXGroup;
167 | children = (
168 | 212F5BA01D62DB3400F71FA6 /* Image */,
169 | 210AAB501D5051C000B7EF24 /* Class */,
170 | 210AAB471D5051B100B7EF24 /* CCPActionSheetView */,
171 | 210AAB411D50519F00B7EF24 /* Category */,
172 | 7EFA357B1D4CADE100B686D9 /* CCPMultiplechoiceView */,
173 | 7E1EF21E1D3FBFAE00F21012 /* Assets.xcassets */,
174 | 210AAB571D5051F400B7EF24 /* Main.storyboard */,
175 | 7E1EF2201D3FBFAE00F21012 /* LaunchScreen.storyboard */,
176 | 7E1EF2231D3FBFAE00F21012 /* Info.plist */,
177 | 7E1EF2121D3FBFAE00F21012 /* Supporting Files */,
178 | );
179 | path = CCPActionSheetDemo;
180 | sourceTree = "";
181 | };
182 | 7E1EF2121D3FBFAE00F21012 /* Supporting Files */ = {
183 | isa = PBXGroup;
184 | children = (
185 | 7E1EF2131D3FBFAE00F21012 /* main.m */,
186 | );
187 | name = "Supporting Files";
188 | sourceTree = "";
189 | };
190 | 7E1EF22B1D3FBFAE00F21012 /* CCPActionSheetDemoTests */ = {
191 | isa = PBXGroup;
192 | children = (
193 | 7E1EF22C1D3FBFAE00F21012 /* CCPActionSheetDemoTests.m */,
194 | 7E1EF22E1D3FBFAE00F21012 /* Info.plist */,
195 | );
196 | path = CCPActionSheetDemoTests;
197 | sourceTree = "";
198 | };
199 | 7E1EF2361D3FBFAE00F21012 /* CCPActionSheetDemoUITests */ = {
200 | isa = PBXGroup;
201 | children = (
202 | 7E1EF2371D3FBFAE00F21012 /* CCPActionSheetDemoUITests.m */,
203 | 7E1EF2391D3FBFAE00F21012 /* Info.plist */,
204 | );
205 | path = CCPActionSheetDemoUITests;
206 | sourceTree = "";
207 | };
208 | 7EFA357B1D4CADE100B686D9 /* CCPMultiplechoiceView */ = {
209 | isa = PBXGroup;
210 | children = (
211 | 7EFA357E1D4CAED400B686D9 /* CCPMultipleChoiceCell.h */,
212 | 7EFA357F1D4CAED400B686D9 /* CCPMultipleChoiceCell.m */,
213 | 7EFA35801D4CAED400B686D9 /* CCPMultipleChoiceCell.xib */,
214 | 7EFA35811D4CAED400B686D9 /* CCPMultipleChoiceView.h */,
215 | 7EFA35821D4CAED400B686D9 /* CCPMultipleChoiceView.m */,
216 | );
217 | path = CCPMultiplechoiceView;
218 | sourceTree = "";
219 | };
220 | /* End PBXGroup section */
221 |
222 | /* Begin PBXNativeTarget section */
223 | 7E1EF20E1D3FBFAE00F21012 /* CCPActionSheetDemo */ = {
224 | isa = PBXNativeTarget;
225 | buildConfigurationList = 7E1EF23C1D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemo" */;
226 | buildPhases = (
227 | 7E1EF20B1D3FBFAE00F21012 /* Sources */,
228 | 7E1EF20C1D3FBFAE00F21012 /* Frameworks */,
229 | 7E1EF20D1D3FBFAE00F21012 /* Resources */,
230 | );
231 | buildRules = (
232 | );
233 | dependencies = (
234 | );
235 | name = CCPActionSheetDemo;
236 | productName = CCPActionSheetDemo;
237 | productReference = 7E1EF20F1D3FBFAE00F21012 /* CCPActionSheetDemo.app */;
238 | productType = "com.apple.product-type.application";
239 | };
240 | 7E1EF2271D3FBFAE00F21012 /* CCPActionSheetDemoTests */ = {
241 | isa = PBXNativeTarget;
242 | buildConfigurationList = 7E1EF23F1D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemoTests" */;
243 | buildPhases = (
244 | 7E1EF2241D3FBFAE00F21012 /* Sources */,
245 | 7E1EF2251D3FBFAE00F21012 /* Frameworks */,
246 | 7E1EF2261D3FBFAE00F21012 /* Resources */,
247 | );
248 | buildRules = (
249 | );
250 | dependencies = (
251 | 7E1EF22A1D3FBFAE00F21012 /* PBXTargetDependency */,
252 | );
253 | name = CCPActionSheetDemoTests;
254 | productName = CCPActionSheetDemoTests;
255 | productReference = 7E1EF2281D3FBFAE00F21012 /* CCPActionSheetDemoTests.xctest */;
256 | productType = "com.apple.product-type.bundle.unit-test";
257 | };
258 | 7E1EF2321D3FBFAE00F21012 /* CCPActionSheetDemoUITests */ = {
259 | isa = PBXNativeTarget;
260 | buildConfigurationList = 7E1EF2421D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemoUITests" */;
261 | buildPhases = (
262 | 7E1EF22F1D3FBFAE00F21012 /* Sources */,
263 | 7E1EF2301D3FBFAE00F21012 /* Frameworks */,
264 | 7E1EF2311D3FBFAE00F21012 /* Resources */,
265 | );
266 | buildRules = (
267 | );
268 | dependencies = (
269 | 7E1EF2351D3FBFAE00F21012 /* PBXTargetDependency */,
270 | );
271 | name = CCPActionSheetDemoUITests;
272 | productName = CCPActionSheetDemoUITests;
273 | productReference = 7E1EF2331D3FBFAE00F21012 /* CCPActionSheetDemoUITests.xctest */;
274 | productType = "com.apple.product-type.bundle.ui-testing";
275 | };
276 | /* End PBXNativeTarget section */
277 |
278 | /* Begin PBXProject section */
279 | 7E1EF2071D3FBFAE00F21012 /* Project object */ = {
280 | isa = PBXProject;
281 | attributes = {
282 | LastUpgradeCheck = 0710;
283 | ORGANIZATIONNAME = "C CP";
284 | TargetAttributes = {
285 | 7E1EF20E1D3FBFAE00F21012 = {
286 | CreatedOnToolsVersion = 7.1;
287 | };
288 | 7E1EF2271D3FBFAE00F21012 = {
289 | CreatedOnToolsVersion = 7.1;
290 | TestTargetID = 7E1EF20E1D3FBFAE00F21012;
291 | };
292 | 7E1EF2321D3FBFAE00F21012 = {
293 | CreatedOnToolsVersion = 7.1;
294 | TestTargetID = 7E1EF20E1D3FBFAE00F21012;
295 | };
296 | };
297 | };
298 | buildConfigurationList = 7E1EF20A1D3FBFAE00F21012 /* Build configuration list for PBXProject "CCPActionSheetDemo" */;
299 | compatibilityVersion = "Xcode 3.2";
300 | developmentRegion = English;
301 | hasScannedForEncodings = 0;
302 | knownRegions = (
303 | en,
304 | Base,
305 | );
306 | mainGroup = 7E1EF2061D3FBFAE00F21012;
307 | productRefGroup = 7E1EF2101D3FBFAE00F21012 /* Products */;
308 | projectDirPath = "";
309 | projectRoot = "";
310 | targets = (
311 | 7E1EF20E1D3FBFAE00F21012 /* CCPActionSheetDemo */,
312 | 7E1EF2271D3FBFAE00F21012 /* CCPActionSheetDemoTests */,
313 | 7E1EF2321D3FBFAE00F21012 /* CCPActionSheetDemoUITests */,
314 | );
315 | };
316 | /* End PBXProject section */
317 |
318 | /* Begin PBXResourcesBuildPhase section */
319 | 7E1EF20D1D3FBFAE00F21012 /* Resources */ = {
320 | isa = PBXResourcesBuildPhase;
321 | buildActionMask = 2147483647;
322 | files = (
323 | 210AAB4E1D5051B100B7EF24 /* CCPActionSheetCell.xib in Resources */,
324 | 210AAB591D5051F400B7EF24 /* Main.storyboard in Resources */,
325 | 7EFA35841D4CAED400B686D9 /* CCPMultipleChoiceCell.xib in Resources */,
326 | 7E1EF2221D3FBFAE00F21012 /* LaunchScreen.storyboard in Resources */,
327 | 7E1EF21F1D3FBFAE00F21012 /* Assets.xcassets in Resources */,
328 | 212F5BA21D62DB6600F71FA6 /* CCPActionSheetImage.gif in Resources */,
329 | );
330 | runOnlyForDeploymentPostprocessing = 0;
331 | };
332 | 7E1EF2261D3FBFAE00F21012 /* Resources */ = {
333 | isa = PBXResourcesBuildPhase;
334 | buildActionMask = 2147483647;
335 | files = (
336 | );
337 | runOnlyForDeploymentPostprocessing = 0;
338 | };
339 | 7E1EF2311D3FBFAE00F21012 /* Resources */ = {
340 | isa = PBXResourcesBuildPhase;
341 | buildActionMask = 2147483647;
342 | files = (
343 | );
344 | runOnlyForDeploymentPostprocessing = 0;
345 | };
346 | /* End PBXResourcesBuildPhase section */
347 |
348 | /* Begin PBXSourcesBuildPhase section */
349 | 7E1EF20B1D3FBFAE00F21012 /* Sources */ = {
350 | isa = PBXSourcesBuildPhase;
351 | buildActionMask = 2147483647;
352 | files = (
353 | 210AAB561D5051C000B7EF24 /* ViewController.m in Sources */,
354 | 210AAB4D1D5051B100B7EF24 /* CCPActionSheetCell.m in Sources */,
355 | 210AAB461D50519F00B7EF24 /* UIView+CCPExtension.m in Sources */,
356 | 7EFA35851D4CAED400B686D9 /* CCPMultipleChoiceView.m in Sources */,
357 | 7E1EF2141D3FBFAE00F21012 /* main.m in Sources */,
358 | 210AAB551D5051C000B7EF24 /* AppDelegate.m in Sources */,
359 | 7EFA35831D4CAED400B686D9 /* CCPMultipleChoiceCell.m in Sources */,
360 | 210AAB4F1D5051B100B7EF24 /* CCPActionSheetView.m in Sources */,
361 | 210AAB451D50519F00B7EF24 /* Foundation+Log.m in Sources */,
362 | );
363 | runOnlyForDeploymentPostprocessing = 0;
364 | };
365 | 7E1EF2241D3FBFAE00F21012 /* Sources */ = {
366 | isa = PBXSourcesBuildPhase;
367 | buildActionMask = 2147483647;
368 | files = (
369 | 7E1EF22D1D3FBFAE00F21012 /* CCPActionSheetDemoTests.m in Sources */,
370 | );
371 | runOnlyForDeploymentPostprocessing = 0;
372 | };
373 | 7E1EF22F1D3FBFAE00F21012 /* Sources */ = {
374 | isa = PBXSourcesBuildPhase;
375 | buildActionMask = 2147483647;
376 | files = (
377 | 7E1EF2381D3FBFAE00F21012 /* CCPActionSheetDemoUITests.m in Sources */,
378 | );
379 | runOnlyForDeploymentPostprocessing = 0;
380 | };
381 | /* End PBXSourcesBuildPhase section */
382 |
383 | /* Begin PBXTargetDependency section */
384 | 7E1EF22A1D3FBFAE00F21012 /* PBXTargetDependency */ = {
385 | isa = PBXTargetDependency;
386 | target = 7E1EF20E1D3FBFAE00F21012 /* CCPActionSheetDemo */;
387 | targetProxy = 7E1EF2291D3FBFAE00F21012 /* PBXContainerItemProxy */;
388 | };
389 | 7E1EF2351D3FBFAE00F21012 /* PBXTargetDependency */ = {
390 | isa = PBXTargetDependency;
391 | target = 7E1EF20E1D3FBFAE00F21012 /* CCPActionSheetDemo */;
392 | targetProxy = 7E1EF2341D3FBFAE00F21012 /* PBXContainerItemProxy */;
393 | };
394 | /* End PBXTargetDependency section */
395 |
396 | /* Begin PBXVariantGroup section */
397 | 210AAB571D5051F400B7EF24 /* Main.storyboard */ = {
398 | isa = PBXVariantGroup;
399 | children = (
400 | 210AAB581D5051F400B7EF24 /* Base */,
401 | );
402 | name = Main.storyboard;
403 | sourceTree = "";
404 | };
405 | 7E1EF2201D3FBFAE00F21012 /* LaunchScreen.storyboard */ = {
406 | isa = PBXVariantGroup;
407 | children = (
408 | 7E1EF2211D3FBFAE00F21012 /* Base */,
409 | );
410 | name = LaunchScreen.storyboard;
411 | sourceTree = "";
412 | };
413 | /* End PBXVariantGroup section */
414 |
415 | /* Begin XCBuildConfiguration section */
416 | 7E1EF23A1D3FBFAE00F21012 /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ALWAYS_SEARCH_USER_PATHS = NO;
420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
421 | CLANG_CXX_LIBRARY = "libc++";
422 | CLANG_ENABLE_MODULES = YES;
423 | CLANG_ENABLE_OBJC_ARC = YES;
424 | CLANG_WARN_BOOL_CONVERSION = YES;
425 | CLANG_WARN_CONSTANT_CONVERSION = YES;
426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
427 | CLANG_WARN_EMPTY_BODY = YES;
428 | CLANG_WARN_ENUM_CONVERSION = YES;
429 | CLANG_WARN_INT_CONVERSION = YES;
430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
431 | CLANG_WARN_UNREACHABLE_CODE = YES;
432 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
433 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
434 | COPY_PHASE_STRIP = NO;
435 | DEBUG_INFORMATION_FORMAT = dwarf;
436 | ENABLE_STRICT_OBJC_MSGSEND = YES;
437 | ENABLE_TESTABILITY = YES;
438 | GCC_C_LANGUAGE_STANDARD = gnu99;
439 | GCC_DYNAMIC_NO_PIC = NO;
440 | GCC_NO_COMMON_BLOCKS = YES;
441 | GCC_OPTIMIZATION_LEVEL = 0;
442 | GCC_PREPROCESSOR_DEFINITIONS = (
443 | "DEBUG=1",
444 | "$(inherited)",
445 | );
446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
448 | GCC_WARN_UNDECLARED_SELECTOR = YES;
449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
450 | GCC_WARN_UNUSED_FUNCTION = YES;
451 | GCC_WARN_UNUSED_VARIABLE = YES;
452 | IPHONEOS_DEPLOYMENT_TARGET = 9.1;
453 | MTL_ENABLE_DEBUG_INFO = YES;
454 | ONLY_ACTIVE_ARCH = YES;
455 | SDKROOT = iphoneos;
456 | TARGETED_DEVICE_FAMILY = "1,2";
457 | };
458 | name = Debug;
459 | };
460 | 7E1EF23B1D3FBFAE00F21012 /* Release */ = {
461 | isa = XCBuildConfiguration;
462 | buildSettings = {
463 | ALWAYS_SEARCH_USER_PATHS = NO;
464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
465 | CLANG_CXX_LIBRARY = "libc++";
466 | CLANG_ENABLE_MODULES = YES;
467 | CLANG_ENABLE_OBJC_ARC = YES;
468 | CLANG_WARN_BOOL_CONVERSION = YES;
469 | CLANG_WARN_CONSTANT_CONVERSION = YES;
470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
471 | CLANG_WARN_EMPTY_BODY = YES;
472 | CLANG_WARN_ENUM_CONVERSION = YES;
473 | CLANG_WARN_INT_CONVERSION = YES;
474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
475 | CLANG_WARN_UNREACHABLE_CODE = YES;
476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
478 | COPY_PHASE_STRIP = NO;
479 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
480 | ENABLE_NS_ASSERTIONS = NO;
481 | ENABLE_STRICT_OBJC_MSGSEND = YES;
482 | GCC_C_LANGUAGE_STANDARD = gnu99;
483 | GCC_NO_COMMON_BLOCKS = YES;
484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
486 | GCC_WARN_UNDECLARED_SELECTOR = YES;
487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
488 | GCC_WARN_UNUSED_FUNCTION = YES;
489 | GCC_WARN_UNUSED_VARIABLE = YES;
490 | IPHONEOS_DEPLOYMENT_TARGET = 9.1;
491 | MTL_ENABLE_DEBUG_INFO = NO;
492 | SDKROOT = iphoneos;
493 | TARGETED_DEVICE_FAMILY = "1,2";
494 | VALIDATE_PRODUCT = YES;
495 | };
496 | name = Release;
497 | };
498 | 7E1EF23D1D3FBFAE00F21012 /* Debug */ = {
499 | isa = XCBuildConfiguration;
500 | buildSettings = {
501 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
502 | INFOPLIST_FILE = CCPActionSheetDemo/Info.plist;
503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
504 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemo;
505 | PRODUCT_NAME = "$(TARGET_NAME)";
506 | };
507 | name = Debug;
508 | };
509 | 7E1EF23E1D3FBFAE00F21012 /* Release */ = {
510 | isa = XCBuildConfiguration;
511 | buildSettings = {
512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
513 | INFOPLIST_FILE = CCPActionSheetDemo/Info.plist;
514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
515 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemo;
516 | PRODUCT_NAME = "$(TARGET_NAME)";
517 | };
518 | name = Release;
519 | };
520 | 7E1EF2401D3FBFAE00F21012 /* Debug */ = {
521 | isa = XCBuildConfiguration;
522 | buildSettings = {
523 | BUNDLE_LOADER = "$(TEST_HOST)";
524 | INFOPLIST_FILE = CCPActionSheetDemoTests/Info.plist;
525 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
526 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemoTests;
527 | PRODUCT_NAME = "$(TARGET_NAME)";
528 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCPActionSheetDemo.app/CCPActionSheetDemo";
529 | };
530 | name = Debug;
531 | };
532 | 7E1EF2411D3FBFAE00F21012 /* Release */ = {
533 | isa = XCBuildConfiguration;
534 | buildSettings = {
535 | BUNDLE_LOADER = "$(TEST_HOST)";
536 | INFOPLIST_FILE = CCPActionSheetDemoTests/Info.plist;
537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
538 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemoTests;
539 | PRODUCT_NAME = "$(TARGET_NAME)";
540 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCPActionSheetDemo.app/CCPActionSheetDemo";
541 | };
542 | name = Release;
543 | };
544 | 7E1EF2431D3FBFAE00F21012 /* Debug */ = {
545 | isa = XCBuildConfiguration;
546 | buildSettings = {
547 | INFOPLIST_FILE = CCPActionSheetDemoUITests/Info.plist;
548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
549 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemoUITests;
550 | PRODUCT_NAME = "$(TARGET_NAME)";
551 | TEST_TARGET_NAME = CCPActionSheetDemo;
552 | USES_XCTRUNNER = YES;
553 | };
554 | name = Debug;
555 | };
556 | 7E1EF2441D3FBFAE00F21012 /* Release */ = {
557 | isa = XCBuildConfiguration;
558 | buildSettings = {
559 | INFOPLIST_FILE = CCPActionSheetDemoUITests/Info.plist;
560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
561 | PRODUCT_BUNDLE_IDENTIFIER = com.ccp.CCPActionSheetDemoUITests;
562 | PRODUCT_NAME = "$(TARGET_NAME)";
563 | TEST_TARGET_NAME = CCPActionSheetDemo;
564 | USES_XCTRUNNER = YES;
565 | };
566 | name = Release;
567 | };
568 | /* End XCBuildConfiguration section */
569 |
570 | /* Begin XCConfigurationList section */
571 | 7E1EF20A1D3FBFAE00F21012 /* Build configuration list for PBXProject "CCPActionSheetDemo" */ = {
572 | isa = XCConfigurationList;
573 | buildConfigurations = (
574 | 7E1EF23A1D3FBFAE00F21012 /* Debug */,
575 | 7E1EF23B1D3FBFAE00F21012 /* Release */,
576 | );
577 | defaultConfigurationIsVisible = 0;
578 | defaultConfigurationName = Release;
579 | };
580 | 7E1EF23C1D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemo" */ = {
581 | isa = XCConfigurationList;
582 | buildConfigurations = (
583 | 7E1EF23D1D3FBFAE00F21012 /* Debug */,
584 | 7E1EF23E1D3FBFAE00F21012 /* Release */,
585 | );
586 | defaultConfigurationIsVisible = 0;
587 | defaultConfigurationName = Release;
588 | };
589 | 7E1EF23F1D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemoTests" */ = {
590 | isa = XCConfigurationList;
591 | buildConfigurations = (
592 | 7E1EF2401D3FBFAE00F21012 /* Debug */,
593 | 7E1EF2411D3FBFAE00F21012 /* Release */,
594 | );
595 | defaultConfigurationIsVisible = 0;
596 | defaultConfigurationName = Release;
597 | };
598 | 7E1EF2421D3FBFAE00F21012 /* Build configuration list for PBXNativeTarget "CCPActionSheetDemoUITests" */ = {
599 | isa = XCConfigurationList;
600 | buildConfigurations = (
601 | 7E1EF2431D3FBFAE00F21012 /* Debug */,
602 | 7E1EF2441D3FBFAE00F21012 /* Release */,
603 | );
604 | defaultConfigurationIsVisible = 0;
605 | defaultConfigurationName = Release;
606 | };
607 | /* End XCConfigurationList section */
608 | };
609 | rootObject = 7E1EF2071D3FBFAE00F21012 /* Project object */;
610 | }
611 |
--------------------------------------------------------------------------------