-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathNavigationBarVC.m
More file actions
59 lines (48 loc) · 1.82 KB
/
NavigationBarVC.m
File metadata and controls
59 lines (48 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// NavigationBarVC.m
// VHBoomMenuButton
//
// Created by Nightonke on 2017/4/14.
// Copyright © 2017 Nightonke. All rights reserved.
//
#import "NavigationBarVC.h"
#import "BuilderManager.h"
#import <BoomMenuButton/BoomMenuButton.h>
@interface NavigationBarVC ()
@end
@implementation NavigationBarVC
- (void)viewDidLoad
{
[super viewDidLoad];
VHBoomMenuButton *bmb1 = [[VHBoomMenuButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
bmb1.buttonEnum = VHButtonTextOutsideCircle;
bmb1.piecePlaceEnum = VHPiecePlaceDOT_9_1;
bmb1.buttonPlaceEnum = VHButtonPlaceSC_9_1;
bmb1.hasBackground = NO;
bmb1.duration = 1;
for (int i = 0; i < bmb1.pieceNumber; i++)
{
[bmb1 addBuilder:[BuilderManager textOutsideCircleButtonBuilderWithDifferentPieceColor]];
}
VHBoomMenuButton *bmb2 = [[VHBoomMenuButton alloc] initWithFrame:CGRectMake(44, 0, 44, 44)];
bmb2.buttonEnum = VHButtonHam;
bmb2.piecePlaceEnum = VHPiecePlaceHAM_4;
bmb2.buttonPlaceEnum = VHButtonPlaceHAM_4;
bmb2.hasBackground = NO;
bmb2.duration = 1;
bmb2.boomEaseName = VHEaseOutCubic;
bmb2.reboomEaseName = VHEaseOutCubic;
bmb2.boomEnum = VHBoomParabola2;
for (int i = 0; i < bmb2.pieceNumber; i++)
{
[bmb2 addBuilder:[BuilderManager hamButtonBuilderWithDifferentPieceColor]];
}
UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
[negativeSpacer setWidth:-16];
UIView *bmbs = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 88, 44)];
[bmbs addSubview:bmb1];
[bmbs addSubview:bmb2];
self.navigationItem.rightBarButtonItems = @[negativeSpacer,
[[UIBarButtonItem alloc] initWithCustomView:bmbs]];
}
@end