Commit d3ad60dd9ee43d5cbc86cacddac7db1207ddebd8

Authored by 张旭
1 parent 363373d2

修改反馈控制器

LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -210,6 +210,7 @@
210 210 D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */; };
211 211 D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696831E7FC6A900E4BF71 /* chatListCell.m */; };
212 212 D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696911E7FC83800E4BF71 /* chatMsgModel.m */; };
  213 + D2393D011F020D5700D3EE17 /* FeedbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2393D001F020D5700D3EE17 /* FeedbackViewController.m */; };
213 214 D23BBDB81EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = D23BBDB71EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m */; };
214 215 D23BBDBB1EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D23BBDBA1EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.m */; };
215 216 D23BBDBE1EF8ED4A002FE0B8 /* LVCChannelDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D23BBDBD1EF8ED4A002FE0B8 /* LVCChannelDetailModel.m */; };
... ... @@ -731,6 +732,8 @@
731 732 D23696831E7FC6A900E4BF71 /* chatListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatListCell.m; sourceTree = "<group>"; };
732 733 D23696901E7FC83800E4BF71 /* chatMsgModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatMsgModel.h; sourceTree = "<group>"; };
733 734 D23696911E7FC83800E4BF71 /* chatMsgModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatMsgModel.m; sourceTree = "<group>"; };
  735 + D2393CFF1F020D5700D3EE17 /* FeedbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeedbackViewController.h; sourceTree = "<group>"; };
  736 + D2393D001F020D5700D3EE17 /* FeedbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FeedbackViewController.m; sourceTree = "<group>"; };
734 737 D23BBDB61EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMainHeaderCollectionReusableView.h; sourceTree = "<group>"; };
735 738 D23BBDB71EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMainHeaderCollectionReusableView.m; sourceTree = "<group>"; };
736 739 D23BBDB91EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCBannerAndMarqueeModel.h; sourceTree = "<group>"; };
... ... @@ -889,6 +892,8 @@
889 892 4B45CE431EB86A590079AFB7 /* Controllers */ = {
890 893 isa = PBXGroup;
891 894 children = (
  895 + D2393CFF1F020D5700D3EE17 /* FeedbackViewController.h */,
  896 + D2393D001F020D5700D3EE17 /* FeedbackViewController.m */,
892 897 4B45CE441EB86A590079AFB7 /* BeingAnchorController.h */,
893 898 4B45CE451EB86A590079AFB7 /* BeingAnchorController.m */,
894 899 4B45CE461EB86A590079AFB7 /* IDViewController.h */,
... ... @@ -2484,6 +2489,7 @@
2484 2489 4BD855FA1EBACD530082061D /* AFHTTPRequestOperation.m in Sources */,
2485 2490 D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */,
2486 2491 D2029CB21E6EADE10027CD92 /* UIScrollView+MJExtension.m in Sources */,
  2492 + D2393D011F020D5700D3EE17 /* FeedbackViewController.m in Sources */,
2487 2493 D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */,
2488 2494 D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */,
2489 2495 4B45CEAB1EB86BFA0079AFB7 /* NSString+ZXExtension.m in Sources */,
... ...
LiveVideoCloud/AppDelegate/AppDelegate.m
... ... @@ -9,9 +9,6 @@
9 9 #import "AppDelegate.h"
10 10 #import "ZXTabBarController.h"
11 11  
12   -#define KAppId @"60_irn9edco29"
13   -#define KAppKey @"69fe70bda67e059286ad509d9f5377f815955645b52f94"
14   -
15 12 @interface AppDelegate ()
16 13  
17 14 @end
... ...
LiveVideoCloud/Classes/Sections/Mine/Controllers/FeedbackViewController.h 0 → 100644
  1 +//
  2 +// FeedBackViewController.h
  3 +// CNLive
  4 +//
  5 +// Created by cnlive on 16/1/9.
  6 +// Copyright © 2016年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import "BaseViewController.h"
  10 +
  11 +@interface FeedBackViewController : BaseViewController
  12 +
  13 +@end
... ...
LiveVideoCloud/Classes/Sections/Mine/Controllers/FeedbackViewController.m 0 → 100644
  1 +//
  2 +// FeedBackViewController.m
  3 +// CNLive
  4 +//
  5 +// Created by cnlive on 16/1/9.
  6 +// Copyright © 2016年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import "FeedbackViewController.h"
  10 +
  11 +#define MaxNumberOfTitleChars 100 //标题最多输入的字数
  12 +
  13 +@interface FeedBackViewController ()<UITextFieldDelegate,UITextViewDelegate,UIScrollViewDelegate>
  14 +{
  15 + UITextView *_descriptionView;
  16 + UILabel *_desPlaceholder;
  17 + UITextField *_reportField;
  18 + UITextField *_phoneField;
  19 + UIScrollView *_bgScrollView;
  20 + UILabel *_wordsCountLab;
  21 +}
  22 +
  23 +@property (nonatomic, strong) MBProgressHUD *progressHUD;
  24 +
  25 +@end
  26 +
  27 +@implementation FeedBackViewController
  28 +
  29 +- (void)viewDidLoad {
  30 + [super viewDidLoad];
  31 + self.title = @"反馈意见";
  32 +// self.view.backgroundColor = CommonBgColor;
  33 + [self initViews];
  34 +
  35 + //注册键盘出现的通知
  36 + [[NSNotificationCenter defaultCenter] addObserver:self
  37 + selector:@selector(keyboardWasShown:)
  38 + name:UIKeyboardWillShowNotification object:nil];
  39 +
  40 + //注册键盘消失的通知
  41 + [[NSNotificationCenter defaultCenter] addObserver:self
  42 + selector:@selector(keyboardWillBeHidden:)
  43 + name:UIKeyboardWillHideNotification object:nil];
  44 +
  45 + UITapGestureRecognizer *singleRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTapFrom)];
  46 + [_bgScrollView addGestureRecognizer:singleRecognizer];
  47 +}
  48 +
  49 +- (void)initViews
  50 +{
  51 + UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 6, KScreenWidth, KScreenHeight-6)];
  52 + bgView.backgroundColor = [UIColor whiteColor];
  53 + [self.view addSubview:bgView];
  54 +
  55 + _bgScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 6, KScreenWidth, KScreenHeight-6)];
  56 + if (KScreenHeight<568) {
  57 + _bgScrollView.contentSize = CGSizeMake(KScreenWidth, 500);
  58 + }else{
  59 + _bgScrollView.contentSize = CGSizeMake(KScreenWidth, KScreenHeight-64);
  60 + }
  61 + _bgScrollView.delegate = self;
  62 + [self.view addSubview:_bgScrollView];
  63 +
  64 + [Tools addLineToView:_bgScrollView separatorColorType:SeparatorColorGray lineFrame:CGRectMake(10, 129.5, KScreenWidth-20, 0.5)];
  65 + [Tools addLineToView:_bgScrollView separatorColorType:SeparatorColorGray lineFrame:CGRectMake(10, 174.5, KScreenWidth-20, 0.5)];
  66 + [Tools addLineToView:_bgScrollView separatorColorType:SeparatorColorGray lineFrame:CGRectMake(10, 219.5, KScreenWidth-20, 0.5)];
  67 +
  68 + _descriptionView = [[UITextView alloc] initWithFrame:CGRectMake(5, 0, KScreenWidth-10, 129)];
  69 + _descriptionView.font = [UIFont systemFontOfSize:15];
  70 + _descriptionView.returnKeyType = UIReturnKeyDone;
  71 + _descriptionView.delegate = self;
  72 + [_bgScrollView addSubview:_descriptionView];
  73 +
  74 + _desPlaceholder = [[UILabel alloc] initWithFrame:CGRectMake(5, 9, KScreenWidth-20, 15)];
  75 + _desPlaceholder.text = @"输入您的反馈";
  76 + _desPlaceholder.font = [UIFont systemFontOfSize:15];
  77 + _desPlaceholder.textColor = [UIColor colorWithHexString:@"#c7c4c4"];
  78 + [_descriptionView addSubview:_desPlaceholder];
  79 +
  80 + _reportField = [[UITextField alloc] initWithFrame:CGRectMake(10, 130, KScreenWidth-20, 45)];
  81 + _reportField.placeholder = @"举报视频或上传者(可选)";
  82 + _reportField.font = [UIFont systemFontOfSize:15];
  83 + _reportField.returnKeyType = UIReturnKeyDone;
  84 + _reportField.delegate = self;
  85 + [_bgScrollView addSubview:_reportField];
  86 +
  87 + _phoneField = [[UITextField alloc] initWithFrame:CGRectMake(10, 175, KScreenWidth-20, 45)];
  88 + _phoneField.placeholder = @"您的QQ/电话/邮箱";
  89 + _phoneField.font = [UIFont systemFontOfSize:15];
  90 + _phoneField.returnKeyType = UIReturnKeyDone;
  91 + _phoneField.delegate = self;
  92 + [_bgScrollView addSubview:_phoneField];
  93 +
  94 + //字数限制label
  95 + _wordsCountLab = [[UILabel alloc] initWithFrame:CGRectMake(_descriptionView.size.width-60, _descriptionView.size.height-15, 60, 15)];
  96 + _wordsCountLab.text = @"0/100";
  97 + _wordsCountLab.textAlignment = NSTextAlignmentRight;
  98 + _wordsCountLab.textColor = [UIColor grayColorCNLive];
  99 + _wordsCountLab.font = [UIFont systemFontOfSize:15];
  100 + [_descriptionView addSubview:_wordsCountLab];
  101 + //提交
  102 +// UIButton *submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  103 +// [submitBtn setTitle:@"提 交" forState:UIControlStateNormal];
  104 +// submitBtn.backgroundColor = [UIColor yellowColorCNLive];
  105 +// [submitBtn setTitleColor:[UIColor blackColorCNLive] forState:UIControlStateNormal];
  106 +// //[submitBtn setBackgroundImage:[[UIImage imageNamed:@"denglu"] stretchableImageWithLeftCapWidth:57 topCapHeight:0] forState:UIControlStateNormal];
  107 +// submitBtn.clipsToBounds = YES;
  108 +// submitBtn.layer.cornerRadius = 20.0f;
  109 +// submitBtn.layer.borderWidth = 1.0f;//设置边框宽度
  110 +// submitBtn.layer.borderColor = [UIColor blackColorCNLive].CGColor;//设置边框颜色
  111 + UIButton *submitBtn = [UIButton buttonWithTitle:@"提 交" titleColor:[UIColor blackColorCNLive] cornerRadius:20.0f borderWidth:1.0f borderColor:[UIColor blackColorCNLive] backgroundColor:[UIColor yellowColorCNLive]];
  112 + submitBtn.frame = CGRectMake(10, 295, KScreenWidth - 20, 40);
  113 + [submitBtn addTarget:self action:@selector(submitBtnAction) forControlEvents:UIControlEventTouchUpInside];
  114 + [_bgScrollView addSubview:submitBtn];
  115 +}
  116 +
  117 +- (void)submitBtnAction
  118 +{
  119 + [self request];
  120 +}
  121 +
  122 +#pragma mark - request
  123 +
  124 +- (void)request
  125 +{
  126 + [self handleSingleTapFrom];
  127 +
  128 + if ([Tools isEmptyString:_descriptionView.text]) {
  129 + [Tools showHUDInView:self.view withString:@"请填写要反馈的意见哈" autoHide:YES];
  130 + return;
  131 + }
  132 + if ([Tools isEmptyString:_phoneField.text]){
  133 + [Tools showHUDInView:self.view withString:@"填写联系方式有助于我们找到你哟" autoHide:YES];
  134 + return;
  135 + }
  136 +
  137 + if ([self isContainEmoji:_descriptionView.text]) {
  138 + [Tools showHUDInView:self.view withString:@"暂不支持表情输入" autoHide:YES];
  139 + return;
  140 + }
  141 +
  142 + self.progressHUD = [Tools showActivityHudInView:self.view withString:@""];
  143 +
  144 + NSDictionary *params = @{@"id":UserAppId,
  145 + @"msg":[NSString stringWithFormat:@"描述:%@__上传者:%@__联系方式:%@",_descriptionView.text,_reportField.text,_phoneField.text]};
  146 +
  147 + [[AFHTTPRequestOperationManager manager] POST:feedback parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
  148 +
  149 + [self.progressHUD hide:YES];
  150 + [self performSelector:@selector(dismissView) withObject:nil afterDelay:2];
  151 +
  152 + responseObject = [responseObject validatedDictionary];
  153 +
  154 + if ([responseObject[@"errorCode"] isEqualToString:@"0"]) {
  155 + [Tools showHUDInView:self.view withString:@"收到反馈了,会尽快处理的" autoHide:YES];
  156 + }else{
  157 + [Tools showHUDInView:self.view withString:responseObject[@"errorMessage"] autoHide:YES];
  158 + }
  159 +
  160 + } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  161 + self.progressHUD = [Tools showActivityHudInView:self.view withString:@""];
  162 + [Tools showHUDInView:self.view withString:@"提交失败,请稍后再试!" autoHide:YES];
  163 + [self performSelector:@selector(dismissView) withObject:nil afterDelay:2];
  164 + }];
  165 +
  166 +// if ([Tools isEmployeeQQNumber:_phoneField.text] || [Tools isValidateEmail:_phoneField.text] || [Tools isMobileNumber:_phoneField.text]) {
  167 +//
  168 +// }else{
  169 +// [Tools showHUDInView:self.view withString:@"请填写正确联系方式" autoHide:YES];
  170 +// }
  171 +
  172 +}
  173 +
  174 +- (void)dismissView
  175 +{
  176 + [self.navigationController popViewControllerAnimated:YES];
  177 +}
  178 +
  179 +- (BOOL)isContainEmoji:(NSString *)string
  180 +{
  181 + for (int i = 0; i < string.length; i++) {
  182 +
  183 + NSString *character = [string substringWithRange:NSMakeRange(i, 1)];
  184 + if (character.hash == 166842 || character.hash == 166839) {
  185 + return YES;
  186 + }
  187 + }
  188 + return NO;
  189 +}
  190 +
  191 +#pragma mark - UITextFieldDelegate
  192 +- (BOOL)textFieldShouldReturn:(UITextField *)textField
  193 +{
  194 + [textField resignFirstResponder];
  195 +
  196 + return YES;
  197 +}
  198 +
  199 +#pragma mark - UITextViewDelegate
  200 +
  201 +- (void)textViewDidChange:(UITextView *)textView
  202 +{
  203 + if (textView.text.length != 0) {
  204 + _desPlaceholder.hidden = YES;
  205 + if (textView.text.length > MaxNumberOfTitleChars) {
  206 + textView.text = [textView.text substringToIndex:MaxNumberOfTitleChars];
  207 + }
  208 + _wordsCountLab.text = [NSString stringWithFormat:@"%lu/100",(unsigned long)textView.text.length];
  209 + }else{
  210 + _desPlaceholder.hidden = NO;
  211 + _wordsCountLab.text = @"0/100";
  212 + }
  213 +}
  214 +
  215 +-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString*)text
  216 +{
  217 + if ([text isEqualToString:@"\n"]) {
  218 + [textView resignFirstResponder];
  219 + return NO;
  220 + }
  221 + return YES;
  222 +}
  223 +
  224 +#pragma mark - 键盘监听
  225 +- (void)keyboardWasShown:(NSNotification*)aNotification
  226 +{
  227 +
  228 + BOOL desc = _descriptionView.isFirstResponder;
  229 + BOOL report = _reportField.isFirstResponder;
  230 + BOOL number = _phoneField.isFirstResponder;
  231 +
  232 + if (desc) {
  233 + _bgScrollView.contentOffset = CGPointMake(0, 0);
  234 + } else if (report) {
  235 + _bgScrollView.contentOffset = CGPointMake(0, _reportField.origin.y-10);
  236 + } else if (number) {
  237 + _bgScrollView.contentOffset = CGPointMake(0, _phoneField.origin.y-10);
  238 + }
  239 +
  240 + _bgScrollView.contentSize = CGSizeMake(KScreenWidth, 750);
  241 +
  242 +}
  243 +
  244 +- (void)keyboardWillBeHidden:(NSNotification*)aNotification
  245 +{
  246 + _bgScrollView.contentOffset = CGPointMake(0, 0);
  247 + if (KScreenHeight<568) {
  248 + _bgScrollView.contentSize = CGSizeMake(KScreenWidth, 500);
  249 + }else{
  250 + _bgScrollView.contentSize = CGSizeMake(KScreenWidth, KScreenHeight-64);
  251 + }
  252 +}
  253 +
  254 +#pragma mark - 收回键盘
  255 +- (void)handleSingleTapFrom
  256 +{
  257 + if ([_descriptionView isFirstResponder]) {
  258 + [_descriptionView resignFirstResponder];
  259 + }
  260 + if ([_reportField isFirstResponder]) {
  261 + [_reportField resignFirstResponder];
  262 + }
  263 + if ([_phoneField isFirstResponder]) {
  264 + [_phoneField resignFirstResponder];
  265 + }
  266 +}
  267 +
  268 +- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
  269 +{
  270 +
  271 +}
  272 +
  273 +- (void)dealloc
  274 +{
  275 + [[NSNotificationCenter defaultCenter] removeObserver:self];
  276 +}
  277 +
  278 +- (void)didReceiveMemoryWarning {
  279 + [super didReceiveMemoryWarning];
  280 + // Dispose of any resources that can be recreated.
  281 +}
  282 +
  283 +/*
  284 +#pragma mark - Navigation
  285 +
  286 +// In a storyboard-based application, you will often want to do a little preparation before navigation
  287 +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  288 + // Get the new view controller using [segue destinationViewController].
  289 + // Pass the selected object to the new view controller.
  290 +}
  291 +*/
  292 +
  293 +@end
