导航条
three.tabBarItem.imageInsets = UIEdgeInsetsMake(15, 0, -8, 0);
self.tabBar.tintColor = [UIColor blackColor];
self.tabBar.barTintColor = [UIColor whiteColor];
解析
NSString *path = [[NSBundle mainBundle]pathForResource:@"Property List.plist" ofType:nil];
NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:path];
for (NSDictionary *dic1 in dic[@"tableView"]) {
Model *mode = [[Model alloc]init];
[mode setValuesForKeysWithDictionary:dic1];
[_tableArray addObject:mode];
}
for (NSDictionary *dic2 in dic[@"headView"]) {
headModel *mode = [[headModel alloc]init];
[mode setValuesForKeysWithDictionary:dic2];
[_headerArray addObject:mode];
}
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadData];
});
跳转
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.row == 2){
threeViewController *three=[[threeViewController alloc]init];
three.titlemodel = [[Model alloc]init];
three.titlemodel.textLab = [self.tableArray[indexPath.row]textLab];
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:three animated:YES];
self.hidesBottomBarWhenPushed = NO;
}
}