| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- //
- // JTKFViewController.m
- // jitao
- //
- // Created by 罗云飞 on 2018/8/19.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "JTKFViewController.h"
- @interface JTKFViewController ()
- @end
- @implementation JTKFViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.view.backgroundColor = NewGroupTableViewBackgroundColor;
- [self setNavTitle:@"技淘客服"];
- [self loadUI];
- // Do any additional setup after loading the view.
- }
- - (void)loadUI{
- UIImageView *imageview = [UIImageView new];
- [imageview setImage:NewImageNamed(@"kf11")];
- [self.view addSubview:imageview];
-
- imageview.sd_layout
- .centerXEqualToView(self.view)
- .heightIs(60)
- .widthIs(60)
- .topSpaceToView(self.view, NavHeader+90);
-
- UILabel *iphoneNumer = [UILabel new];
- iphoneNumer.text = @"客服电话:400-8800-962";
- iphoneNumer.textAlignment = NSTextAlignmentCenter;
- iphoneNumer.textColor = [UIColor colorWithString:@"#6C6C6C"];
- [self.view addSubview:iphoneNumer];
-
- iphoneNumer.sd_layout
- .centerXEqualToView(self.view)
- .heightIs(20)
- .widthIs(SCREEN_WIDTH)
- .topSpaceToView(imageview, 15);
-
- UIButton *button = [UIButton new];
- [button setTitle:@"立即咨询" forState:UIControlStateNormal];
- [button setBackgroundImage:NewImageNamed(@"anniu") forState:UIControlStateNormal];
- [button setTitleColor:NewWhiteColor forState:UIControlStateNormal];
- button.titleLabel.font = NewFont(18);
- NewTouchUpInside(button, buttonclick:);
- [self.view addSubview:button];
-
- button.sd_layout
- .centerXEqualToView(self.view)
- .topSpaceToView(iphoneNumer, 70)
- .heightIs(45)
- .widthIs(SCREEN_WIDTH-90);
- }
- - (void)buttonclick:(UIButton *)sender {
- NSLog(@"%@",@"一键电话");
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"是否拨打客户电话?" preferredStyle:(UIAlertControllerStyleAlert)];
-
- UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction *action) {
- [NewUtils callTel:@"400-8800-962"];
-
- }];
-
- UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction *action) {
-
- }];
- [alertController addAction:okAction];
- [alertController addAction:cancelAction];
- [self presentViewController:alertController 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
|