... ...
LiveVideoCloud/Classes/Sections/Mine/Controllers/LVCMineViewController.m
... ... @@ -147,7 +147,7 @@
147 147 {
148 148 if (!_localTitleArr)
149 149 {
150   - _localTitleArr = [[NSArray alloc] initWithObjects:@"我的消息", @"我的视频列表",@"我要直播", @"我的账户", @"设置", nil];
  150 + _localTitleArr = [[NSArray alloc] initWithObjects:@"设置", nil];
151 151 }
152 152 return _localTitleArr;
153 153 }
... ... @@ -155,7 +155,7 @@
155 155 {
156 156 if (!_localImageArr) {
157 157  
158   - _localImageArr = [[NSArray alloc] initWithObjects:@"message", @"I live",@"certification",@"account",@"Settings", nil];
  158 + _localImageArr = [[NSArray alloc] initWithObjects:@"Settings", nil];
159 159 }
160 160 return _localImageArr;
161 161 }
... ... @@ -198,38 +198,41 @@
198 198 }
199 199 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
200 200 {
201   - if(indexPath.row == 0)
202   - {
203   - //我的消息
204   - [self pushVC:[MineMessageController new]];
205   - return;
206   - }else if(indexPath.row == 1)
207   - { //我的视频列表
208   - [self pushVC:[MineLiveController new]];
209   - return;
210   -
211   - }else if (indexPath.row == 2)
212   - { //我要直播
213   - if ([UserTools isLogin]) {
214   - [self anchorCheck];
215   - }
216   - else
217   - {
218   - LoginViewController *loginVC = [[LoginViewController alloc] init];
219   - [self.navigationController pushViewController:loginVC animated:YES];
220   - }
221   - return;
222   - }else if (indexPath.row == 3)
223   - {
224   - //我的账户
225   - [self pushVC:[MineAccountController new]];
226   - return;
227   -
228   - }else if (indexPath.row == 4)
229   - { //设置
230   - [self pushVC:[MineSettingViewController new]];
231   - return;
232   - }
  201 + [self pushVC:[MineSettingViewController new]];
  202 + return;
  203 +
  204 +// if(indexPath.row == 0)
  205 +// {
  206 +// //我的消息
  207 +// [self pushVC:[MineMessageController new]];
  208 +// return;
  209 +// }else if(indexPath.row == 1)
  210 +// { //我的视频列表
  211 +// [self pushVC:[MineLiveController new]];
  212 +// return;
  213 +//
  214 +// }else if (indexPath.row == 2)
  215 +// { //我要直播
  216 +// if ([UserTools isLogin]) {
  217 +// [self anchorCheck];
  218 +// }
  219 +// else
  220 +// {
  221 +// LoginViewController *loginVC = [[LoginViewController alloc] init];
  222 +// [self.navigationController pushViewController:loginVC animated:YES];
  223 +// }
  224 +// return;
  225 +// }else if (indexPath.row == 3)
  226 +// {
  227 +// //我的账户
  228 +// [self pushVC:[MineAccountController new]];
  229 +// return;
  230 +//
  231 +// }else if (indexPath.row == 4)
  232 +// { //设置
  233 +// [self pushVC:[MineSettingViewController new]];
  234 +// return;
  235 +// }
233 236 }
234 237  
235 238 - (void)pushVC:(UIViewController *)viewController
... ...
LiveVideoCloud/Classes/Sections/Mine/Controllers/MineSettingViewController.m
... ... @@ -9,10 +9,8 @@
9 9 #import "MineSettingViewController.h"
10 10 #import "LVCMineCommonCell.h"
11 11 #import "LVCMineModel.h"
12   -#import "LVCClearCachesCell.h"
13 12 #import "LVCWebViewController.h"
14   -#import "MineAboutUsController.h"
15   -
  13 +#import "FeedbackViewController.h"
