// // AboutUsViewController.m // 千模 // // Created by 杨键 on 2018/8/20. // Copyright © 2018年 MUMEI. All rights reserved. // #import "AboutUsViewController.h" @interface AboutUsViewController () @end @implementation AboutUsViewController - (void)viewDidLoad { [super viewDidLoad]; self.title = @"联系我们"; self.view.backgroundColor = RGB(245, 245, 245); self.extendedLayoutIncludesOpaqueBars = YES; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(0, 0, 40, 40); [btn setImage:[UIImage imageNamed:@"fanhui2"] forState:UIControlStateNormal]; btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0); [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn]; UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整 self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem]; [self createSubviews]; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:NO animated:YES]; } - (void)backClick { [self.navigationController popViewControllerAnimated:YES]; } - (void)createSubviews { UIImageView *iconImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon60"]]; iconImage.layer.cornerRadius = 10; iconImage.layer.masksToBounds = YES; [self.view addSubview:iconImage]; [iconImage mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self.view.mas_centerX); make.top.equalTo(self.view.mas_top).offset(100); make.width.equalTo(@60); make.height.equalTo(@60); }]; UIView *whiteBgView = [[UIView alloc] init]; whiteBgView.backgroundColor = [UIColor whiteColor]; whiteBgView.layer.cornerRadius = 5; [self.view addSubview:whiteBgView]; [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self.view.mas_centerX); make.top.equalTo(iconImage.mas_bottom).offset(30); make.width.equalTo(@(ScreenWidth - 20)); make.height.equalTo(@200); }]; UILabel *introduceLabel = [[UILabel alloc] init]; introduceLabel.numberOfLines = 0; introduceLabel.text = @"千模APP[80万模特的能量场]\n千模app南京千模信息科技有限公司集合多年对国内模特艺人商演行业现状及行业痛点,完善及创新整合的商业应用平台,模特艺人通过后台完善自己的模卡信息和技能信息,让用户第一时间找到适合的模特艺人,通过视频面试让模特足不出户能和雇主面对面沟通,促进订单的达成。\n千模平台以保障模特艺人的经济利益和安全为己任,搭建模特艺人与企业间的市场化桥梁,为中国模特艺人创造利益最大化和成为模特现实梦想的舞台。"; introduceLabel.textColor = RGB(51, 51, 51); introduceLabel.font = [UIFont systemFontOfSize:14]; [whiteBgView addSubview:introduceLabel]; [introduceLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(whiteBgView.mas_centerX); make.centerY.equalTo(whiteBgView.mas_centerY); make.top.equalTo(whiteBgView.mas_top).offset(15); make.left.equalTo(whiteBgView.mas_left).offset(10); }]; UIButton *telButton = [[UIButton alloc] init]; telButton.layer.cornerRadius = 5; telButton.backgroundColor = [UIColor whiteColor]; [telButton setTitle:@"客服电话:17768144625" forState:UIControlStateNormal]; [telButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal]; [telButton setImage:[UIImage imageNamed:@"youjiantou"] forState:UIControlStateNormal]; [telButton setTitleEdgeInsets:UIEdgeInsetsMake(5, 10, 5, ScreenWidth - 200)]; [telButton setImageEdgeInsets:UIEdgeInsetsMake(5, ScreenWidth - 40, 5, 10)]; telButton.titleLabel.font = [UIFont systemFontOfSize:14]; [telButton addTarget:self action:@selector(clickTel) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:telButton]; [telButton mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(whiteBgView.mas_bottom).offset(10); make.left.equalTo(whiteBgView.mas_left); make.right.equalTo(whiteBgView.mas_right); make.height.equalTo(@40); }]; UIButton *qqButton = [[UIButton alloc] init]; qqButton.layer.cornerRadius = 5; qqButton.backgroundColor = [UIColor whiteColor]; [qqButton setTitle:@"客服QQ:1833193888" forState:UIControlStateNormal]; [qqButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal]; [qqButton setImage:[UIImage imageNamed:@"youjiantou"] forState:UIControlStateNormal]; [qqButton setTitleEdgeInsets:UIEdgeInsetsMake(5, 10, 5, ScreenWidth - 187)]; [qqButton setImageEdgeInsets:UIEdgeInsetsMake(5, ScreenWidth - 40, 5, 10)]; qqButton.titleLabel.font = [UIFont systemFontOfSize:14]; qqButton.titleLabel.textAlignment = NSTextAlignmentLeft; [qqButton addTarget:self action:@selector(clickQQ) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:qqButton]; [qqButton mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(telButton.mas_bottom).offset(10); make.left.equalTo(whiteBgView.mas_left); make.right.equalTo(whiteBgView.mas_right); make.height.equalTo(@40); }]; UILabel *companyLabel = [[UILabel alloc] init]; companyLabel.text = @"南京千模信息科技有限公司 版权所有"; companyLabel.textColor = RGB(51, 51, 51); companyLabel.font = [UIFont systemFontOfSize:14]; companyLabel.textAlignment = NSTextAlignmentCenter; [self.view addSubview:companyLabel]; [companyLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.equalTo(self.view.mas_bottom).offset(-10); make.left.equalTo(whiteBgView.mas_left); make.right.equalTo(whiteBgView.mas_right); make.height.equalTo(@15); }]; UILabel *dateLabel = [[UILabel alloc] init]; dateLabel.text = @"©2018 chmo All Rights Reserved."; dateLabel.textColor = RGB(102, 102, 102); dateLabel.font = [UIFont systemFontOfSize:14]; dateLabel.textAlignment = NSTextAlignmentCenter; [self.view addSubview:dateLabel]; [dateLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.equalTo(companyLabel.mas_top); make.left.equalTo(whiteBgView.mas_left); make.right.equalTo(whiteBgView.mas_right); make.height.equalTo(@15); }]; } - (void)clickTel { NSString *PhoneStr = [NSString stringWithFormat:@"tel://%@", @"17768144625"]; UIApplication *app = [UIApplication sharedApplication]; if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) { [app openURL:[NSURL URLWithString:PhoneStr]]; } // UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"联系客服\n17768144625" message: nil preferredStyle:UIAlertControllerStyleAlert]; // // 添加按钮 // [alert addAction:[UIAlertAction actionWithTitle:@"呼叫" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { // NSString* PhoneStr = [NSString stringWithFormat:@"tel://%@",@"17768144625"]; // UIApplication * app = [UIApplication sharedApplication]; // if ([app canOpenURL:[NSURL URLWithString:PhoneStr]]) { // [app openURL:[NSURL URLWithString:PhoneStr]]; // } // }]]; // [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { // // }]]; // [self presentViewController:alert animated:YES completion:nil]; } - (void)clickQQ { UIPasteboard *pboard = [UIPasteboard generalPasteboard]; pboard.string = @"1833193888"; UIAlertController *alertDialog = [UIAlertController alertControllerWithTitle:@"提示" message:@"QQ号已复制" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *laterAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { }]; [alertDialog addAction:laterAction]; [self presentViewController:alertDialog animated:YES completion:nil]; } - (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