// // HelpViewController.m // BuWanVideo2.0 // // Created by weikou2016 on 16/8/10. // Copyright © 2016年 com.yeshi.buwansheque.ios. All rights reserved. // #import "HelpViewController.h" #import "SettingWebView.h" @interface HelpViewController () @end @implementation HelpViewController - (void)viewDidLoad { [super viewDidLoad]; [self initScene]; } - (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; //[MobClick beginLogPageView:@"帮助与反馈"]; } - (void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; //[MobClick endLogPageView:@"帮助与反馈"]; } -(void)initScene{ self.navigationItem.title = @"帮助与反馈"; self.navigationController.navigationBar.titleTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}; UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setImage:[[UIImage imageNamed:@"详情页面返回"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal]; [button addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside]; button.frame = CGRectMake(0, 0, 32, 32); UIBarButtonItem *iconBarItem=[[UIBarButtonItem alloc] initWithCustomView:button]; self.navigationItem.leftBarButtonItem = iconBarItem; self.view.backgroundColor = kGlobalBackgroundColor; //联系我们 UIView *women = [UIView new]; women.frame = CGRectMake(0, 90, KScreenW, 130); [self.view addSubview:women]; women.backgroundColor = [UIColor whiteColor]; UILabel *L1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, KScreenW, 1)]; L1.backgroundColor = kGlobalLightGreyColor_210; [women addSubview:L1]; UILabel *L2 = [[UILabel alloc]initWithFrame:CGRectMake(15, 50, KScreenW-30, 1)]; L2.backgroundColor = kGlobalLightGreyColor_210; [women addSubview:L2]; UILabel *L3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 129, KScreenW, 1)]; L3.backgroundColor = kGlobalLightGreyColor_210; [women addSubview:L3]; UILabel *lianxi = [[UILabel alloc]initWithFrame:CGRectMake(15, 13, 80, 30)]; lianxi.text = @"联系我们"; lianxi.font = [UIFont systemFontOfSize:18]; [women addSubview:lianxi]; UIImageView *image = [[UIImageView alloc]init]; image.frame = CGRectMake(15, 65, 50,50); image.image = [UIImage imageNamed:@"QQ.png"]; [women addSubview:image]; UILabel *kefu = [[UILabel alloc]initWithFrame:CGRectMake(80, 62, 70, 30)]; kefu.text = @"QQ客服"; kefu.font = [UIFont systemFontOfSize:16]; [women addSubview:kefu]; UILabel *haoma = [[UILabel alloc]initWithFrame:CGRectMake(80, 85, 100, 30)]; haoma.text = @"2100723373"; haoma.font = [UIFont systemFontOfSize:16]; haoma.textColor = [UIColor blueColor]; [women addSubview:haoma]; UILabel *xiahuaxian = [[UILabel alloc]initWithFrame:CGRectMake(80, 110, 95, 1)]; xiahuaxian.backgroundColor = [UIColor blueColor]; [women addSubview:xiahuaxian]; //常见问题 UIView * wenti = [UIView new]; wenti.backgroundColor = [UIColor whiteColor]; wenti.frame = CGRectMake(0, women.frame.size.height+women.frame.origin.y, KScreenW, 50); [self.view addSubview:wenti]; UILabel *changjian = [[UILabel alloc]initWithFrame:CGRectMake(15, 13, 80, 30)]; changjian.text = @"常见问题"; changjian.font = [UIFont systemFontOfSize:18]; [wenti addSubview:changjian]; UILabel *L4 = [[UILabel alloc]initWithFrame:CGRectMake(0, 49, KScreenW, 1)]; L4.backgroundColor = kGlobalLightGreyColor_210; [wenti addSubview:L4]; // 监听 UITapGestureRecognizer *p1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(Copy:)]; [women addGestureRecognizer:p1]; UITapGestureRecognizer *p2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(question:)]; [wenti addGestureRecognizer:p2]; } -(void)Copy:(id)sender{ UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:@"已将QQ号复制在剪切板" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.string = @"2736748657"; }]; [alert addAction:action]; [self presentViewController:alert animated:YES completion:nil]; } -(void)question:(id)sender{ SettingWebView *SettingWebVC=[[SettingWebView alloc] init]; SettingWebVC.webTitle=@"常见问题"; SettingWebVC.requestURL=changjianwenti; [self.navigationController pushViewController:SettingWebVC animated:YES]; } -(void)back:(id)sender{ [self.navigationController popViewControllerAnimated:YES]; } @end