ApplyContact.m 2.0 KB

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