├── screen └── screen.PNG ├── DropUpMenu ├── Images.xcassets │ ├── bottom_btn.imageset │ │ ├── bottom_btn.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ViewController.h ├── DropUpMenu │ ├── GWDropUpCell.h │ ├── MenuItem.h │ ├── MenuView.h │ ├── GWDropUpCell.m │ ├── MenuItem.m │ └── MenuView.m ├── AppDelegate.h ├── main.m ├── Info.plist ├── ViewController.m ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.xib └── AppDelegate.m ├── DropUpMenu.xcodeproj ├── xcuserdata │ └── wg.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── DropUpMenu.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── DropUpMenu.xccheckout └── project.pbxproj ├── README.md └── DropUpMenuTests ├── Info.plist └── DropUpMenuTests.m /screen/screen.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang316/DropUpMenu/HEAD/screen/screen.PNG -------------------------------------------------------------------------------- /DropUpMenu/Images.xcassets/bottom_btn.imageset/bottom_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang316/DropUpMenu/HEAD/DropUpMenu/Images.xcassets/bottom_btn.imageset/bottom_btn.png -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/xcuserdata/wg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DropUpMenu/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/GWDropUpCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // GWDropUpCell.h 3 | // guwen 4 | // 5 | // Created by 王刚 on 14/9/16. 6 | // Copyright (c) 2014年 ccid. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GWDropUpCell : UITableViewCell 12 | 13 | @property (nonatomic, strong) UILabel *nameLabel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DropUpMenu/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DropUpMenu 2 | ----------- 3 | 4 | ![screen](./screen/screen.PNG) 5 | 6 | 7 | 8 | ##使用: 9 | 10 | MenuView *menuView = [[MenuView alloc]init]; 11 | menuView.frame = CGRectMake(0, 568-44, 320, 44); 12 | [menuView setBottomItems:@[@"工业", @"评论", @"信息化"]]; 13 | menuView.displayView = self.view; 14 | menuView.delegate = self; 15 | [self.view addSubview:menuView]; 16 | -------------------------------------------------------------------------------- /DropUpMenu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. 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 | -------------------------------------------------------------------------------- /DropUpMenu/Images.xcassets/bottom_btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "bottom_btn.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/MenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // MenuItem.h 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MenuItem : UIButton 12 | 13 | - (instancetype)initWithTitle:(NSString *)title leftImageName:(NSString *)imageName; 14 | 15 | @property (nonatomic, strong) NSString *title; 16 | @property (nonatomic, strong) NSString *imageName; 17 | @end 18 | -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/xcuserdata/wg.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DropUpMenu.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D67D3CEC1A198B7200C80628 16 | 17 | primary 18 | 19 | 20 | D67D3D051A198B7200C80628 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DropUpMenu/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 | } -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/MenuView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MenuView.h 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol MenuViewDelegate; 12 | 13 | @interface MenuView : UIView 14 | 15 | //custom methods 16 | 17 | @property (nonatomic, weak) id delegate; 18 | 19 | //主菜单数据 20 | @property (nonatomic, strong) NSArray *bottomItems; 21 | //显示视图 22 | @property (nonatomic, strong) UIView *displayView; 23 | 24 | //隐藏滑出菜单 25 | - (void)hiddenItemTable; 26 | 27 | 28 | @end 29 | 30 | 31 | @protocol MenuViewDelegate 32 | 33 | - (NSArray *)upMenuItemsAtBottomIndex:(NSInteger)index; 34 | 35 | - (void)selectedUpMenuItemAtIndex:(NSInteger)upItemIndex bottomIndex:(NSInteger)bottomIndex; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /DropUpMenuTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.ccidnet.$(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 | -------------------------------------------------------------------------------- /DropUpMenuTests/DropUpMenuTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DropUpMenuTests.m 3 | // DropUpMenuTests 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface DropUpMenuTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation DropUpMenuTests 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 | -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/GWDropUpCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // GWDropUpCell.m 3 | // guwen 4 | // 5 | // Created by 王刚 on 14/9/16. 6 | // Copyright (c) 2014年 ccid. All rights reserved. 7 | // 8 | 9 | #import "GWDropUpCell.h" 10 | 11 | @implementation GWDropUpCell 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 16 | if (self) { 17 | [self.contentView addSubview:self.nameLabel]; 18 | } 19 | return self; 20 | } 21 | 22 | - (UILabel *)nameLabel { 23 | if (!_nameLabel) { 24 | _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 95, 40)]; 25 | _nameLabel.textAlignment = NSTextAlignmentCenter; 26 | _nameLabel.font = [UIFont systemFontOfSize:13]; 27 | _nameLabel.textColor = [UIColor darkGrayColor]; 28 | _nameLabel.numberOfLines = 1; 29 | } 30 | return _nameLabel; 31 | } 32 | 33 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 34 | { 35 | [super setSelected:selected animated:animated]; 36 | 37 | // Configure the view for the selected state 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/MenuItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // MenuItem.m 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import "MenuItem.h" 10 | 11 | @interface MenuItem() 12 | 13 | @property (nonatomic, strong) UIImageView *leftImageView; 14 | 15 | @end 16 | 17 | @implementation MenuItem 18 | 19 | - (instancetype)initWithTitle:(NSString *)title leftImageName:(NSString *)imageName { 20 | self = [super init]; 21 | if (self) { 22 | self.title = title; 23 | self.imageName = imageName; 24 | } 25 | return self; 26 | } 27 | 28 | - (instancetype)initWithFrame:(CGRect)frame 29 | { 30 | self = [super initWithFrame:frame]; 31 | if (self) { 32 | self.title = @""; 33 | 34 | } 35 | return self; 36 | } 37 | 38 | - (void)setImageName:(NSString *)imageName { 39 | self.leftImageView.image = [UIImage imageNamed:imageName]; 40 | [self addSubview:self.leftImageView]; 41 | } 42 | 43 | - (UIImageView *)leftImageView { 44 | if (!_leftImageView) { 45 | _leftImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.height, self.frame.size.height)]; 46 | } 47 | return _leftImageView; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /DropUpMenu/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.ccidnet.$(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 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /DropUpMenu/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "MenuView.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSArray *allUpDatas; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | 23 | MenuView *menuView = [[MenuView alloc]init]; 24 | menuView.frame = CGRectMake(0, 568-44, 320, 44); 25 | [menuView setBottomItems:@[@"工业", @"评论", @"信息化"]]; 26 | menuView.displayView = self.view; 27 | menuView.delegate = self; 28 | [self.view addSubview:menuView]; 29 | 30 | 31 | NSArray *up1 = @[@"IT评论",@"产业评论",@"经济评论",@"管理评论",@"融合",@"上策",@"跨界"]; 32 | NSArray *up2 = @[@"装备制造", @"消费品", @"原材料", @"汽车", @"节能环保", @"新能源"]; 33 | NSArray *up3 = @[@"电子信息", @"半导体", @"通信", @"互联网", @"软件"]; 34 | self.allUpDatas = @[up1, up2, up3]; 35 | } 36 | 37 | #pragma mark - delegate methods 38 | - (NSArray *)upMenuItemsAtBottomIndex:(NSInteger)index { 39 | return self.allUpDatas[index]; 40 | } 41 | 42 | - (void)selectedUpMenuItemAtIndex:(NSInteger)upItemIndex bottomIndex:(NSInteger)bottomIndex { 43 | NSLog(@"bottom index is : %d, up index is : %d", bottomIndex, upItemIndex); 44 | } 45 | 46 | 47 | - (void)didReceiveMemoryWarning { 48 | [super didReceiveMemoryWarning]; 49 | // Dispose of any resources that can be recreated. 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /DropUpMenu/Base.lproj/Main.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 | -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/project.xcworkspace/xcshareddata/DropUpMenu.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | D59EDC0F-84A8-41FA-AABE-1C1643F7254E 9 | IDESourceControlProjectName 10 | DropUpMenu 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 54F09815519040E475FE133AA5599E0A369E3E32 14 | github.com:wanggang316/DropUpMenu.git 15 | 16 | IDESourceControlProjectPath 17 | DropUpMenu.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 54F09815519040E475FE133AA5599E0A369E3E32 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:wanggang316/DropUpMenu.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 54F09815519040E475FE133AA5599E0A369E3E32 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 54F09815519040E475FE133AA5599E0A369E3E32 36 | IDESourceControlWCCName 37 | DropUpMenu 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DropUpMenu/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. 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 | -------------------------------------------------------------------------------- /DropUpMenu/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 | -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/xcuserdata/wg.xcuserdatad/xcschemes/DropUpMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /DropUpMenu/DropUpMenu/MenuView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MenuView.m 3 | // DropUpMenu 4 | // 5 | // Created by 王刚 on 11/17/14. 6 | // Copyright (c) 2014 ccidnet. All rights reserved. 7 | // 8 | 9 | #import "MenuView.h" 10 | #import "GWDropUpCell.h" 11 | 12 | //static NSUInteger const defaultHeight = 44; 13 | #define BTN_TAG_BASE_NUM 5678 14 | #define DEFAULT_COLOR [UIColor colorWithRed:250.0/255.0 green:250.0/255.0 blue:250.0/255.0 alpha:1.0] 15 | #define DEFAULT_BG_COLOR [UIColor colorWithRed:200.0/255.0 green:200.0/255.0 blue:200.0/255.0 alpha:1.0] 16 | 17 | static CGFloat const CellHeight = 40; 18 | 19 | @interface MenuView() 20 | 21 | //滑出菜单数据 22 | @property (nonatomic, strong) NSArray *upTableItems; 23 | //滑出列表 24 | @property (nonatomic, strong) UITableView *itemTableView; 25 | 26 | //选中button索引 27 | @property (nonatomic, assign) NSUInteger selectedBottomIndex; 28 | //滑出菜单是否隐藏 29 | @property (nonatomic, assign) BOOL itemTableViewHidden; 30 | 31 | @end 32 | 33 | @implementation MenuView 34 | 35 | - (instancetype)init 36 | { 37 | self = [super init]; 38 | if (self) { 39 | self.backgroundColor = DEFAULT_BG_COLOR; 40 | self.selectedBottomIndex = -1; 41 | } 42 | return self; 43 | } 44 | 45 | - (instancetype)initWithFrame:(CGRect)frame 46 | { 47 | self = [super initWithFrame:frame]; 48 | if (self) { 49 | self.frame = frame; 50 | self.backgroundColor = DEFAULT_BG_COLOR; 51 | self.selectedBottomIndex = -1; 52 | 53 | } 54 | return self; 55 | } 56 | 57 | - (void)setBottomItems:(NSArray *)bottomItems { 58 | _bottomItems = bottomItems; 59 | //移除 60 | for (UIView *view in self.subviews) { 61 | [view removeFromSuperview]; 62 | } 63 | //添加 64 | CGFloat btnwidth = (self.frame.size.width - (bottomItems.count-1)*0.5)/bottomItems.count; 65 | for (int i = 0; i < bottomItems.count; i++) { 66 | UIButton *btn = [self btnWithTitle:bottomItems[i] leftImageName:@"bottom_btn"]; 67 | btn.frame = CGRectMake((btnwidth + 0.5) * i, 0.5, btnwidth, CGRectGetHeight(self.frame)-0.5); 68 | btn.tag = BTN_TAG_BASE_NUM + i; 69 | [self addSubview:btn]; 70 | } 71 | } 72 | 73 | 74 | 75 | - (UIButton *)btnWithTitle:(NSString *)title leftImageName:(NSString *)imageName { 76 | 77 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeInfoLight]; 78 | btn.titleLabel.font = [UIFont systemFontOfSize:15]; 79 | [btn setTintColor:[UIColor lightGrayColor]]; 80 | [btn setTintAdjustmentMode:UIViewTintAdjustmentModeAutomatic]; 81 | [btn setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal]; 82 | [btn setTitle:title forState:UIControlStateNormal]; 83 | [btn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; 84 | 85 | btn.backgroundColor = DEFAULT_COLOR; 86 | 87 | [btn addTarget:self action:@selector(btnHandler:) forControlEvents:UIControlEventTouchUpInside]; 88 | 89 | return btn; 90 | } 91 | 92 | - (void)btnHandler:(UIButton *)sender { 93 | 94 | NSInteger ksel = sender.tag - BTN_TAG_BASE_NUM; 95 | 96 | if (self.selectedBottomIndex == ksel) { 97 | self.itemTableViewHidden = !self.itemTableViewHidden; 98 | } else { 99 | self.upTableItems = [self.delegate upMenuItemsAtBottomIndex:ksel]; 100 | [self.itemTableView reloadData]; 101 | [self showItemTableAtIndex:ksel]; 102 | } 103 | } 104 | 105 | 106 | - (void)setItemTableViewHidden:(BOOL)itemTableViewHidden { 107 | itemTableViewHidden ? [self hiddenItemTable] : [self showItemTableAtIndex:self.selectedBottomIndex]; 108 | } 109 | 110 | //打开 111 | - (void)showItemTableAtIndex:(NSInteger)index { 112 | 113 | CGFloat tableWidth = (self.frame.size.width - (self.bottomItems.count+1))/self.bottomItems.count;// self.segmentedControl.frame.size.width/self.menuItems.count; 114 | CGRect tableFrame = CGRectMake(tableWidth * index + index + 1, self.displayView.frame.size.height/* - self.frame.size.height*/, tableWidth, CellHeight * self.upTableItems.count); 115 | 116 | self.itemTableView.frame = tableFrame; 117 | 118 | 119 | // UITableView *displayViewTable = (UITableView *)self.displayView; 120 | 121 | 122 | tableFrame.origin.y = self.displayView.frame.size.height - self.frame.size.height - CellHeight * self.upTableItems.count - 70 + 64/*(displayViewTable.contentOffset.y + 64)*/; 123 | [UIView animateWithDuration:0.3 animations:^{ 124 | self.itemTableView.frame = tableFrame; 125 | } completion:^(BOOL finished) { 126 | self.selectedBottomIndex = index; 127 | _itemTableViewHidden = NO; 128 | }]; 129 | } 130 | 131 | //隐藏 132 | - (void)hiddenItemTable { 133 | 134 | CGRect tframe = self.itemTableView.frame; 135 | tframe.origin.y = self.displayView.frame.size.height;// - self.frame.size.height; 136 | [UIView animateWithDuration:0.2 animations:^{ 137 | self.itemTableView.frame = tframe; 138 | } completion:^(BOOL finished) { 139 | _itemTableViewHidden = YES; 140 | }]; 141 | } 142 | 143 | 144 | 145 | 146 | #pragma up tableView 147 | 148 | - (UITableView *)itemTableView { 149 | if (!_itemTableView) { 150 | _itemTableView = [[UITableView alloc]init]; 151 | [_itemTableView registerClass:[GWDropUpCell class] forCellReuseIdentifier:NSStringFromClass([GWDropUpCell class])]; 152 | _itemTableView.dataSource = self; 153 | _itemTableView.delegate = self; 154 | 155 | _itemTableView.layer.cornerRadius = 6; 156 | _itemTableView.layer.borderWidth = 0.5; 157 | _itemTableView.layer.borderColor = DEFAULT_BG_COLOR.CGColor; 158 | 159 | _itemTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 15); 160 | 161 | if (self.displayView) { 162 | [self.displayView addSubview:_itemTableView]; 163 | [self.displayView bringSubviewToFront:self]; 164 | } 165 | } 166 | return _itemTableView; 167 | } 168 | 169 | #pragma mark - UITableViewDataSource 170 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 171 | return self.upTableItems.count; 172 | } 173 | 174 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 175 | GWDropUpCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([GWDropUpCell class]) forIndexPath:indexPath]; 176 | 177 | cell.nameLabel.text = self.upTableItems[indexPath.row]; 178 | return cell; 179 | } 180 | 181 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 182 | return CellHeight; 183 | } 184 | 185 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 186 | 187 | [self hiddenItemTable]; 188 | [self.delegate selectedUpMenuItemAtIndex:indexPath.row bottomIndex:self.selectedBottomIndex]; 189 | } 190 | 191 | 192 | 193 | 194 | 195 | @end 196 | -------------------------------------------------------------------------------- /DropUpMenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D67D3CF31A198B7200C80628 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3CF21A198B7200C80628 /* main.m */; }; 11 | D67D3CF61A198B7200C80628 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3CF51A198B7200C80628 /* AppDelegate.m */; }; 12 | D67D3CF91A198B7200C80628 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3CF81A198B7200C80628 /* ViewController.m */; }; 13 | D67D3CFC1A198B7200C80628 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D67D3CFA1A198B7200C80628 /* Main.storyboard */; }; 14 | D67D3CFE1A198B7200C80628 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D67D3CFD1A198B7200C80628 /* Images.xcassets */; }; 15 | D67D3D011A198B7200C80628 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D67D3CFF1A198B7200C80628 /* LaunchScreen.xib */; }; 16 | D67D3D0D1A198B7200C80628 /* DropUpMenuTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3D0C1A198B7200C80628 /* DropUpMenuTests.m */; }; 17 | D67D3D191A1A2C2600C80628 /* MenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3D181A1A2C2600C80628 /* MenuView.m */; }; 18 | D67D3D1F1A1A375400C80628 /* MenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D67D3D1E1A1A375400C80628 /* MenuItem.m */; }; 19 | D6A877801A1F0198003F9CB4 /* GWDropUpCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D6A8777F1A1F0198003F9CB4 /* GWDropUpCell.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | D67D3D071A198B7200C80628 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = D67D3CE51A198B7200C80628 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = D67D3CEC1A198B7200C80628; 28 | remoteInfo = DropUpMenu; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | D67D3CED1A198B7200C80628 /* DropUpMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DropUpMenu.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | D67D3CF11A198B7200C80628 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | D67D3CF21A198B7200C80628 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 36 | D67D3CF41A198B7200C80628 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 37 | D67D3CF51A198B7200C80628 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 38 | D67D3CF71A198B7200C80628 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 39 | D67D3CF81A198B7200C80628 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 40 | D67D3CFB1A198B7200C80628 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 41 | D67D3CFD1A198B7200C80628 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 42 | D67D3D001A198B7200C80628 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 43 | D67D3D061A198B7200C80628 /* DropUpMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DropUpMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | D67D3D0B1A198B7200C80628 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | D67D3D0C1A198B7200C80628 /* DropUpMenuTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DropUpMenuTests.m; sourceTree = ""; }; 46 | D67D3D171A1A2C2600C80628 /* MenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuView.h; sourceTree = ""; }; 47 | D67D3D181A1A2C2600C80628 /* MenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuView.m; sourceTree = ""; }; 48 | D67D3D1D1A1A375400C80628 /* MenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuItem.h; sourceTree = ""; }; 49 | D67D3D1E1A1A375400C80628 /* MenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuItem.m; sourceTree = ""; }; 50 | D6A8777E1A1F0198003F9CB4 /* GWDropUpCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GWDropUpCell.h; sourceTree = ""; }; 51 | D6A8777F1A1F0198003F9CB4 /* GWDropUpCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GWDropUpCell.m; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | D67D3CEA1A198B7200C80628 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | D67D3D031A198B7200C80628 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | D67D3CE41A198B7200C80628 = { 73 | isa = PBXGroup; 74 | children = ( 75 | D67D3CEF1A198B7200C80628 /* DropUpMenu */, 76 | D67D3D091A198B7200C80628 /* DropUpMenuTests */, 77 | D67D3CEE1A198B7200C80628 /* Products */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | D67D3CEE1A198B7200C80628 /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | D67D3CED1A198B7200C80628 /* DropUpMenu.app */, 85 | D67D3D061A198B7200C80628 /* DropUpMenuTests.xctest */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | D67D3CEF1A198B7200C80628 /* DropUpMenu */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | D67D3D161A198BA700C80628 /* DropUpMenu */, 94 | D67D3CF41A198B7200C80628 /* AppDelegate.h */, 95 | D67D3CF51A198B7200C80628 /* AppDelegate.m */, 96 | D67D3CF71A198B7200C80628 /* ViewController.h */, 97 | D67D3CF81A198B7200C80628 /* ViewController.m */, 98 | D67D3CFA1A198B7200C80628 /* Main.storyboard */, 99 | D67D3CFD1A198B7200C80628 /* Images.xcassets */, 100 | D67D3CFF1A198B7200C80628 /* LaunchScreen.xib */, 101 | D67D3CF01A198B7200C80628 /* Supporting Files */, 102 | ); 103 | path = DropUpMenu; 104 | sourceTree = ""; 105 | }; 106 | D67D3CF01A198B7200C80628 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | D67D3CF11A198B7200C80628 /* Info.plist */, 110 | D67D3CF21A198B7200C80628 /* main.m */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | D67D3D091A198B7200C80628 /* DropUpMenuTests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | D67D3D0C1A198B7200C80628 /* DropUpMenuTests.m */, 119 | D67D3D0A1A198B7200C80628 /* Supporting Files */, 120 | ); 121 | path = DropUpMenuTests; 122 | sourceTree = ""; 123 | }; 124 | D67D3D0A1A198B7200C80628 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | D67D3D0B1A198B7200C80628 /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | D67D3D161A198BA700C80628 /* DropUpMenu */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | D6A8777E1A1F0198003F9CB4 /* GWDropUpCell.h */, 136 | D6A8777F1A1F0198003F9CB4 /* GWDropUpCell.m */, 137 | D67D3D171A1A2C2600C80628 /* MenuView.h */, 138 | D67D3D181A1A2C2600C80628 /* MenuView.m */, 139 | D67D3D1D1A1A375400C80628 /* MenuItem.h */, 140 | D67D3D1E1A1A375400C80628 /* MenuItem.m */, 141 | ); 142 | path = DropUpMenu; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXNativeTarget section */ 148 | D67D3CEC1A198B7200C80628 /* DropUpMenu */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = D67D3D101A198B7200C80628 /* Build configuration list for PBXNativeTarget "DropUpMenu" */; 151 | buildPhases = ( 152 | D67D3CE91A198B7200C80628 /* Sources */, 153 | D67D3CEA1A198B7200C80628 /* Frameworks */, 154 | D67D3CEB1A198B7200C80628 /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = DropUpMenu; 161 | productName = DropUpMenu; 162 | productReference = D67D3CED1A198B7200C80628 /* DropUpMenu.app */; 163 | productType = "com.apple.product-type.application"; 164 | }; 165 | D67D3D051A198B7200C80628 /* DropUpMenuTests */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = D67D3D131A198B7200C80628 /* Build configuration list for PBXNativeTarget "DropUpMenuTests" */; 168 | buildPhases = ( 169 | D67D3D021A198B7200C80628 /* Sources */, 170 | D67D3D031A198B7200C80628 /* Frameworks */, 171 | D67D3D041A198B7200C80628 /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | D67D3D081A198B7200C80628 /* PBXTargetDependency */, 177 | ); 178 | name = DropUpMenuTests; 179 | productName = DropUpMenuTests; 180 | productReference = D67D3D061A198B7200C80628 /* DropUpMenuTests.xctest */; 181 | productType = "com.apple.product-type.bundle.unit-test"; 182 | }; 183 | /* End PBXNativeTarget section */ 184 | 185 | /* Begin PBXProject section */ 186 | D67D3CE51A198B7200C80628 /* Project object */ = { 187 | isa = PBXProject; 188 | attributes = { 189 | LastUpgradeCheck = 0610; 190 | ORGANIZATIONNAME = ccidnet; 191 | TargetAttributes = { 192 | D67D3CEC1A198B7200C80628 = { 193 | CreatedOnToolsVersion = 6.1; 194 | }; 195 | D67D3D051A198B7200C80628 = { 196 | CreatedOnToolsVersion = 6.1; 197 | TestTargetID = D67D3CEC1A198B7200C80628; 198 | }; 199 | }; 200 | }; 201 | buildConfigurationList = D67D3CE81A198B7200C80628 /* Build configuration list for PBXProject "DropUpMenu" */; 202 | compatibilityVersion = "Xcode 3.2"; 203 | developmentRegion = English; 204 | hasScannedForEncodings = 0; 205 | knownRegions = ( 206 | en, 207 | Base, 208 | ); 209 | mainGroup = D67D3CE41A198B7200C80628; 210 | productRefGroup = D67D3CEE1A198B7200C80628 /* Products */; 211 | projectDirPath = ""; 212 | projectRoot = ""; 213 | targets = ( 214 | D67D3CEC1A198B7200C80628 /* DropUpMenu */, 215 | D67D3D051A198B7200C80628 /* DropUpMenuTests */, 216 | ); 217 | }; 218 | /* End PBXProject section */ 219 | 220 | /* Begin PBXResourcesBuildPhase section */ 221 | D67D3CEB1A198B7200C80628 /* Resources */ = { 222 | isa = PBXResourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | D67D3CFC1A198B7200C80628 /* Main.storyboard in Resources */, 226 | D67D3D011A198B7200C80628 /* LaunchScreen.xib in Resources */, 227 | D67D3CFE1A198B7200C80628 /* Images.xcassets in Resources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | D67D3D041A198B7200C80628 /* Resources */ = { 232 | isa = PBXResourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXResourcesBuildPhase section */ 239 | 240 | /* Begin PBXSourcesBuildPhase section */ 241 | D67D3CE91A198B7200C80628 /* Sources */ = { 242 | isa = PBXSourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | D67D3CF91A198B7200C80628 /* ViewController.m in Sources */, 246 | D67D3D191A1A2C2600C80628 /* MenuView.m in Sources */, 247 | D67D3D1F1A1A375400C80628 /* MenuItem.m in Sources */, 248 | D6A877801A1F0198003F9CB4 /* GWDropUpCell.m in Sources */, 249 | D67D3CF61A198B7200C80628 /* AppDelegate.m in Sources */, 250 | D67D3CF31A198B7200C80628 /* main.m in Sources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | D67D3D021A198B7200C80628 /* Sources */ = { 255 | isa = PBXSourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | D67D3D0D1A198B7200C80628 /* DropUpMenuTests.m in Sources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | /* End PBXSourcesBuildPhase section */ 263 | 264 | /* Begin PBXTargetDependency section */ 265 | D67D3D081A198B7200C80628 /* PBXTargetDependency */ = { 266 | isa = PBXTargetDependency; 267 | target = D67D3CEC1A198B7200C80628 /* DropUpMenu */; 268 | targetProxy = D67D3D071A198B7200C80628 /* PBXContainerItemProxy */; 269 | }; 270 | /* End PBXTargetDependency section */ 271 | 272 | /* Begin PBXVariantGroup section */ 273 | D67D3CFA1A198B7200C80628 /* Main.storyboard */ = { 274 | isa = PBXVariantGroup; 275 | children = ( 276 | D67D3CFB1A198B7200C80628 /* Base */, 277 | ); 278 | name = Main.storyboard; 279 | sourceTree = ""; 280 | }; 281 | D67D3CFF1A198B7200C80628 /* LaunchScreen.xib */ = { 282 | isa = PBXVariantGroup; 283 | children = ( 284 | D67D3D001A198B7200C80628 /* Base */, 285 | ); 286 | name = LaunchScreen.xib; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXVariantGroup section */ 290 | 291 | /* Begin XCBuildConfiguration section */ 292 | D67D3D0E1A198B7200C80628 /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | ALWAYS_SEARCH_USER_PATHS = NO; 296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 297 | CLANG_CXX_LIBRARY = "libc++"; 298 | CLANG_ENABLE_MODULES = YES; 299 | CLANG_ENABLE_OBJC_ARC = YES; 300 | CLANG_WARN_BOOL_CONVERSION = YES; 301 | CLANG_WARN_CONSTANT_CONVERSION = YES; 302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 303 | CLANG_WARN_EMPTY_BODY = YES; 304 | CLANG_WARN_ENUM_CONVERSION = YES; 305 | CLANG_WARN_INT_CONVERSION = YES; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CLANG_WARN_UNREACHABLE_CODE = YES; 308 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 309 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 310 | COPY_PHASE_STRIP = NO; 311 | ENABLE_STRICT_OBJC_MSGSEND = YES; 312 | GCC_C_LANGUAGE_STANDARD = gnu99; 313 | GCC_DYNAMIC_NO_PIC = NO; 314 | GCC_OPTIMIZATION_LEVEL = 0; 315 | GCC_PREPROCESSOR_DEFINITIONS = ( 316 | "DEBUG=1", 317 | "$(inherited)", 318 | ); 319 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 322 | GCC_WARN_UNDECLARED_SELECTOR = YES; 323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 324 | GCC_WARN_UNUSED_FUNCTION = YES; 325 | GCC_WARN_UNUSED_VARIABLE = YES; 326 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 327 | MTL_ENABLE_DEBUG_INFO = YES; 328 | ONLY_ACTIVE_ARCH = YES; 329 | SDKROOT = iphoneos; 330 | }; 331 | name = Debug; 332 | }; 333 | D67D3D0F1A198B7200C80628 /* Release */ = { 334 | isa = XCBuildConfiguration; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BOOL_CONVERSION = YES; 342 | CLANG_WARN_CONSTANT_CONVERSION = YES; 343 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 344 | CLANG_WARN_EMPTY_BODY = YES; 345 | CLANG_WARN_ENUM_CONVERSION = YES; 346 | CLANG_WARN_INT_CONVERSION = YES; 347 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 348 | CLANG_WARN_UNREACHABLE_CODE = YES; 349 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 350 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 351 | COPY_PHASE_STRIP = YES; 352 | ENABLE_NS_ASSERTIONS = NO; 353 | ENABLE_STRICT_OBJC_MSGSEND = YES; 354 | GCC_C_LANGUAGE_STANDARD = gnu99; 355 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 356 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 357 | GCC_WARN_UNDECLARED_SELECTOR = YES; 358 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 359 | GCC_WARN_UNUSED_FUNCTION = YES; 360 | GCC_WARN_UNUSED_VARIABLE = YES; 361 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 362 | MTL_ENABLE_DEBUG_INFO = NO; 363 | SDKROOT = iphoneos; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | D67D3D111A198B7200C80628 /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | INFOPLIST_FILE = DropUpMenu/Info.plist; 373 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | }; 376 | name = Debug; 377 | }; 378 | D67D3D121A198B7200C80628 /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 382 | INFOPLIST_FILE = DropUpMenu/Info.plist; 383 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 384 | PRODUCT_NAME = "$(TARGET_NAME)"; 385 | }; 386 | name = Release; 387 | }; 388 | D67D3D141A198B7200C80628 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | BUNDLE_LOADER = "$(TEST_HOST)"; 392 | FRAMEWORK_SEARCH_PATHS = ( 393 | "$(SDKROOT)/Developer/Library/Frameworks", 394 | "$(inherited)", 395 | ); 396 | GCC_PREPROCESSOR_DEFINITIONS = ( 397 | "DEBUG=1", 398 | "$(inherited)", 399 | ); 400 | INFOPLIST_FILE = DropUpMenuTests/Info.plist; 401 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DropUpMenu.app/DropUpMenu"; 404 | }; 405 | name = Debug; 406 | }; 407 | D67D3D151A198B7200C80628 /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | BUNDLE_LOADER = "$(TEST_HOST)"; 411 | FRAMEWORK_SEARCH_PATHS = ( 412 | "$(SDKROOT)/Developer/Library/Frameworks", 413 | "$(inherited)", 414 | ); 415 | INFOPLIST_FILE = DropUpMenuTests/Info.plist; 416 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 417 | PRODUCT_NAME = "$(TARGET_NAME)"; 418 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DropUpMenu.app/DropUpMenu"; 419 | }; 420 | name = Release; 421 | }; 422 | /* End XCBuildConfiguration section */ 423 | 424 | /* Begin XCConfigurationList section */ 425 | D67D3CE81A198B7200C80628 /* Build configuration list for PBXProject "DropUpMenu" */ = { 426 | isa = XCConfigurationList; 427 | buildConfigurations = ( 428 | D67D3D0E1A198B7200C80628 /* Debug */, 429 | D67D3D0F1A198B7200C80628 /* Release */, 430 | ); 431 | defaultConfigurationIsVisible = 0; 432 | defaultConfigurationName = Release; 433 | }; 434 | D67D3D101A198B7200C80628 /* Build configuration list for PBXNativeTarget "DropUpMenu" */ = { 435 | isa = XCConfigurationList; 436 | buildConfigurations = ( 437 | D67D3D111A198B7200C80628 /* Debug */, 438 | D67D3D121A198B7200C80628 /* Release */, 439 | ); 440 | defaultConfigurationIsVisible = 0; 441 | defaultConfigurationName = Release; 442 | }; 443 | D67D3D131A198B7200C80628 /* Build configuration list for PBXNativeTarget "DropUpMenuTests" */ = { 444 | isa = XCConfigurationList; 445 | buildConfigurations = ( 446 | D67D3D141A198B7200C80628 /* Debug */, 447 | D67D3D151A198B7200C80628 /* Release */, 448 | ); 449 | defaultConfigurationIsVisible = 0; 450 | defaultConfigurationName = Release; 451 | }; 452 | /* End XCConfigurationList section */ 453 | }; 454 | rootObject = D67D3CE51A198B7200C80628 /* Project object */; 455 | } 456 | --------------------------------------------------------------------------------