16 14  
17 15 @interface MineSettingViewController ()<UITableViewDelegate,UITableViewDataSource>
18 16 @property (nonatomic, strong) UITableView * tbv;
... ... @@ -20,7 +18,7 @@
20 18 @property (nonatomic, strong) NSMutableArray * localTitleArr;
21 19 @property (nonatomic ,strong) NSArray *localImageArr;
22 20  
23   -@property (nonatomic , strong) NSString *clearCacheName;//定义清除缓存
  21 +//@property (nonatomic , strong) NSString *clearCacheName;//定义清除缓存
24 22  
25 23 @end
26 24  
... ... @@ -58,8 +56,7 @@
58 56 - (NSMutableArray *)localTitleArr
59 57 {
60 58 if (!_localTitleArr) {
61   - _localTitleArr = [[NSMutableArray alloc] initWithObjects:@[@"清除缓存"],@[@"帮助",@"关于我们",@"反馈意见"], nil];
62   -
  59 + _localTitleArr = [[NSMutableArray alloc] initWithObjects:@"反馈意见", nil];
63 60 }
64 61 return _localTitleArr;
65 62 }
... ... @@ -67,7 +64,7 @@
67 64 {
68 65 if (!_localImageArr) {
69 66  
70   - _localImageArr = [[NSArray alloc] initWithObjects:@[@"handShake"],@[@"MoreHelp",@"MoreAbout",@"MorePush"], nil];
  67 + _localImageArr = [[NSArray alloc] initWithObjects:@"MorePush", nil];
71 68  
72 69 }
73 70 return _localImageArr;
... ... @@ -81,8 +78,6 @@
81 78 tableView.dataSource = self;
82 79 tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
83 80 tableView.backgroundColor = CommonBgColor;
84   -
85   - [tableView registerClass:[LVCClearCachesCell class] forCellReuseIdentifier:NSStringFromClass([LVCClearCachesCell class])];
86 81 [tableView registerClass:[LVCMineCommonCell class] forCellReuseIdentifier:NSStringFromClass([LVCMineCommonCell class])];
87 82 _tbv = tableView;
88 83 }
... ... @@ -90,20 +85,10 @@
90 85 }
91 86 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
92 87 {
93   - if (indexPath.section == 0 && indexPath.row == 0) {
94   - LVCClearCachesCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LVCClearCachesCell class])];
95   - [cell loadLocalTitle:_localTitleArr[indexPath.section][indexPath.row] imageName:self.localImageArr[indexPath.section][indexPath.row]];
96   - return cell;
97   - }else
98   - {
99   - LVCMineCommonCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LVCMineCommonCell class]) forIndexPath:indexPath];
100   -
101   - [cell loadLocalTitle:_localTitleArr[indexPath.section][indexPath.row] imageName:self.localImageArr[indexPath.section][indexPath.row]];
102   - return cell;
103   -
104   - }
105   - return nil;
  88 + LVCMineCommonCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LVCMineCommonCell class]) forIndexPath:indexPath];
