AboutUsViewController.m 8.7 KB

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