You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.2 KiB
73 lines
2.2 KiB
// |
|
// ProblemDetailsViewController.m |
|
// LekangGuard |
|
// |
|
// Created by ecell on 2022/12/30. |
|
// |
|
|
|
#import "ProblemDetailsViewController.h" |
|
#import "ProblemTableViewCell.h" |
|
|
|
@interface ProblemDetailsViewController () |
|
|
|
@property (nonatomic ,strong) CommonTableView *problemTable; |
|
|
|
@end |
|
|
|
@implementation ProblemDetailsViewController |
|
|
|
- (void)viewDidLoad { |
|
[super viewDidLoad]; |
|
// Do any additional setup after loading the view. |
|
|
|
self.zx_navTitle = GJText(@"常见问题"); |
|
[self.view addSubview:self.problemTable]; |
|
[self.problemTable mas_makeConstraints:^(MASConstraintMaker *make) { |
|
make.left.right.equalTo(self.view).inset(20); |
|
make.top.equalTo(self.view).offset(iPhoneX_NavHeight+20); |
|
make.bottom.equalTo(self.view.mas_bottom); |
|
}]; |
|
} |
|
|
|
- (void)setPModel:(ProblemModel *)pModel |
|
{ |
|
_pModel = pModel; |
|
self.problemTable.cellRow = 2; |
|
[self.problemTable reloadData]; |
|
} |
|
|
|
- (CommonTableView *)problemTable |
|
{ |
|
if (!_problemTable) |
|
{ |
|
kWeakSelf(self) |
|
_problemTable = [[CommonTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain cellHeight:48 cellRow:0 isAdaptive:YES isLine:YES commonCell:ProblemTableViewCell.class createCell:^(ZZTableViewCell * _Nonnull cells, NSIndexPath * _Nonnull indexPath) { |
|
ProblemTableViewCell *cell = (ProblemTableViewCell *)cells; |
|
|
|
cell.cenText = indexPath.row == 0 ? self.pModel.content : self.pModel.details; |
|
|
|
|
|
} selectedCell:^(UITableView * _Nonnull tableView, NSIndexPath * _Nonnull indexPath) { |
|
|
|
} DidscrollView:^(UIScrollView * _Nonnull scrollView) { |
|
|
|
}]; |
|
_problemTable.backgroundColor = KKClearColor; |
|
_problemTable.layer.cornerRadius = 5; |
|
_problemTable.layer.masksToBounds = YES; |
|
[UICommon setTavleViewlink:_problemTable distance:15]; |
|
} |
|
return _problemTable; |
|
} |
|
|
|
/* |
|
#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
|
|
|