// // ApplyContact.m // LN_School // // Created by EchoShacolee on 2017/9/26. // Copyright © 2017年 Danson. All rights reserved. // #import "ApplyContact.h" @interface ApplyContact () @property (weak, nonatomic) IBOutlet UIButton *sureBtn; @property (weak, nonatomic) IBOutlet UILabel *lab; @property (weak, nonatomic) IBOutlet UIButton *jumpBtn; @end @implementation ApplyContact - (void)viewDidLoad { [super viewDidLoad]; if (kDevice_Is_iPhoneX) { CGRect frame = _sureBtn.frame; _sureBtn.frame = CGRectMake(frame.origin.x, frame.origin.y-kSafeAreaBottomHeight, frame.size.width, frame.size.height); CGRect frame2 = _jumpBtn.frame; _jumpBtn.frame = CGRectMake(frame2.origin.x, kStatusHeight+10, frame2.size.width, frame2.size.height); } _sureBtn.backgroundColor = RQMianColor; _lab.text = @"允许极速驾培访问手机通讯录,方便快捷和你的手机联系人联系。\n(通讯录信息会受到加密保护,仅存在手机本地方便用户联系,不用作上传到服务器或其它用途)"; NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; [ud setObject:@"YES" forKey:@"hasLaunched"]; [ud synchronize]; } - (IBAction)jump:(id)sender { [self dismissViewControllerAnimated:YES completion:nil]; } - (IBAction)sure:(id)sender { [self dismissViewControllerAnimated:YES completion:^{ UITabBarController *tabbarC = (UITabBarController *)myDelegate.window.rootViewController; tabbarC.selectedIndex = 2; }]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end