// // AllQViewController.m // tongxin // // Created by WeiChaoZheng on 2018/10/23. // Copyright © 2018年 xTT. All rights reserved. // #import "AllQViewController.h" #import "WebViewController.h" #import "QDetailViewController.h" @interface AllQViewController () @end @implementation AllQViewController @synthesize myDataSource = _myDataSource; - (NSMutableArray *)myDataSource{ if (!_myDataSource) { _myDataSource = [[NSMutableArray alloc] init]; } return _myDataSource; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.myTableView.backgroundColor = tabViewBG; self.view.backgroundColor = tabViewBG; self.myTableView.layer.cornerRadius = 3; self.myTableView.layer.masksToBounds = YES; self.zx_navTitle = @"常见问题"; if(self.categoryTitle){ self.titleLabel.text = self.categoryTitle; } self.titleTempView.backgroundColor = mainColor; [self.titleTempView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.view).offset(iPhoneX_NavHeight+15); make.left.equalTo(self.view).offset(15); make.size.mas_equalTo(CGSizeMake(3, 15)); }]; [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(self.titleTempView); make.left.equalTo(self.titleTempView).offset(10); }]; [self.myTableView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.titleTempView.mas_bottom).offset(10); make.left.right.equalTo(self.view).inset(15); make.bottom.equalTo(self.view.mas_bottom); }]; [self loadData]; } -(void)loadData{ WEAKSELF if(self.categoryid){ [User getAllCategoryQWithCID:self.categoryid success:^(id responseObject) { NSArray *titles = responseObject[@"titles"]; NSMutableArray *arr = [NSMutableArray new]; if(cUser.cDevice.support_whiteList&&cUser.cDevice.support_whiteList.intValue!=0){ for (int i=0; i