├── 1.gif
├── AssociationMenuViewTest
├── AssociationMenuViewTest.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
├── AssociationMenuViewTest
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.m
│ ├── AppDelegate.m
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.xib
└── AssociationMenuViewTestTests
│ ├── Info.plist
│ └── AssociationMenuViewTestTests.m
├── .gitignore
├── LICENSE
├── README.MD
├── SkyAssociationMenuView.h
└── SkyAssociationMenuView.m
/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skytoup/SkyAssociationMenuView/HEAD/1.gif
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AssociationMenuViewTest
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AssociationMenuViewTest
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. 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 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AssociationMenuViewTest
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. 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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "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 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTestTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.skytoup.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 skytoup
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTestTests/AssociationMenuViewTestTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // AssociationMenuViewTestTests.m
3 | // AssociationMenuViewTestTests
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AssociationMenuViewTestTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation AssociationMenuViewTestTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/README.MD:
--------------------------------------------------------------------------------
1 | # SkyAssociationMenuView
2 | ###测试环境:Xcode 6,iOS 7.0以上。
3 | 以前做一个项目准备用来当做地区选择用的,后来没用上。。。。。
4 |
5 | 
6 |
7 | -----
8 | ##联系方式
9 | * QQ:875766917,请备注
10 | * Mail:875766917@qq.com
11 |
12 | -----
13 | ##开源协议(License)
14 | The MIT License (MIT)
15 |
16 | Copyright (c) 2015 skytoup
17 |
18 | Permission is hereby granted, free of charge, to any person obtaining a copy
19 | of this software and associated documentation files (the "Software"), to deal
20 | in the Software without restriction, including without limitation the rights
21 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22 | copies of the Software, and to permit persons to whom the Software is
23 | furnished to do so, subject to the following conditions:
24 |
25 | The above copyright notice and this permission notice shall be included in all
26 | copies or substantial portions of the Software.
27 |
28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 | SOFTWARE.
35 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.skytoup.$(PRODUCT_NAME:rfc1034identifier)
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 |
40 |
41 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // AssociationMenuViewTest
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "SkyAssociationMenuView.h"
11 |
12 | @interface ViewController ()
13 | @property (strong, nonatomic) SkyAssociationMenuView *v;
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | _v = [SkyAssociationMenuView new];
22 | _v.delegate = self;
23 | }
24 |
25 | - (void)didReceiveMemoryWarning {
26 | [super didReceiveMemoryWarning];
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 | - (IBAction)testClick:(id)sender {
31 | [_v showAsDrawDownView:sender];
32 | }
33 |
34 | - (NSInteger)assciationMenuView:(SkyAssociationMenuView*)asView countForClass:(NSInteger)idx {
35 | NSLog(@"choose %ld", idx);
36 | return 10;
37 | }
38 |
39 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1 {
40 | NSLog(@"title %ld", idx_1);
41 | return [NSString stringWithFormat:@"title %ld", idx_1];
42 | }
43 |
44 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1 class_2:(NSInteger)idx_2 {
45 | NSLog(@"title %ld, %ld", idx_1, idx_2);
46 | return [NSString stringWithFormat:@"title %ld, %ld", idx_1, idx_2];
47 | }
48 |
49 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1 class_2:(NSInteger)idx_2 class_3:(NSInteger)idx_3 {
50 | NSLog(@"title %ld, %ld, %ld", idx_1, idx_2, idx_3);
51 | return [NSString stringWithFormat:@"%ld,%ld,%ld", idx_1, idx_2, idx_3];
52 | }
53 | @end
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // AssociationMenuViewTest
4 | //
5 | // Created by skytoup on 15/6/19.
6 | // Copyright (c) 2015年 skytoup. 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 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/SkyAssociationMenuView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SkyAssociationMenuView.h
3 | // iOSTest
4 | //
5 | // Created by skytoup on 14-10-24.
6 | // Copyright (c) 2014年 skytoup. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) // 获取屏幕宽度
12 | #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) // 获取屏幕高度
13 |
14 | @class SkyAssociationMenuView;
15 |
16 | @protocol SkyAssociationMenuViewDelegate
17 | /**
18 | * 获取第class级菜单的数据数量
19 | *
20 | * @param asView 联想菜单
21 | * @param idx 第几级
22 | *
23 | * @return 第class级菜单的数据数量
24 | */
25 | - (NSInteger)assciationMenuView:(SkyAssociationMenuView*)asView countForClass:(NSInteger)idx;
26 |
27 | /**
28 | * 获取第一级菜单选项的title
29 | *
30 | * @param asView 联想菜单
31 | * @param idx_1 第一级
32 | *
33 | * @return 标题
34 | */
35 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1;
36 |
37 | /**
38 | * 获取第二级菜单选项的title
39 | *
40 | * @param asView 联想菜单
41 | * @param idx_1 第一级
42 | * @param idx_2 第二级
43 | *
44 | * @return 标题
45 | */
46 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1 class_2:(NSInteger)idx_2;
47 |
48 | /**
49 | * 获取第三级菜单选项的title
50 | *
51 | * @param asView 联想菜单
52 | * @param idx_1 第一级
53 | * @param idx_2 第二级
54 | * @param idx_3 第三级
55 | *
56 | * @return 标题
57 | */
58 | - (NSString*)assciationMenuView:(SkyAssociationMenuView*)asView titleForClass_1:(NSInteger)idx_1 class_2:(NSInteger)idx_2 class_3:(NSInteger)idx_3;
59 | @optional
60 | /**
61 | * 取消选择
62 | */
63 | - (void)assciationMenuViewCancel;
64 |
65 | /**
66 | * 选择第一级菜单
67 | *
68 | * @param asView 联想菜单
69 | * @param idx_1 第一级
70 | *
71 | * @return 是否展示下一级
72 | */
73 | - (BOOL)assciationMenuView:(SkyAssociationMenuView*)asView idxChooseInClass1:(NSInteger)idx_1;
74 | /**
75 | * 选择第二级菜单
76 | *
77 | * @param asView 联想菜单
78 | * @param idx_1 第一级
79 | * @param idx_2 第二级
80 | *
81 | * @return 是否展示下一级
82 | */
83 | - (BOOL)assciationMenuView:(SkyAssociationMenuView*)asView idxChooseInClass1:(NSInteger)idx_1 class2:(NSInteger)idx_2;
84 | /**
85 | * 选择第三级菜单
86 | *
87 | * @param asView 联想菜单
88 | * @param idx_1 第一级
89 | * @param idx_2 第二级
90 | * @param idx_3 第三级
91 | *
92 | * @return 是否dismiss
93 | */
94 | - (BOOL)assciationMenuView:(SkyAssociationMenuView*)asView idxChooseInClass1:(NSInteger)idx_1 class2:(NSInteger)idx_2 class3:(NSInteger)idx_3;
95 | @end
96 |
97 | /**
98 | * 三级联动菜单
99 | */
100 | @interface SkyAssociationMenuView : UIView{
101 | @private
102 | NSInteger sels[3];
103 | }
104 | extern __strong NSString *const IDENTIFIER;
105 |
106 | - (instancetype)initWithFrame:(CGRect)frame __attribute__((availability(ios, introduced=1.0,deprecated=1.0,obsoleted=1.0)));
107 | - (instancetype)initWithCoder:(NSCoder *)aDecoder __attribute__((availability(ios, introduced=1.0,deprecated=1.0,obsoleted=1.0)));
108 |
109 | @property (weak,nonatomic) id delegate;
110 | /**
111 | * 设置选中项,-1为未选中
112 | *
113 | * @param idx_1 第一级选中项
114 | * @param idx_2 第二级选中项
115 | * @param idx_3 第三级选中项
116 | */
117 | - (void)setSelectIndexForClass1:(NSInteger)idx_1 class2:(NSInteger)idx_2 class3:(NSInteger)idx_3;
118 | /**
119 | * 菜单显示在View的下面
120 | *
121 | * @param view 显示在该view下
122 | */
123 | - (void)showAsDrawDownView:(UIView*) view;
124 | /**
125 | * 隐藏菜单
126 | */
127 | - (void)dismiss;
128 | @end
129 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SkyAssociationMenuView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SkyAssociationMenuView.m
3 | //
4 | // Created by skytoup on 14-10-24.
5 | // Copyright (c) 2014年 skytoup. All rights reserved.
6 | //
7 |
8 | #import "SkyAssociationMenuView.h"
9 |
10 | NSString *const IDENTIFIER = @"CELL";
11 |
12 | @interface SkyAssociationMenuView ()
13 | {
14 | NSArray *tables;
15 | UIView *bgView;
16 | }
17 | @end
18 |
19 | @implementation SkyAssociationMenuView
20 |
21 | - (instancetype)initWithCoder:(NSCoder *)aDecoder {
22 | NSAssert(false, @"cann't not use - initWithCoder:, please user - init");
23 | return nil;
24 | }
25 |
26 | - (instancetype)init
27 | {
28 | self = [super init];
29 | if (self) {
30 | // 初始化选择项
31 | for(int i=0; i!=3; ++i) {
32 | sels[i] = -1;
33 | }
34 | self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
35 | self.userInteractionEnabled = YES;
36 | UIButton *cancelBtn = [UIButton buttonWithType:UIButtonTypeCustom];
37 | cancelBtn.frame = self.frame;
38 | [cancelBtn addTarget:self action:@selector(cancel) forControlEvents:UIControlEventTouchUpInside];
39 | [self addSubview:cancelBtn];
40 | // 初始化菜单
41 | tables = @[[[UITableView alloc] init], [[UITableView alloc] init], [[UITableView alloc] init] ];
42 | [tables enumerateObjectsUsingBlock:^(UITableView *table, NSUInteger idx, BOOL *stop) {
43 | [table registerClass:[UITableViewCell class] forCellReuseIdentifier:IDENTIFIER ];
44 | table.dataSource = self;
45 | table.delegate = self;
46 | table.frame = CGRectMake(0, 0, 0, 0);
47 | table.backgroundColor = [UIColor clearColor];
48 | table.tableFooterView = [UIView new];
49 | }];
50 | bgView = [[UIView alloc] init];
51 | bgView.backgroundColor = [UIColor colorWithRed:.0f green:.0f blue:.0f alpha:.3f];
52 | bgView.userInteractionEnabled = YES;
53 | [bgView addSubview:[tables objectAtIndex:0] ];
54 |
55 | }
56 | return self;
57 | }
58 |
59 | #pragma mark private
60 | /**
61 | * 调整表视图的位置、大小
62 | */
63 | - (void)adjustTableViews{
64 | int w = SCREEN_WIDTH;
65 | int __block showTableCount = 0;
66 | [tables enumerateObjectsUsingBlock:^(UITableView *t, NSUInteger idx, BOOL *stop) {
67 | CGRect rect = t.frame;
68 | rect.size.height = SCREEN_HEIGHT - bgView.frame.origin.y;
69 | t.frame = rect;
70 | if(t.superview)
71 | ++showTableCount;
72 | }];
73 |
74 | for(int i=0; i!=showTableCount; ++i){
75 | UITableView *t = [tables objectAtIndex:i];
76 | CGRect f = t.frame;
77 | f.size.width = w / showTableCount;
78 | f.origin.x = f.size.width * i;
79 | t.frame = f;
80 | }
81 | }
82 | /**
83 | * 取消选择
84 | */
85 | - (void)cancel{
86 | [self dismiss];
87 | if([self.delegate respondsToSelector:@selector(assciationMenuViewCancel)]) {
88 | [self.delegate assciationMenuViewCancel];
89 | }
90 | }
91 |
92 | /**
93 | * 保存table选中项
94 | */
95 | - (void)saveSels{
96 | [tables enumerateObjectsUsingBlock:^(UITableView *t, NSUInteger idx, BOOL *stop) {
97 | sels[idx] = t.superview ? t.indexPathForSelectedRow.row : -1;
98 | }];
99 | }
100 |
101 | /**
102 | * 加载保存的选中项
103 | */
104 | - (void)loadSels{
105 | [tables enumerateObjectsUsingBlock:^(UITableView *t, NSUInteger i, BOOL *stop) {
106 | [t selectRowAtIndexPath:[NSIndexPath indexPathForRow:sels[i] inSection:0] animated:NO scrollPosition:UITableViewScrollPositionNone];
107 | if((sels[i] != -1 && !t.superview) || !i) {
108 | [bgView addSubview:t];
109 | }
110 | }];
111 | }
112 |
113 | #pragma mark public
114 | - (void)setSelectIndexForClass1:(NSInteger)idx_1 class2:(NSInteger)idx_2 class3:(NSInteger)idx_3 {
115 | sels[0] = idx_1;
116 | sels[1] = idx_2;
117 | sels[2] = idx_3;
118 | }
119 |
120 | - (void)showAsDrawDownView:(UIView *)view {
121 | UIWindow *window = [[UIApplication sharedApplication] keyWindow];
122 | CGRect showFrame = view.frame;
123 | showFrame = [view.superview convertRect:showFrame toView:window];
124 | CGFloat x = 0.f;
125 | CGFloat y = showFrame.origin.y+showFrame.size.height;
126 | CGFloat w = SCREEN_WIDTH;
127 | CGFloat h = SCREEN_HEIGHT-y;
128 | bgView.frame = CGRectMake(x, y, w, h);
129 | if(!bgView.superview) {
130 | [self addSubview:bgView];
131 | }
132 | [self loadSels];
133 | [self adjustTableViews];
134 | if(!self.superview) {
135 | [window addSubview:self];
136 | self.alpha = .0f;
137 | [UIView animateWithDuration:.25f animations:^{
138 | self.alpha = 1.0f;
139 | }];
140 | }
141 | [window bringSubviewToFront:self];
142 | }
143 |
144 | - (void)dismiss{
145 | if(self.superview) {
146 | [UIView animateWithDuration:.25f animations:^{
147 | self.alpha = .0f;
148 | } completion:^(BOOL finished) {
149 | [bgView.subviews enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) {
150 | [obj removeFromSuperview];
151 | }];
152 | [self removeFromSuperview];
153 | }];
154 | }
155 | }
156 |
157 | #pragma mark UITableViewDateSourceDelegate
158 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
159 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:IDENTIFIER];
160 | if(tableView == [tables objectAtIndex:0]){
161 | cell.textLabel.text = [_delegate assciationMenuView:self titleForClass_1:indexPath.row];
162 | }else if(tableView == [tables objectAtIndex:1]){
163 | cell.textLabel.text = [_delegate assciationMenuView:self titleForClass_1:((UITableView*)tables[0]).indexPathForSelectedRow.row class_2:indexPath.row];
164 | }else if(tableView == [tables objectAtIndex:2]){
165 | cell.textLabel.text = [_delegate assciationMenuView:self titleForClass_1:((UITableView*)tables[0]).indexPathForSelectedRow.row class_2:((UITableView*)tables[1]).indexPathForSelectedRow.row class_3:indexPath.row];
166 | }
167 | return cell;
168 | }
169 |
170 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
171 | NSInteger __block count;
172 | [tables enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
173 | if(obj == tableView) {
174 | count = [_delegate assciationMenuView:self countForClass:idx];
175 | *stop = YES;
176 | }
177 | }];
178 | return count;
179 | }
180 |
181 | #pragma mark UITableViewDelegate
182 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
183 | UITableView *t0 = [tables objectAtIndex:0];
184 | UITableView *t1 = [tables objectAtIndex:1];
185 | UITableView *t2 = [tables objectAtIndex:2];
186 | BOOL isNexClass = true;
187 | if(tableView == t0){
188 | if([self.delegate respondsToSelector:@selector(assciationMenuView:idxChooseInClass1:)]) {
189 | isNexClass = [_delegate assciationMenuView:self idxChooseInClass1:indexPath.row];
190 | }
191 | if(isNexClass) {
192 | [t1 reloadData];
193 | if(!t1.superview) {
194 | [bgView addSubview:t1];
195 | }
196 | if(t2.superview) {
197 | [t2 removeFromSuperview];
198 | }
199 | [self adjustTableViews];
200 | }else{
201 | if(t1.superview) {
202 | [t1 removeFromSuperview];
203 | }
204 | if(t2.superview) {
205 | [t2 removeFromSuperview];
206 | }
207 | [self saveSels];
208 | [self dismiss];
209 | }
210 | }else if(tableView == t1) {
211 | if([self.delegate respondsToSelector:@selector(assciationMenuView:idxChooseInClass1:class2:)]) {
212 | isNexClass = [_delegate assciationMenuView:self idxChooseInClass1:t0.indexPathForSelectedRow.row class2:indexPath.row];
213 | }
214 | if(isNexClass){
215 | [t2 reloadData];
216 | if(!t2.superview) {
217 | [bgView addSubview:t2];
218 | }
219 | [self adjustTableViews];
220 | }else{
221 | if(t2.superview) {
222 | [t2 removeFromSuperview];
223 | }
224 | [self saveSels];
225 | [self dismiss];
226 | }
227 | }else if(tableView == t2) {
228 | if([self.delegate respondsToSelector:@selector(assciationMenuView:idxChooseInClass1:class2:class3:)]) {
229 | isNexClass = [_delegate assciationMenuView:self idxChooseInClass1:t0.indexPathForSelectedRow.row class2:t1.indexPathForSelectedRow.row class3:indexPath.row];
230 | }
231 | if(isNexClass) {
232 | [self saveSels];
233 | [self dismiss];
234 | }
235 | }
236 | }
237 |
238 | @end
239 |
--------------------------------------------------------------------------------
/AssociationMenuViewTest/AssociationMenuViewTest.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 182E41A51B33E34400473F78 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 182E41A41B33E34400473F78 /* main.m */; };
11 | 182E41A81B33E34400473F78 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 182E41A71B33E34400473F78 /* AppDelegate.m */; };
12 | 182E41AB1B33E34400473F78 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 182E41AA1B33E34400473F78 /* ViewController.m */; };
13 | 182E41AE1B33E34400473F78 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 182E41AC1B33E34400473F78 /* Main.storyboard */; };
14 | 182E41B01B33E34400473F78 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 182E41AF1B33E34400473F78 /* Images.xcassets */; };
15 | 182E41B31B33E34400473F78 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 182E41B11B33E34400473F78 /* LaunchScreen.xib */; };
16 | 182E41BF1B33E34400473F78 /* AssociationMenuViewTestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 182E41BE1B33E34400473F78 /* AssociationMenuViewTestTests.m */; };
17 | 182E41E61B33E38700473F78 /* SkyAssociationMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 182E41E51B33E38700473F78 /* SkyAssociationMenuView.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 182E41B91B33E34400473F78 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 182E41971B33E34400473F78 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 182E419E1B33E34400473F78;
26 | remoteInfo = AssociationMenuViewTest;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | 182E419F1B33E34400473F78 /* AssociationMenuViewTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AssociationMenuViewTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 182E41A31B33E34400473F78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | 182E41A41B33E34400473F78 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
34 | 182E41A61B33E34400473F78 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
35 | 182E41A71B33E34400473F78 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
36 | 182E41A91B33E34400473F78 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
37 | 182E41AA1B33E34400473F78 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
38 | 182E41AD1B33E34400473F78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
39 | 182E41AF1B33E34400473F78 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
40 | 182E41B21B33E34400473F78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
41 | 182E41B81B33E34400473F78 /* AssociationMenuViewTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AssociationMenuViewTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 182E41BD1B33E34400473F78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | 182E41BE1B33E34400473F78 /* AssociationMenuViewTestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AssociationMenuViewTestTests.m; sourceTree = ""; };
44 | 182E41E41B33E38700473F78 /* SkyAssociationMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkyAssociationMenuView.h; path = ../../SkyAssociationMenuView.h; sourceTree = ""; };
45 | 182E41E51B33E38700473F78 /* SkyAssociationMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkyAssociationMenuView.m; path = ../../SkyAssociationMenuView.m; sourceTree = ""; };
46 | /* End PBXFileReference section */
47 |
48 | /* Begin PBXFrameworksBuildPhase section */
49 | 182E419C1B33E34400473F78 /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | 182E41B51B33E34400473F78 /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | /* End PBXFrameworksBuildPhase section */
64 |
65 | /* Begin PBXGroup section */
66 | 182E41961B33E34400473F78 = {
67 | isa = PBXGroup;
68 | children = (
69 | 182E41A11B33E34400473F78 /* AssociationMenuViewTest */,
70 | 182E41BB1B33E34400473F78 /* AssociationMenuViewTestTests */,
71 | 182E41A01B33E34400473F78 /* Products */,
72 | );
73 | sourceTree = "";
74 | };
75 | 182E41A01B33E34400473F78 /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 182E419F1B33E34400473F78 /* AssociationMenuViewTest.app */,
79 | 182E41B81B33E34400473F78 /* AssociationMenuViewTestTests.xctest */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | 182E41A11B33E34400473F78 /* AssociationMenuViewTest */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 182E41E71B33E39100473F78 /* AssociationMenuView */,
88 | 182E41A61B33E34400473F78 /* AppDelegate.h */,
89 | 182E41A71B33E34400473F78 /* AppDelegate.m */,
90 | 182E41A91B33E34400473F78 /* ViewController.h */,
91 | 182E41AA1B33E34400473F78 /* ViewController.m */,
92 | 182E41AC1B33E34400473F78 /* Main.storyboard */,
93 | 182E41AF1B33E34400473F78 /* Images.xcassets */,
94 | 182E41B11B33E34400473F78 /* LaunchScreen.xib */,
95 | 182E41A21B33E34400473F78 /* Supporting Files */,
96 | );
97 | path = AssociationMenuViewTest;
98 | sourceTree = "";
99 | };
100 | 182E41A21B33E34400473F78 /* Supporting Files */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 182E41A31B33E34400473F78 /* Info.plist */,
104 | 182E41A41B33E34400473F78 /* main.m */,
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | 182E41BB1B33E34400473F78 /* AssociationMenuViewTestTests */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 182E41BE1B33E34400473F78 /* AssociationMenuViewTestTests.m */,
113 | 182E41BC1B33E34400473F78 /* Supporting Files */,
114 | );
115 | path = AssociationMenuViewTestTests;
116 | sourceTree = "";
117 | };
118 | 182E41BC1B33E34400473F78 /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 182E41BD1B33E34400473F78 /* Info.plist */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | 182E41E71B33E39100473F78 /* AssociationMenuView */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 182E41E41B33E38700473F78 /* SkyAssociationMenuView.h */,
130 | 182E41E51B33E38700473F78 /* SkyAssociationMenuView.m */,
131 | );
132 | name = AssociationMenuView;
133 | sourceTree = "";
134 | };
135 | /* End PBXGroup section */
136 |
137 | /* Begin PBXNativeTarget section */
138 | 182E419E1B33E34400473F78 /* AssociationMenuViewTest */ = {
139 | isa = PBXNativeTarget;
140 | buildConfigurationList = 182E41C21B33E34400473F78 /* Build configuration list for PBXNativeTarget "AssociationMenuViewTest" */;
141 | buildPhases = (
142 | 182E419B1B33E34400473F78 /* Sources */,
143 | 182E419C1B33E34400473F78 /* Frameworks */,
144 | 182E419D1B33E34400473F78 /* Resources */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | );
150 | name = AssociationMenuViewTest;
151 | productName = AssociationMenuViewTest;
152 | productReference = 182E419F1B33E34400473F78 /* AssociationMenuViewTest.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | 182E41B71B33E34400473F78 /* AssociationMenuViewTestTests */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 182E41C51B33E34400473F78 /* Build configuration list for PBXNativeTarget "AssociationMenuViewTestTests" */;
158 | buildPhases = (
159 | 182E41B41B33E34400473F78 /* Sources */,
160 | 182E41B51B33E34400473F78 /* Frameworks */,
161 | 182E41B61B33E34400473F78 /* Resources */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | 182E41BA1B33E34400473F78 /* PBXTargetDependency */,
167 | );
168 | name = AssociationMenuViewTestTests;
169 | productName = AssociationMenuViewTestTests;
170 | productReference = 182E41B81B33E34400473F78 /* AssociationMenuViewTestTests.xctest */;
171 | productType = "com.apple.product-type.bundle.unit-test";
172 | };
173 | /* End PBXNativeTarget section */
174 |
175 | /* Begin PBXProject section */
176 | 182E41971B33E34400473F78 /* Project object */ = {
177 | isa = PBXProject;
178 | attributes = {
179 | LastUpgradeCheck = 0630;
180 | ORGANIZATIONNAME = skytoup;
181 | TargetAttributes = {
182 | 182E419E1B33E34400473F78 = {
183 | CreatedOnToolsVersion = 6.4;
184 | };
185 | 182E41B71B33E34400473F78 = {
186 | CreatedOnToolsVersion = 6.4;
187 | TestTargetID = 182E419E1B33E34400473F78;
188 | };
189 | };
190 | };
191 | buildConfigurationList = 182E419A1B33E34400473F78 /* Build configuration list for PBXProject "AssociationMenuViewTest" */;
192 | compatibilityVersion = "Xcode 3.2";
193 | developmentRegion = English;
194 | hasScannedForEncodings = 0;
195 | knownRegions = (
196 | en,
197 | Base,
198 | );
199 | mainGroup = 182E41961B33E34400473F78;
200 | productRefGroup = 182E41A01B33E34400473F78 /* Products */;
201 | projectDirPath = "";
202 | projectRoot = "";
203 | targets = (
204 | 182E419E1B33E34400473F78 /* AssociationMenuViewTest */,
205 | 182E41B71B33E34400473F78 /* AssociationMenuViewTestTests */,
206 | );
207 | };
208 | /* End PBXProject section */
209 |
210 | /* Begin PBXResourcesBuildPhase section */
211 | 182E419D1B33E34400473F78 /* Resources */ = {
212 | isa = PBXResourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 182E41AE1B33E34400473F78 /* Main.storyboard in Resources */,
216 | 182E41B31B33E34400473F78 /* LaunchScreen.xib in Resources */,
217 | 182E41B01B33E34400473F78 /* Images.xcassets in Resources */,
218 | );
219 | runOnlyForDeploymentPostprocessing = 0;
220 | };
221 | 182E41B61B33E34400473F78 /* Resources */ = {
222 | isa = PBXResourcesBuildPhase;
223 | buildActionMask = 2147483647;
224 | files = (
225 | );
226 | runOnlyForDeploymentPostprocessing = 0;
227 | };
228 | /* End PBXResourcesBuildPhase section */
229 |
230 | /* Begin PBXSourcesBuildPhase section */
231 | 182E419B1B33E34400473F78 /* Sources */ = {
232 | isa = PBXSourcesBuildPhase;
233 | buildActionMask = 2147483647;
234 | files = (
235 | 182E41AB1B33E34400473F78 /* ViewController.m in Sources */,
236 | 182E41A81B33E34400473F78 /* AppDelegate.m in Sources */,
237 | 182E41A51B33E34400473F78 /* main.m in Sources */,
238 | 182E41E61B33E38700473F78 /* SkyAssociationMenuView.m in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | 182E41B41B33E34400473F78 /* Sources */ = {
243 | isa = PBXSourcesBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | 182E41BF1B33E34400473F78 /* AssociationMenuViewTestTests.m in Sources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | /* End PBXSourcesBuildPhase section */
251 |
252 | /* Begin PBXTargetDependency section */
253 | 182E41BA1B33E34400473F78 /* PBXTargetDependency */ = {
254 | isa = PBXTargetDependency;
255 | target = 182E419E1B33E34400473F78 /* AssociationMenuViewTest */;
256 | targetProxy = 182E41B91B33E34400473F78 /* PBXContainerItemProxy */;
257 | };
258 | /* End PBXTargetDependency section */
259 |
260 | /* Begin PBXVariantGroup section */
261 | 182E41AC1B33E34400473F78 /* Main.storyboard */ = {
262 | isa = PBXVariantGroup;
263 | children = (
264 | 182E41AD1B33E34400473F78 /* Base */,
265 | );
266 | name = Main.storyboard;
267 | sourceTree = "";
268 | };
269 | 182E41B11B33E34400473F78 /* LaunchScreen.xib */ = {
270 | isa = PBXVariantGroup;
271 | children = (
272 | 182E41B21B33E34400473F78 /* Base */,
273 | );
274 | name = LaunchScreen.xib;
275 | sourceTree = "";
276 | };
277 | /* End PBXVariantGroup section */
278 |
279 | /* Begin XCBuildConfiguration section */
280 | 182E41C01B33E34400473F78 /* Debug */ = {
281 | isa = XCBuildConfiguration;
282 | buildSettings = {
283 | ALWAYS_SEARCH_USER_PATHS = NO;
284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
285 | CLANG_CXX_LIBRARY = "libc++";
286 | CLANG_ENABLE_MODULES = YES;
287 | CLANG_ENABLE_OBJC_ARC = YES;
288 | CLANG_WARN_BOOL_CONVERSION = YES;
289 | CLANG_WARN_CONSTANT_CONVERSION = YES;
290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
291 | CLANG_WARN_EMPTY_BODY = YES;
292 | CLANG_WARN_ENUM_CONVERSION = YES;
293 | CLANG_WARN_INT_CONVERSION = YES;
294 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
295 | CLANG_WARN_UNREACHABLE_CODE = YES;
296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
297 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
298 | COPY_PHASE_STRIP = NO;
299 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
300 | ENABLE_STRICT_OBJC_MSGSEND = YES;
301 | GCC_C_LANGUAGE_STANDARD = gnu99;
302 | GCC_DYNAMIC_NO_PIC = NO;
303 | GCC_NO_COMMON_BLOCKS = YES;
304 | GCC_OPTIMIZATION_LEVEL = 0;
305 | GCC_PREPROCESSOR_DEFINITIONS = (
306 | "DEBUG=1",
307 | "$(inherited)",
308 | );
309 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
312 | GCC_WARN_UNDECLARED_SELECTOR = YES;
313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
314 | GCC_WARN_UNUSED_FUNCTION = YES;
315 | GCC_WARN_UNUSED_VARIABLE = YES;
316 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
317 | MTL_ENABLE_DEBUG_INFO = YES;
318 | ONLY_ACTIVE_ARCH = YES;
319 | SDKROOT = iphoneos;
320 | };
321 | name = Debug;
322 | };
323 | 182E41C11B33E34400473F78 /* Release */ = {
324 | isa = XCBuildConfiguration;
325 | buildSettings = {
326 | ALWAYS_SEARCH_USER_PATHS = NO;
327 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
328 | CLANG_CXX_LIBRARY = "libc++";
329 | CLANG_ENABLE_MODULES = YES;
330 | CLANG_ENABLE_OBJC_ARC = YES;
331 | CLANG_WARN_BOOL_CONVERSION = YES;
332 | CLANG_WARN_CONSTANT_CONVERSION = YES;
333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
334 | CLANG_WARN_EMPTY_BODY = YES;
335 | CLANG_WARN_ENUM_CONVERSION = YES;
336 | CLANG_WARN_INT_CONVERSION = YES;
337 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
338 | CLANG_WARN_UNREACHABLE_CODE = YES;
339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
340 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
341 | COPY_PHASE_STRIP = NO;
342 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
343 | ENABLE_NS_ASSERTIONS = NO;
344 | ENABLE_STRICT_OBJC_MSGSEND = YES;
345 | GCC_C_LANGUAGE_STANDARD = gnu99;
346 | GCC_NO_COMMON_BLOCKS = YES;
347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
349 | GCC_WARN_UNDECLARED_SELECTOR = YES;
350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
351 | GCC_WARN_UNUSED_FUNCTION = YES;
352 | GCC_WARN_UNUSED_VARIABLE = YES;
353 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
354 | MTL_ENABLE_DEBUG_INFO = NO;
355 | SDKROOT = iphoneos;
356 | VALIDATE_PRODUCT = YES;
357 | };
358 | name = Release;
359 | };
360 | 182E41C31B33E34400473F78 /* Debug */ = {
361 | isa = XCBuildConfiguration;
362 | buildSettings = {
363 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
364 | INFOPLIST_FILE = AssociationMenuViewTest/Info.plist;
365 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
367 | PRODUCT_NAME = "$(TARGET_NAME)";
368 | };
369 | name = Debug;
370 | };
371 | 182E41C41B33E34400473F78 /* Release */ = {
372 | isa = XCBuildConfiguration;
373 | buildSettings = {
374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
375 | INFOPLIST_FILE = AssociationMenuViewTest/Info.plist;
376 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
378 | PRODUCT_NAME = "$(TARGET_NAME)";
379 | };
380 | name = Release;
381 | };
382 | 182E41C61B33E34400473F78 /* Debug */ = {
383 | isa = XCBuildConfiguration;
384 | buildSettings = {
385 | BUNDLE_LOADER = "$(TEST_HOST)";
386 | FRAMEWORK_SEARCH_PATHS = (
387 | "$(SDKROOT)/Developer/Library/Frameworks",
388 | "$(inherited)",
389 | );
390 | GCC_PREPROCESSOR_DEFINITIONS = (
391 | "DEBUG=1",
392 | "$(inherited)",
393 | );
394 | INFOPLIST_FILE = AssociationMenuViewTestTests/Info.plist;
395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
396 | PRODUCT_NAME = "$(TARGET_NAME)";
397 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AssociationMenuViewTest.app/AssociationMenuViewTest";
398 | };
399 | name = Debug;
400 | };
401 | 182E41C71B33E34400473F78 /* Release */ = {
402 | isa = XCBuildConfiguration;
403 | buildSettings = {
404 | BUNDLE_LOADER = "$(TEST_HOST)";
405 | FRAMEWORK_SEARCH_PATHS = (
406 | "$(SDKROOT)/Developer/Library/Frameworks",
407 | "$(inherited)",
408 | );
409 | INFOPLIST_FILE = AssociationMenuViewTestTests/Info.plist;
410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
411 | PRODUCT_NAME = "$(TARGET_NAME)";
412 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AssociationMenuViewTest.app/AssociationMenuViewTest";
413 | };
414 | name = Release;
415 | };
416 | /* End XCBuildConfiguration section */
417 |
418 | /* Begin XCConfigurationList section */
419 | 182E419A1B33E34400473F78 /* Build configuration list for PBXProject "AssociationMenuViewTest" */ = {
420 | isa = XCConfigurationList;
421 | buildConfigurations = (
422 | 182E41C01B33E34400473F78 /* Debug */,
423 | 182E41C11B33E34400473F78 /* Release */,
424 | );
425 | defaultConfigurationIsVisible = 0;
426 | defaultConfigurationName = Release;
427 | };
428 | 182E41C21B33E34400473F78 /* Build configuration list for PBXNativeTarget "AssociationMenuViewTest" */ = {
429 | isa = XCConfigurationList;
430 | buildConfigurations = (
431 | 182E41C31B33E34400473F78 /* Debug */,
432 | 182E41C41B33E34400473F78 /* Release */,
433 | );
434 | defaultConfigurationIsVisible = 0;
435 | };
436 | 182E41C51B33E34400473F78 /* Build configuration list for PBXNativeTarget "AssociationMenuViewTestTests" */ = {
437 | isa = XCConfigurationList;
438 | buildConfigurations = (
439 | 182E41C61B33E34400473F78 /* Debug */,
440 | 182E41C71B33E34400473F78 /* Release */,
441 | );
442 | defaultConfigurationIsVisible = 0;
443 | };
444 | /* End XCConfigurationList section */
445 | };
446 | rootObject = 182E41971B33E34400473F78 /* Project object */;
447 | }
448 |
--------------------------------------------------------------------------------