AboutUsViewController.m 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. //
  2. // AboutUsViewController.m
  3. // 千模
  4. //
  5. // Created by 杨键 on 2018/8/20.
  6. // Copyright © 2018年 MUMEI. All rights reserved.
  7. //
  8. #import "AboutUsViewController.h"
  9. @interface AboutUsViewController ()
  10. @end
  11. @implementation AboutUsViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. self.title = @"联系我们";
  15. self.view.backgroundColor = RGB(245, 245, 245);
  16. self.extendedLayoutIncludesOpaqueBars = YES;
  17. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  18. btn.frame = CGRectMake(0, 0, 40, 40);
  19. [btn setImage:[UIImage imageNamed:@"fanhui2"] forState:UIControlStateNormal];
  20. btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
  21. [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
  22. UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
  23. UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
  24. nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整
  25. self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
  26. [self createSubviews];
  27. }
  28. - (void)viewWillAppear:(BOOL)animated {
  29. [super viewWillAppear:animated];
  30. [self.navigationController setNavigationBarHidden:NO animated:YES];
  31. }
  32. - (void)backClick {
  33. [self.navigationController popViewControllerAnimated:YES];
  34. }
  35. - (void)createSubviews {
  36. UIImageView *iconImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon60"]];
  37. iconImage.layer.cornerRadius = 10;
  38. iconImage.layer.masksToBounds = YES;
  39. [self.view addSubview:iconImage];
  40. [iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
  41. make.centerX.equalTo(self.view.mas_centerX);
  42. make.top.equalTo(self.view.mas_top).offset(100);
  43. make.width.equalTo(@60);
  44. make.height.equalTo(@60);
  45. }];
  46. UIView *whiteBgView = [[UIView alloc] init];
  47. whiteBgView.backgroundColor = [UIColor whiteColor];
  48. whiteBgView.layer.cornerRadius = 5;
  49. [self.view addSubview:whiteBgView];
  50. [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
  51. make.centerX.equalTo(self.view.mas_centerX);
  52. make.top.equalTo(iconImage.mas_bottom).offset(30);
  53. make.width.equalTo(@(ScreenWidth - 20));
  54. make.height.equalTo(@200);
  55. }];
  56. UILabel *introduceLabel = [[UILabel alloc] init];
  57. introduceLabel.numberOfLines = 0;
  58. introduceLabel.text = @"千模APP[80万模特的能量场]\n千模app南京千模信息科技有限公司集合多年对国内模特艺人商演行业现状及行业痛点,完善及创新整合的商业应用平台,模特艺人通过后台完善自己的模卡信息和技能信息,让用户第一时间找到适合的模特艺人,通过视频面试让模特足不出户能和雇主面对面沟通,促进订单的达成。\n千模平台以保障模特艺人的经济利益和安全为己任,搭建模特艺人与企业间的市场化桥梁,为中国模特艺人创造利益最大化和成为模特现实梦想的舞台。";
  59. introduceLabel.textColor = RGB(51, 51, 51);
  60. introduceLabel.font = [UIFont systemFontOfSize:14];
  61. [whiteBgView addSubview:introduceLabel];
  62. [introduceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  63. make.centerX.equalTo(whiteBgView.mas_centerX);
  64. make.centerY.equalTo(whiteBgView.mas_centerY);
  65. make.top.equalTo(whiteBgView.mas_top).offset(15);
  66. make.left.equalTo(whiteBgView.mas_left).offset(10);
  67. }];
  68. UIButton *telButton = [[UIButton alloc] init];
  69. telButton.layer.cornerRadius = 5;
  70. telButton.backgroundColor = [UIColor whiteColor];
  71. [telButton setTitle:@"客服电话:15805170379" forState:UIControlStateNormal];
  72. [telButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
  73. [telButton setImage:[UIImage imageNamed:@"youjiantou"] forState:UIControlStateNormal];
  74. [telButton setTitleEdgeInsets:UIEdgeInsetsMake(5, 10, 5, ScreenWidth - 200)];
  75. [telButton setImageEdgeInsets:UIEdgeInsetsMake(5, ScreenWidth - 40, 5, 10)];
  76. telButton.titleLabel.font = [UIFont systemFontOfSize:14];
  77. [telButton addTarget:self action:@selector(clickTel) forControlEvents:UIControlEventTouchUpInside];
  78. [self.view addSubview:telButton];
  79. [telButton mas_makeConstraints:^(MASConstraintMaker *make) {
  80. make.top.equalTo(whiteBgView.mas_bottom).offset(10);
  81. make.left.equalTo(whiteBgView.mas_left);
  82. make.right.equalTo(whiteBgView.mas_right);
  83. make.height.equalTo(@40);
  84. }];
  85. UIButton *qqButton = [[UIButton alloc] init];
  86. qqButton.layer.cornerRadius = 5;
  87. qqButton.backgroundColor = [UIColor whiteColor];
  88. [qqButton setTitle:@"客服QQ:1833193888" forState:UIControlStateNormal];
  89. [qqButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
  90. [qqButton setImage:[UIImage imageNamed:@"youjiantou"] forState:UIControlStateNormal];
  91. [qqButton setTitleEdgeInsets:UIEdgeInsetsMake(5, 10, 5, ScreenWidth - 187)];
  92. [qqButton setImageEdgeInsets:UIEdgeInsetsMake(5, ScreenWidth - 40, 5, 10)];
  93. qqButton.titleLabel.font = [UIFont systemFontOfSize:14];
  94. qqButton.titleLabel.textAlignment = NSTextAlignmentLeft;
  95. [qqButton addTarget:self action:@selector(clickQQ) forControlEvents:UIControlEventTouchUpInside];
  96. [self.view addSubview:qqButton];
  97. [qqButton mas_makeConstraints:^(MASConstraintMaker *make) {
  98. make.top.equalTo(telButton.mas_bottom).offset(10);
  99. make.left.equalTo(whiteBgView.mas_left);
  100. make.right.equalTo(whiteBgView.mas_right);
  101. make.height.equalTo(@40);
  102. }];
  103. UILabel *companyLabel = [[UILabel alloc] init];
  104. companyLabel.text = @"南京千模信息科技有限公司 版权所有";
  105. companyLabel.textColor = RGB(51, 51, 51);
  106. companyLabel.font = [UIFont systemFontOfSize:14];
  107. companyLabel.textAlignment = NSTextAlignmentCenter;
  108. [self.view addSubview:companyLabel];
  109. [companyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  110. make.bottom.equalTo(self.view.mas_bottom).offset(-10);
  111. make.left.equalTo(whiteBgView.mas_left);
  112. make.right.equalTo(whiteBgView.mas_right);
  113. make.height.equalTo(@15);
  114. }];
  115. UILabel *dateLabel = [[UILabel alloc] init];
  116. dateLabel.text = @"©2018 chmo All Rights Reserved.";
  117. dateLabel.textColor = RGB(102, 102, 102);
  118. dateLabel.font = [UIFont systemFontOfSize:14];
  119. dateLabel.textAlignment = NSTextAlignmentCenter;
  120. [self.view addSubview:dateLabel];
  121. [dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  122. make.bottom.equalTo(companyLabel.mas_top);
  123. make.left.equalTo(whiteBgView.mas_left);
  124. make.right.equalTo(whiteBgView.mas_right);
  125. make.height.equalTo(@15);
  126. }];
  127. }
  128. - (void)clickTel {
  129. NSString *PhoneStr = [NSString stringWithFormat:@"tel://%@", @"15805170379"];
  130. UIApplication *app = [UIApplication sharedApplication];
  131. if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) {
  132. [app openURL:[NSURL URLWithString:PhoneStr]];
  133. }
  134. // UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"联系客服\n15805170379" message: nil preferredStyle:UIAlertControllerStyleAlert];
  135. // // 添加按钮
  136. // [alert addAction:[UIAlertAction actionWithTitle:@"呼叫" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
  137. // NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"15805170379"];
  138. // UIApplication * app = [UIApplication sharedApplication];
  139. // if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) {
  140. // [app openURL:[NSURL URLWithString:PhoneStr]];
  141. // }
  142. // }]];
  143. // [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
  144. //
  145. // }]];
  146. // [self presentViewController:alert animated:YES completion:nil];
  147. }
  148. - (void)clickQQ {
  149. UIPasteboard *pboard = [UIPasteboard generalPasteboard];
  150. pboard.string = @"1833193888";
  151. UIAlertController *alertDialog = [UIAlertController alertControllerWithTitle:@"提示" message:@"QQ号已复制" preferredStyle:UIAlertControllerStyleAlert];
  152. UIAlertAction *laterAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
  153. }];
  154. [alertDialog addAction:laterAction];
  155. [self presentViewController:alertDialog animated:YES completion:nil];
  156. }
  157. - (void)didReceiveMemoryWarning {
  158. [super didReceiveMemoryWarning];
  159. // Dispose of any resources that can be recreated.
  160. }
  161. /*
  162. #pragma mark - Navigation
  163. // In a storyboard-based application, you will often want to do a little preparation before navigation
  164. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  165. // Get the new view controller using [segue destinationViewController].
  166. // Pass the selected object to the new view controller.
  167. }
  168. */
  169. @end