├── demo.png
├── HNQQPopMenu
├── Assets.xcassets
│ ├── Contents.json
│ ├── menu_5.imageset
│ │ ├── right_menu_QR@3x.png
│ │ └── Contents.json
│ ├── menu_1.imageset
│ │ ├── right_menu_addFri@3x.png
│ │ └── Contents.json
│ ├── menu_3.imageset
│ │ ├── right_menu_multichat@3x.png
│ │ └── Contents.json
│ ├── menu_4.imageset
│ │ ├── right_menu_payMoney@3x.png
│ │ └── Contents.json
│ ├── menu_6.imageset
│ │ ├── right_menu_sendFile@3x.png
│ │ └── Contents.json
│ ├── menu_2.imageset
│ │ ├── right_menu_facetoface@3x.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Source
│ ├── HNPopMenuModel.m
│ ├── HNPopMenuTableViewCell.h
│ ├── HNPopMenuModel.h
│ ├── HNPopMenuManager.h
│ ├── HNPopMenuTableViewCell.m
│ ├── HNPopMenuView.h
│ ├── HNPopMenuManager.m
│ └── HNPopMenuView.m
├── ViewController.h
├── AppDelegate.h
├── main.m
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ViewController.m
└── AppDelegate.m
├── HNQQPopMenu.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── README.md
└── .gitignore
/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/demo.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_5.imageset/right_menu_QR@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_5.imageset/right_menu_QR@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_1.imageset/right_menu_addFri@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_1.imageset/right_menu_addFri@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_3.imageset/right_menu_multichat@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_3.imageset/right_menu_multichat@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_4.imageset/right_menu_payMoney@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_4.imageset/right_menu_payMoney@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_6.imageset/right_menu_sendFile@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_6.imageset/right_menu_sendFile@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_2.imageset/right_menu_facetoface@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kealdishx/HNPopMenu/HEAD/HNQQPopMenu/Assets.xcassets/menu_2.imageset/right_menu_facetoface@3x.png
--------------------------------------------------------------------------------
/HNQQPopMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuModel.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import "HNPopMenuModel.h"
10 |
11 | @implementation HNPopMenuModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/HNQQPopMenu/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/HNQQPopMenu/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. 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 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuTableViewCell.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HNPopMenuTableViewCell : UITableViewCell
12 |
13 | - (instancetype)initWithTableView:(UITableView *)tableView;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/HNQQPopMenu/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. 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 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_QR@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_addFri@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_multichat@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_payMoney@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_sendFile@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/menu_2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "right_menu_facetoface@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuModel.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HNPopMenuModel : NSObject
12 |
13 | /**
14 | * menu cell's title
15 | */
16 | @property (nonatomic,strong) NSString *title;
17 |
18 | /**
19 | * menu cell's image
20 | */
21 | @property (nonatomic,strong) NSString *imageName;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HNPopMenu
2 | 类似QQ和微信的弹出式菜单
3 |
4 | 
5 |
6 | ### 用法
7 |
8 | 1. 将source目录下的代码复制到项目目录下;
9 | 2. 只需要一行代码实现弹出式菜单,支持block和代理两种创建方式:
10 |
11 | ```objectivec
12 | // block
13 | [HNPopMenuManager showPopMenuWithView:<#view#> items:<#array#> action:^(NSInteger row) {
14 | NSLog(@"第%ld行被点击了",row);
15 | } dismissed:YES];
16 | ```
17 |
18 | ```objectivec
19 | // delegate
20 | [HNPopMenuManager showPopMenuWithView:<#view#> items:<#array#> delegate:<#delegate#> dismissed:YES];
21 | ```
22 |
23 | ### 贡献者
24 |
25 | [ZakariyyaSv](https://github.com/ZakariyyaSv)
26 |
27 |
28 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuManager.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "HNPopMenuView.h"
12 |
13 | @class HNPopMenuManager;
14 |
15 | @interface HNPopMenuManager : NSObject
16 |
17 | + (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr delegate:(id)delegate dismissAutomatically:(BOOL)dismissed;
18 |
19 | + (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr action:(action)action dismissAutomatically:(BOOL)dismissed;
20 |
21 | + (void)setBackgroundColor:(UIColor *)color;
22 |
23 | + (void)setBackgroundView:(UIView *)view;
24 |
25 | + (void)dismiss;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuTableViewCell.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import "HNPopMenuTableViewCell.h"
10 |
11 | @implementation HNPopMenuTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (instancetype)initWithTableView:(UITableView *)tableView{
19 | static NSString *identifier = @"popmenuTableViewCell";
20 | HNPopMenuTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
21 | if (!cell) {
22 | cell = [[HNPopMenuTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
23 | cell.textLabel.font = [UIFont systemFontOfSize:15.0f];
24 | }
25 | return cell;
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # NOTE: Thinking about adding files created by your operating system, IDE,
2 | # or text editor here? Don't! Add them to your per-user .gitignore instead.
3 |
4 | arcanist/
5 | libphutil/
6 |
7 | # Diviner
8 | /docs/
9 | /.divinercache/
10 |
11 | # libphutil
12 | /src/.phutil_module_cache
13 |
14 | # User extensions
15 | /externals/includes/*
16 | /src/extensions/*
17 |
18 | # Mac OS X
19 | .DS_Store
20 |
21 | # Generated files
22 | *.o
23 | *.pyc
24 | *.hi
25 |
26 | # Python modules
27 | MANIFEST
28 | build/
29 |
30 | # Backup files
31 | *~.nib
32 | \#*#
33 | .#*
34 | *.swp
35 | *.un~
36 |
37 | # Xcode
38 | #
39 | build/
40 | *.pbxuser
41 | !default.pbxuser
42 | *.mode1v3
43 | !default.mode1v3
44 | *.mode2v3
45 | !default.mode2v3
46 | *.perspectivev3
47 | !default.perspectivev3
48 | xcuserdata
49 | *.xccheckout
50 | *.moved-aside
51 | DerivedData
52 | *.hmap
53 | *.ipa
54 | *.xcuserstate
55 |
56 | # CocoaPods
57 | #
58 | # We recommend against adding the Pods directory to your .gitignore. However
59 | # you should judge for yourself, the pros and cons are mentioned at:
60 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
61 | #
62 | Pods/
63 | .idea/
64 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuView.h:
--------------------------------------------------------------------------------
1 | //
2 | // HNQQDropMenuView.h
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void (^action)(NSInteger row);
12 |
13 | @class HNPopMenuView;
14 |
15 | @protocol HNPopMenuViewDelegate
16 |
17 | @optional
18 |
19 | - (void)QQPopMenuView:(HNPopMenuView *)menuView didSelectRow:(NSInteger)row;
20 |
21 | @end
22 |
23 | @interface HNPopMenuView : UIView
24 |
25 | /**
26 | * popmenu's width,default is 150.
27 | */
28 | @property (nonatomic,assign) CGFloat menuWidth;
29 |
30 | /**
31 | * menu cell's height,default is 44.
32 | */
33 | @property (nonatomic,assign) CGFloat cellHeight;
34 |
35 | /**
36 | * the longest distance between menuView and screen, default is 40.
37 | */
38 | @property (nonatomic,assign) CGFloat limitMargin;
39 |
40 | // menuView's tableView,menu cell's container.
41 | @property (nonatomic,strong,readonly) UITableView *tableView;
42 |
43 | @property (nonatomic,strong) CAShapeLayer *triangleLayer;
44 |
45 | @property (nonatomic,weak) id delegate;
46 |
47 | @property (nonatomic,copy) action clickAction;
48 |
49 | @property (nonatomic,assign) BOOL dismissed;
50 |
51 | - (instancetype)initWithView:(UIView *)view items:(NSArray *)itemArr;
52 |
53 | - (void)setTableViewBackgroundColor:(UIColor *)backgroundColor;
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/HNQQPopMenu/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 |
--------------------------------------------------------------------------------
/HNQQPopMenu/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 |
--------------------------------------------------------------------------------
/HNQQPopMenu/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "HNPopMenuManager.h"
11 | #import "HNPopMenuModel.h"
12 |
13 | @interface ViewController ()
14 |
15 | @property (weak, nonatomic) IBOutlet UIButton *rightButton;
16 |
17 | @property (weak, nonatomic) IBOutlet UIButton *leftButton;
18 |
19 | @property (nonatomic,strong) NSArray *dataArr;
20 |
21 | @end
22 |
23 | @implementation ViewController
24 |
25 | - (NSArray *)dataArr{
26 | if (!_dataArr) {
27 | NSMutableArray *tempArr = [NSMutableArray array];
28 | NSArray *titleArr = @[@"扫一扫",@"加好友",@"创建讨论组",@"发送到电脑",@"面对面快传",@"收钱", @"扫一扫",@"加好友",@"创建讨论组",@"发送到电脑",@"面对面快传",@"收钱", @"扫一扫",@"加好友",@"创建讨论组",@"发送到电脑",@"面对面快传",@"收钱", @"扫一扫",@"加好友",@"创建讨论组",@"发送到电脑",@"面对面快传",@"收钱"];
29 | for (int i = 1; i < 20; i++) {
30 | HNPopMenuModel *model = [[HNPopMenuModel alloc] init];
31 | model.title = titleArr[i - 1];
32 | model.imageName = [NSString stringWithFormat:@"menu_%d",(i % 5) + 1];
33 | [tempArr addObject:model];
34 | }
35 | _dataArr = [tempArr mutableCopy];
36 | }
37 | return _dataArr;
38 | }
39 | - (IBAction)addLeftPopMenu {
40 | [HNPopMenuManager showPopMenuWithView:self.leftButton items:self.dataArr delegate:self dismissAutomatically:YES];
41 | }
42 |
43 | - (IBAction)addRightPopMenu:(id)sender {
44 | [HNPopMenuManager showPopMenuWithView:self.rightButton items:self.dataArr action:^(NSInteger row) {
45 | NSLog(@"第%ld行被点击了",row);
46 | } dismissAutomatically:NO];
47 | }
48 |
49 |
50 | - (void)QQPopMenuView:(HNPopMenuView *)menuView didSelectRow:(NSInteger)row{
51 | NSLog(@"第%ld行被点击了",row);
52 | }
53 |
54 |
55 |
56 |
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/HNQQPopMenu/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. 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 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // HNPopMenuManager.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import "HNPopMenuManager.h"
10 |
11 | @interface HNPopMenuManager()
12 |
13 | @property (nonatomic,strong) HNPopMenuView *popmenuView;
14 |
15 | @end
16 |
17 | @implementation HNPopMenuManager
18 |
19 | + (instancetype)sharedManager{
20 | static HNPopMenuManager *manager;
21 | static dispatch_once_t onceToken;
22 | dispatch_once(&onceToken, ^{
23 | manager = [[HNPopMenuManager alloc] init];
24 | });
25 | return manager;
26 | }
27 |
28 | + (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr delegate:(id)delegate dismissAutomatically:(BOOL)dismissed{
29 | [[self sharedManager] showPopMenuWithView:view items:itemArr delegate:delegate dismissedAutomatically:dismissed];
30 | }
31 |
32 | + (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr action:(action)action dismissAutomatically:(BOOL)dismissed{
33 | [[self sharedManager] showPopMenuWithView:view items:itemArr action:action dismissedAutomatically:dismissed];
34 | }
35 |
36 | + (void)setBackgroundColor:(UIColor *)color{
37 | [[self sharedManager] setBackgroundColour:color];
38 | }
39 |
40 | + (void)setBackgroundView:(UIView *)view{
41 | [[self sharedManager] setBackView:view];
42 | }
43 |
44 | + (void)dismiss{
45 | [[self sharedManager] dismiss];
46 | }
47 |
48 | #pragma mark - implementation
49 | - (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr{
50 | if (self.popmenuView) {
51 | [self dismiss];
52 | }
53 | self.popmenuView = [[HNPopMenuView alloc] initWithView:view items:itemArr];
54 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
55 | if (keyWindow == nil) {
56 | return;
57 | }
58 | [keyWindow addSubview:self.popmenuView];
59 | [UIView animateWithDuration:0.2f animations:^{
60 | self.popmenuView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
61 | self.popmenuView.tableView.transform = CGAffineTransformMakeScale(1.0, 1.0);
62 | }];
63 | }
64 |
65 | - (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr delegate:(id)delegate dismissedAutomatically:(BOOL)dismissed{
66 | [self showPopMenuWithView:view items:itemArr];
67 | self.popmenuView.delegate = delegate;
68 | self.popmenuView.dismissed = dismissed;
69 | }
70 |
71 | - (void)showPopMenuWithView:(UIView *)view items:(NSArray *)itemArr action:(action)action dismissedAutomatically:(BOOL)dismissed{
72 | [self showPopMenuWithView:view items:itemArr];
73 | self.popmenuView.dismissed = dismissed;
74 | if (action) {
75 | self.popmenuView.clickAction = action;
76 | }
77 | }
78 |
79 | - (void)setBackgroundColour:(UIColor *)color{
80 | if (self.popmenuView) {
81 | [self.popmenuView setTableViewBackgroundColor:color];
82 | }
83 | }
84 |
85 | - (void)setBackView:(UIView *)view{
86 | if (self.popmenuView) {
87 | self.popmenuView.tableView.backgroundView = view;
88 | }
89 | }
90 |
91 | - (void)dismiss{
92 | [UIView animateWithDuration:0.2f animations:^{
93 | self.popmenuView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.0];
94 | self.popmenuView.tableView.transform = CGAffineTransformMakeScale(0.001, 0.001);
95 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
96 | [self.popmenuView.triangleLayer removeFromSuperlayer];
97 | });
98 | } completion:^(BOOL finished) {
99 | [self.popmenuView.tableView removeFromSuperview];
100 | [self.popmenuView removeFromSuperview];
101 | self.popmenuView = nil;
102 | }];
103 | }
104 |
105 | @end
106 |
--------------------------------------------------------------------------------
/HNQQPopMenu/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 |
33 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/HNQQPopMenu/Source/HNPopMenuView.m:
--------------------------------------------------------------------------------
1 | //
2 | // HNQQDropMenuView.m
3 | // HNPopMenu
4 | //
5 | // Created by ZakariyyaSv on 16/4/2.
6 | // Copyright © 2016年 ZakariyyaSv. All rights reserved.
7 | //
8 |
9 | #import "HNPopMenuView.h"
10 | #import "HNPopMenuTableViewCell.h"
11 | #import "HNPopMenuManager.h"
12 | #import "HNPopMenuModel.h"
13 |
14 | static const CGFloat triangleHeight = 10.0f;
15 | static const CGFloat margin = 10.0f;
16 | #define screenHeight [UIScreen mainScreen].bounds.size.height
17 |
18 | @interface HNPopMenuView()
19 |
20 | @property (nonatomic,strong) NSArray *dataArr;
21 |
22 | @property (nonatomic,assign) CGPoint startPoint;
23 |
24 | @end
25 |
26 | @implementation HNPopMenuView
27 |
28 | - (instancetype)initWithView:(UIView *)view items:(NSArray *)itemArr{
29 | if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
30 | self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.0];
31 | _menuWidth = 150.0f;
32 | _cellHeight = 44.0f;
33 | _limitMargin = 40.0f;
34 | _dismissed = YES;
35 | CGRect convertFrame = [view.superview convertRect:view.frame toView:self];
36 | CGFloat viewCenterX = convertFrame.origin.x + convertFrame.size.width * 0.5;
37 | CGFloat tableViewY = CGRectGetMaxY(convertFrame) + margin;
38 | CGFloat tableViewX = viewCenterX - _menuWidth * 0.5 + _menuWidth * 0.5;
39 | CGFloat orginTableViewH = _cellHeight * itemArr.count;
40 | CGFloat tableViewH = (orginTableViewH + tableViewY + _limitMargin) <= screenHeight ? orginTableViewH : (screenHeight - tableViewY - _limitMargin);
41 | tableViewY = tableViewY - 0.5 * tableViewH;
42 | if (tableViewX < margin + _menuWidth * 0.5) {
43 | tableViewX = margin - _menuWidth * 0.5;
44 | }
45 | else if (tableViewX + _menuWidth > [UIScreen mainScreen].bounds.size.width - margin){
46 | tableViewX = [UIScreen mainScreen].bounds.size.width - margin - _menuWidth * 0.5;
47 | }
48 | _startPoint = CGPointMake(viewCenterX, tableViewY - triangleHeight + 0.5 * tableViewH);
49 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(tableViewX, tableViewY, _menuWidth, tableViewH) style:UITableViewStylePlain];
50 | _tableView.backgroundColor = [UIColor whiteColor];
51 | _tableView.layer.cornerRadius = 10.0f;
52 | _tableView.layer.masksToBounds = YES;
53 | _tableView.dataSource = self;
54 | _tableView.delegate = self;
55 | _tableView.bounces = NO;
56 | _tableView.layer.anchorPoint = viewCenterX > [UIScreen mainScreen].bounds.size.width * 0.5 ? CGPointMake(1.0f, 0.0f) :CGPointMake(0.0f, 0.0f);
57 | _tableView.transform = CGAffineTransformMakeScale(0.001, 0.001);
58 | _tableView.rowHeight = _cellHeight;
59 | _dataArr = itemArr;
60 | [self addSubview:_tableView];
61 | [self drawTriangleLayer];
62 | }
63 | return self;
64 | }
65 |
66 | - (void)drawTriangleLayer {
67 | CGFloat triangleLength = triangleHeight * 2.0 / 1.732;
68 | UIBezierPath *path = [UIBezierPath bezierPath];
69 | [path moveToPoint:_startPoint];
70 | [path addLineToPoint:CGPointMake(_startPoint.x - triangleLength * 0.5, _startPoint.y + triangleHeight)];
71 | [path addLineToPoint:CGPointMake(_startPoint.x + triangleLength * 0.5, _startPoint.y + triangleHeight)];
72 | CAShapeLayer *triangleLayer = [CAShapeLayer layer];
73 | triangleLayer.path = path.CGPath;
74 | triangleLayer.fillColor = self.tableView.backgroundColor.CGColor;
75 | triangleLayer.strokeColor = self.tableView.backgroundColor.CGColor;
76 | self.triangleLayer = triangleLayer;
77 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.15f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
78 | [self.layer addSublayer:triangleLayer];
79 | });
80 | }
81 |
82 | - (void)setTableViewBackgroundColor:(UIColor *)backgroundColor{
83 | [self.triangleLayer removeFromSuperlayer];
84 | [self drawTriangleLayer];
85 | }
86 |
87 | - (void)setMenuWidth:(CGFloat)menuWidth{
88 | _menuWidth = menuWidth;
89 | CGRect tableViewFrame = _tableView.frame;
90 | CGPoint tableViewCenter = _tableView.center;
91 | tableViewFrame.size.width = _menuWidth;
92 | tableViewFrame.origin.x = tableViewCenter.x - _menuWidth * 0.5;
93 | if (tableViewFrame.origin.x < margin + _menuWidth * 0.5) {
94 | tableViewFrame.origin.x = margin - _menuWidth * 0.5;
95 | }
96 | else if (tableViewFrame.origin.x > [UIScreen mainScreen].bounds.size.width - margin){
97 | tableViewFrame.origin.x = [UIScreen mainScreen].bounds.size.width - margin - _menuWidth * 0.5;
98 | }
99 | _tableView.frame = tableViewFrame;
100 | }
101 |
102 | - (void)setCellHeight:(CGFloat)cellHeight{
103 | _cellHeight = cellHeight;
104 | _tableView.rowHeight = _cellHeight;
105 | }
106 |
107 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
108 | [HNPopMenuManager dismiss];
109 | }
110 |
111 | #pragma mark - UITableViewDataSource
112 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
113 | return self.dataArr.count;
114 | }
115 |
116 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
117 | HNPopMenuTableViewCell *cell = [[HNPopMenuTableViewCell alloc] initWithTableView:tableView];
118 | HNPopMenuModel *model = self.dataArr[indexPath.row];
119 | cell.imageView.image = [UIImage imageNamed:model.imageName];
120 | cell.textLabel.text = model.title;
121 | return cell;
122 | }
123 |
124 | #pragma mark - UITableViewDelegate
125 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
126 | [self tableView:tableView didDeselectRowAtIndexPath:indexPath];
127 | if ([self.delegate respondsToSelector:@selector(QQPopMenuView:didSelectRow:)]) {
128 | [self.delegate QQPopMenuView:self didSelectRow:indexPath.row];
129 | self.dismissed == YES ? [HNPopMenuManager dismiss] : nil;
130 | }
131 | if (self.clickAction) {
132 | self.clickAction(indexPath.row);
133 | self.dismissed == YES ? [HNPopMenuManager dismiss] : nil;
134 | }
135 | }
136 |
137 | - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{
138 |
139 | }
140 |
141 | @end
142 |
--------------------------------------------------------------------------------
/HNQQPopMenu.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1B093C9A1CAF5621009653AC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093C991CAF5621009653AC /* main.m */; };
11 | 1B093C9D1CAF5621009653AC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093C9C1CAF5621009653AC /* AppDelegate.m */; };
12 | 1B093CA01CAF5621009653AC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093C9F1CAF5621009653AC /* ViewController.m */; };
13 | 1B093CA31CAF5621009653AC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B093CA11CAF5621009653AC /* Main.storyboard */; };
14 | 1B093CA51CAF5621009653AC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1B093CA41CAF5621009653AC /* Assets.xcassets */; };
15 | 1B093CA81CAF5621009653AC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B093CA61CAF5621009653AC /* LaunchScreen.storyboard */; };
16 | 1B093CB61CAF571F009653AC /* HNPopMenuManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093CB51CAF571F009653AC /* HNPopMenuManager.m */; };
17 | 1B093CB91CAF5970009653AC /* HNPopMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093CB81CAF5970009653AC /* HNPopMenuView.m */; };
18 | 1B093CBF1CAF5EB1009653AC /* HNPopMenuTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093CBE1CAF5EB1009653AC /* HNPopMenuTableViewCell.m */; };
19 | 1B093CC51CAF9540009653AC /* HNPopMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B093CC41CAF9540009653AC /* HNPopMenuModel.m */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXFileReference section */
23 | 1B093C951CAF5621009653AC /* HNQQPopMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HNQQPopMenu.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 1B093C991CAF5621009653AC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
25 | 1B093C9B1CAF5621009653AC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
26 | 1B093C9C1CAF5621009653AC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
27 | 1B093C9E1CAF5621009653AC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
28 | 1B093C9F1CAF5621009653AC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
29 | 1B093CA21CAF5621009653AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
30 | 1B093CA41CAF5621009653AC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
31 | 1B093CA71CAF5621009653AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
32 | 1B093CA91CAF5621009653AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | 1B093CB41CAF571F009653AC /* HNPopMenuManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNPopMenuManager.h; sourceTree = ""; };
34 | 1B093CB51CAF571F009653AC /* HNPopMenuManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNPopMenuManager.m; sourceTree = ""; };
35 | 1B093CB71CAF5970009653AC /* HNPopMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNPopMenuView.h; sourceTree = ""; };
36 | 1B093CB81CAF5970009653AC /* HNPopMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNPopMenuView.m; sourceTree = ""; };
37 | 1B093CBD1CAF5EB1009653AC /* HNPopMenuTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNPopMenuTableViewCell.h; sourceTree = ""; };
38 | 1B093CBE1CAF5EB1009653AC /* HNPopMenuTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNPopMenuTableViewCell.m; sourceTree = ""; };
39 | 1B093CC31CAF9540009653AC /* HNPopMenuModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNPopMenuModel.h; sourceTree = ""; };
40 | 1B093CC41CAF9540009653AC /* HNPopMenuModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNPopMenuModel.m; sourceTree = ""; };
41 | /* End PBXFileReference section */
42 |
43 | /* Begin PBXFrameworksBuildPhase section */
44 | 1B093C921CAF5621009653AC /* Frameworks */ = {
45 | isa = PBXFrameworksBuildPhase;
46 | buildActionMask = 2147483647;
47 | files = (
48 | );
49 | runOnlyForDeploymentPostprocessing = 0;
50 | };
51 | /* End PBXFrameworksBuildPhase section */
52 |
53 | /* Begin PBXGroup section */
54 | 1B093C8C1CAF5621009653AC = {
55 | isa = PBXGroup;
56 | children = (
57 | 1B093C971CAF5621009653AC /* HNQQPopMenu */,
58 | 1B093C961CAF5621009653AC /* Products */,
59 | );
60 | sourceTree = "";
61 | };
62 | 1B093C961CAF5621009653AC /* Products */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 1B093C951CAF5621009653AC /* HNQQPopMenu.app */,
66 | );
67 | name = Products;
68 | sourceTree = "";
69 | };
70 | 1B093C971CAF5621009653AC /* HNQQPopMenu */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 1B093CB31CAF5713009653AC /* Source */,
74 | 1B093C9B1CAF5621009653AC /* AppDelegate.h */,
75 | 1B093C9C1CAF5621009653AC /* AppDelegate.m */,
76 | 1B093C9E1CAF5621009653AC /* ViewController.h */,
77 | 1B093C9F1CAF5621009653AC /* ViewController.m */,
78 | 1B093CA11CAF5621009653AC /* Main.storyboard */,
79 | 1B093CA41CAF5621009653AC /* Assets.xcassets */,
80 | 1B093CA61CAF5621009653AC /* LaunchScreen.storyboard */,
81 | 1B093CA91CAF5621009653AC /* Info.plist */,
82 | 1B093C981CAF5621009653AC /* Supporting Files */,
83 | );
84 | path = HNQQPopMenu;
85 | sourceTree = "";
86 | };
87 | 1B093C981CAF5621009653AC /* Supporting Files */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 1B093C991CAF5621009653AC /* main.m */,
91 | );
92 | name = "Supporting Files";
93 | sourceTree = "";
94 | };
95 | 1B093CB31CAF5713009653AC /* Source */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 1B093CB41CAF571F009653AC /* HNPopMenuManager.h */,
99 | 1B093CB51CAF571F009653AC /* HNPopMenuManager.m */,
100 | 1B093CB71CAF5970009653AC /* HNPopMenuView.h */,
101 | 1B093CB81CAF5970009653AC /* HNPopMenuView.m */,
102 | 1B093CBD1CAF5EB1009653AC /* HNPopMenuTableViewCell.h */,
103 | 1B093CBE1CAF5EB1009653AC /* HNPopMenuTableViewCell.m */,
104 | 1B093CC31CAF9540009653AC /* HNPopMenuModel.h */,
105 | 1B093CC41CAF9540009653AC /* HNPopMenuModel.m */,
106 | );
107 | path = Source;
108 | sourceTree = "";
109 | };
110 | /* End PBXGroup section */
111 |
112 | /* Begin PBXNativeTarget section */
113 | 1B093C941CAF5621009653AC /* HNQQPopMenu */ = {
114 | isa = PBXNativeTarget;
115 | buildConfigurationList = 1B093CAC1CAF5621009653AC /* Build configuration list for PBXNativeTarget "HNQQPopMenu" */;
116 | buildPhases = (
117 | 1B093C911CAF5621009653AC /* Sources */,
118 | 1B093C921CAF5621009653AC /* Frameworks */,
119 | 1B093C931CAF5621009653AC /* Resources */,
120 | );
121 | buildRules = (
122 | );
123 | dependencies = (
124 | );
125 | name = HNQQPopMenu;
126 | productName = HNQQPopMenu;
127 | productReference = 1B093C951CAF5621009653AC /* HNQQPopMenu.app */;
128 | productType = "com.apple.product-type.application";
129 | };
130 | /* End PBXNativeTarget section */
131 |
132 | /* Begin PBXProject section */
133 | 1B093C8D1CAF5621009653AC /* Project object */ = {
134 | isa = PBXProject;
135 | attributes = {
136 | CLASSPREFIX = HN;
137 | LastUpgradeCheck = 0730;
138 | ORGANIZATIONNAME = Zakariyya;
139 | TargetAttributes = {
140 | 1B093C941CAF5621009653AC = {
141 | CreatedOnToolsVersion = 7.3;
142 | DevelopmentTeam = 9QL89B559R;
143 | };
144 | };
145 | };
146 | buildConfigurationList = 1B093C901CAF5621009653AC /* Build configuration list for PBXProject "HNQQPopMenu" */;
147 | compatibilityVersion = "Xcode 3.2";
148 | developmentRegion = English;
149 | hasScannedForEncodings = 0;
150 | knownRegions = (
151 | en,
152 | Base,
153 | );
154 | mainGroup = 1B093C8C1CAF5621009653AC;
155 | productRefGroup = 1B093C961CAF5621009653AC /* Products */;
156 | projectDirPath = "";
157 | projectRoot = "";
158 | targets = (
159 | 1B093C941CAF5621009653AC /* HNQQPopMenu */,
160 | );
161 | };
162 | /* End PBXProject section */
163 |
164 | /* Begin PBXResourcesBuildPhase section */
165 | 1B093C931CAF5621009653AC /* Resources */ = {
166 | isa = PBXResourcesBuildPhase;
167 | buildActionMask = 2147483647;
168 | files = (
169 | 1B093CA81CAF5621009653AC /* LaunchScreen.storyboard in Resources */,
170 | 1B093CA51CAF5621009653AC /* Assets.xcassets in Resources */,
171 | 1B093CA31CAF5621009653AC /* Main.storyboard in Resources */,
172 | );
173 | runOnlyForDeploymentPostprocessing = 0;
174 | };
175 | /* End PBXResourcesBuildPhase section */
176 |
177 | /* Begin PBXSourcesBuildPhase section */
178 | 1B093C911CAF5621009653AC /* Sources */ = {
179 | isa = PBXSourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 1B093CA01CAF5621009653AC /* ViewController.m in Sources */,
183 | 1B093C9D1CAF5621009653AC /* AppDelegate.m in Sources */,
184 | 1B093CB61CAF571F009653AC /* HNPopMenuManager.m in Sources */,
185 | 1B093CC51CAF9540009653AC /* HNPopMenuModel.m in Sources */,
186 | 1B093C9A1CAF5621009653AC /* main.m in Sources */,
187 | 1B093CBF1CAF5EB1009653AC /* HNPopMenuTableViewCell.m in Sources */,
188 | 1B093CB91CAF5970009653AC /* HNPopMenuView.m in Sources */,
189 | );
190 | runOnlyForDeploymentPostprocessing = 0;
191 | };
192 | /* End PBXSourcesBuildPhase section */
193 |
194 | /* Begin PBXVariantGroup section */
195 | 1B093CA11CAF5621009653AC /* Main.storyboard */ = {
196 | isa = PBXVariantGroup;
197 | children = (
198 | 1B093CA21CAF5621009653AC /* Base */,
199 | );
200 | name = Main.storyboard;
201 | sourceTree = "";
202 | };
203 | 1B093CA61CAF5621009653AC /* LaunchScreen.storyboard */ = {
204 | isa = PBXVariantGroup;
205 | children = (
206 | 1B093CA71CAF5621009653AC /* Base */,
207 | );
208 | name = LaunchScreen.storyboard;
209 | sourceTree = "";
210 | };
211 | /* End PBXVariantGroup section */
212 |
213 | /* Begin XCBuildConfiguration section */
214 | 1B093CAA1CAF5621009653AC /* Debug */ = {
215 | isa = XCBuildConfiguration;
216 | buildSettings = {
217 | ALWAYS_SEARCH_USER_PATHS = NO;
218 | CLANG_ANALYZER_NONNULL = YES;
219 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
220 | CLANG_CXX_LIBRARY = "libc++";
221 | CLANG_ENABLE_MODULES = YES;
222 | CLANG_ENABLE_OBJC_ARC = YES;
223 | CLANG_WARN_BOOL_CONVERSION = YES;
224 | CLANG_WARN_CONSTANT_CONVERSION = YES;
225 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
226 | CLANG_WARN_EMPTY_BODY = YES;
227 | CLANG_WARN_ENUM_CONVERSION = YES;
228 | CLANG_WARN_INT_CONVERSION = YES;
229 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
230 | CLANG_WARN_UNREACHABLE_CODE = YES;
231 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
232 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
233 | COPY_PHASE_STRIP = NO;
234 | DEBUG_INFORMATION_FORMAT = dwarf;
235 | ENABLE_STRICT_OBJC_MSGSEND = YES;
236 | ENABLE_TESTABILITY = YES;
237 | GCC_C_LANGUAGE_STANDARD = gnu99;
238 | GCC_DYNAMIC_NO_PIC = NO;
239 | GCC_NO_COMMON_BLOCKS = YES;
240 | GCC_OPTIMIZATION_LEVEL = 0;
241 | GCC_PREPROCESSOR_DEFINITIONS = (
242 | "DEBUG=1",
243 | "$(inherited)",
244 | );
245 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
246 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
247 | GCC_WARN_UNDECLARED_SELECTOR = YES;
248 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
249 | GCC_WARN_UNUSED_FUNCTION = YES;
250 | GCC_WARN_UNUSED_VARIABLE = YES;
251 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
252 | MTL_ENABLE_DEBUG_INFO = YES;
253 | ONLY_ACTIVE_ARCH = YES;
254 | SDKROOT = iphoneos;
255 | TARGETED_DEVICE_FAMILY = "1,2";
256 | };
257 | name = Debug;
258 | };
259 | 1B093CAB1CAF5621009653AC /* Release */ = {
260 | isa = XCBuildConfiguration;
261 | buildSettings = {
262 | ALWAYS_SEARCH_USER_PATHS = NO;
263 | CLANG_ANALYZER_NONNULL = YES;
264 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
265 | CLANG_CXX_LIBRARY = "libc++";
266 | CLANG_ENABLE_MODULES = YES;
267 | CLANG_ENABLE_OBJC_ARC = YES;
268 | CLANG_WARN_BOOL_CONVERSION = YES;
269 | CLANG_WARN_CONSTANT_CONVERSION = YES;
270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
271 | CLANG_WARN_EMPTY_BODY = YES;
272 | CLANG_WARN_ENUM_CONVERSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
275 | CLANG_WARN_UNREACHABLE_CODE = YES;
276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
278 | COPY_PHASE_STRIP = NO;
279 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
280 | ENABLE_NS_ASSERTIONS = NO;
281 | ENABLE_STRICT_OBJC_MSGSEND = YES;
282 | GCC_C_LANGUAGE_STANDARD = gnu99;
283 | GCC_NO_COMMON_BLOCKS = YES;
284 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
285 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
286 | GCC_WARN_UNDECLARED_SELECTOR = YES;
287 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
288 | GCC_WARN_UNUSED_FUNCTION = YES;
289 | GCC_WARN_UNUSED_VARIABLE = YES;
290 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
291 | MTL_ENABLE_DEBUG_INFO = NO;
292 | SDKROOT = iphoneos;
293 | TARGETED_DEVICE_FAMILY = "1,2";
294 | VALIDATE_PRODUCT = YES;
295 | };
296 | name = Release;
297 | };
298 | 1B093CAD1CAF5621009653AC /* Debug */ = {
299 | isa = XCBuildConfiguration;
300 | buildSettings = {
301 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
302 | CODE_SIGN_IDENTITY = "iPhone Developer";
303 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
304 | INFOPLIST_FILE = HNQQPopMenu/Info.plist;
305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
306 | PRODUCT_BUNDLE_IDENTIFIER = zakariyya.HNQQPopMenu;
307 | PRODUCT_NAME = "$(TARGET_NAME)";
308 | PROVISIONING_PROFILE = "";
309 | };
310 | name = Debug;
311 | };
312 | 1B093CAE1CAF5621009653AC /* Release */ = {
313 | isa = XCBuildConfiguration;
314 | buildSettings = {
315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
316 | CODE_SIGN_IDENTITY = "iPhone Developer";
317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
318 | INFOPLIST_FILE = HNQQPopMenu/Info.plist;
319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
320 | PRODUCT_BUNDLE_IDENTIFIER = zakariyya.HNQQPopMenu;
321 | PRODUCT_NAME = "$(TARGET_NAME)";
322 | PROVISIONING_PROFILE = "";
323 | };
324 | name = Release;
325 | };
326 | /* End XCBuildConfiguration section */
327 |
328 | /* Begin XCConfigurationList section */
329 | 1B093C901CAF5621009653AC /* Build configuration list for PBXProject "HNQQPopMenu" */ = {
330 | isa = XCConfigurationList;
331 | buildConfigurations = (
332 | 1B093CAA1CAF5621009653AC /* Debug */,
333 | 1B093CAB1CAF5621009653AC /* Release */,
334 | );
335 | defaultConfigurationIsVisible = 0;
336 | defaultConfigurationName = Release;
337 | };
338 | 1B093CAC1CAF5621009653AC /* Build configuration list for PBXNativeTarget "HNQQPopMenu" */ = {
339 | isa = XCConfigurationList;
340 | buildConfigurations = (
341 | 1B093CAD1CAF5621009653AC /* Debug */,
342 | 1B093CAE1CAF5621009653AC /* Release */,
343 | );
344 | defaultConfigurationIsVisible = 0;
345 | defaultConfigurationName = Release;
346 | };
347 | /* End XCConfigurationList section */
348 | };
349 | rootObject = 1B093C8D1CAF5621009653AC /* Project object */;
350 | }
351 |
--------------------------------------------------------------------------------