developer
2023-05-20 c1ffd99c4b60066774eb2c97b31e4aaa014e7f51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//
//  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