1
This commit is contained in:
@@ -9,11 +9,14 @@
|
||||
#import "HomeHeadView.h"
|
||||
#import "KBPanModalView.h"
|
||||
#import "KBGuideVC.h" // 首次安装指引页
|
||||
#import "WMDragView.h"
|
||||
|
||||
@interface HomeMainVC ()
|
||||
@property (nonatomic, strong) HomeHeadView *headView;
|
||||
@property (nonatomic, strong) KBPanModalView *simplePanModalView;
|
||||
|
||||
/// 权限按钮
|
||||
@property (nonatomic, strong) WMDragView *keyPermissButton;
|
||||
@end
|
||||
|
||||
@implementation HomeMainVC
|
||||
@@ -27,8 +30,6 @@
|
||||
[bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
// CGFloat topV = (500);
|
||||
|
||||
[self.view addSubview:self.headView];
|
||||
[self setupMas];
|
||||
// 创建sheetVC
|
||||
@@ -42,6 +43,14 @@
|
||||
}
|
||||
self.simplePanModalView.topInset = 100;
|
||||
[self.simplePanModalView presentInView:self.view];
|
||||
[self.view addSubview:self.keyPermissButton];
|
||||
self.keyPermissButton.frame = CGRectMake(KB_SCREEN_WIDTH - 92, KB_SCREEN_HEIGHT - 78 - 120, 92, 78);
|
||||
|
||||
KBWeakSelf
|
||||
self.keyPermissButton.clickDragViewBlock = ^(WMDragView *dragView){
|
||||
KBGuideVC *vc = [KBGuideVC new];
|
||||
[weakSelf.navigationController pushViewController:vc animated:true];
|
||||
};
|
||||
}
|
||||
|
||||
// 在界面可见后做“首次安装”检查,避免在 viewDidLoad 期间 push 引起的转场警告
|
||||
@@ -87,4 +96,15 @@
|
||||
}
|
||||
|
||||
|
||||
- (WMDragView *)keyPermissButton{
|
||||
if (!_keyPermissButton) {
|
||||
_keyPermissButton = [[WMDragView alloc] init];
|
||||
_keyPermissButton.backgroundColor = [UIColor clearColor];
|
||||
_keyPermissButton.isKeepBounds = true;
|
||||
[_keyPermissButton.button setImage:[UIImage imageNamed:@"key_permiss_icon"] forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
return _keyPermissButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user