106 89  
  90 + [cell loadLocalTitle:_localTitleArr[indexPath.section][indexPath.row] imageName:self.localImageArr[indexPath.section][indexPath.row]];
  91 + return cell;
107 92 }
108 93  
109 94 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
... ... @@ -121,25 +106,31 @@
121 106 }
122 107 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
123 108 {
124   - if (indexPath.section == 0 && indexPath.row == 0 && [_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"清除缓存"])
125   - {
126   - //清除缓存
127   - NSLog(@"清除缓存");
128   - return;
129   - }
130   - else if ([_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"帮助"])
131   - {
132   - LVCWebViewController *web = [[LVCWebViewController alloc] init];
133   - web.url = @"http://data.cnlive.com/term/hdtv/hd_zhongguobi.html";
134   - web.title = @"帮助";
135   - [self.navigationController pushViewController:web animated:YES];
136   - }
137   - else if ([_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"关于我们"])
  109 + if ([_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"反馈意见"])
138 110 {
139   - MineAboutUsController * vc = [MineAboutUsController new];
140   - vc.title = self.localTitleArr[indexPath.section][indexPath.row];
  111 + FeedBackViewController * vc = [FeedBackViewController new];
  112 + // vc.hidesBottomBarWhenPushed=YES;
141 113 [self.navigationController pushViewController:vc animated:YES];
142 114 }
  115 +// if (indexPath.section == 0 && indexPath.row == 0 && [_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"清除缓存"])
  116 +// {
  117 +// //清除缓存
  118 +// NSLog(@"清除缓存");
  119 +// return;
  120 +// }
  121 +// else if ([_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"帮助"])
  122 +// {
  123 +// LVCWebViewController *web = [[LVCWebViewController alloc] init];
  124 +// web.url = @"http://data.cnlive.com/term/hdtv/hd_zhongguobi.html";
  125 +// web.title = @"帮助";
  126 +// [self.navigationController pushViewController:web animated:YES];
  127 +// }
  128 +// else if ([_localTitleArr[indexPath.section][indexPath.row] isEqualToString:@"关于我们"])
  129 +// {
  130 +// MineAboutUsController * vc = [MineAboutUsController new];
  131 +// vc.title = self.localTitleArr[indexPath.section][indexPath.row];
  132 +// [self.navigationController pushViewController:vc animated:YES];
  133 +// }
143 134 }
144 135 -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
145 136 {
... ...