隱藏TabBar
PGAddressManageVC *addManageVC = [PGAddressManageVC new];
// 隱藏tabBar
addManageVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:addManageVC animated:YES];
去除分割線
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
點擊cell改變Lab字體顏色
cell.textLabel.highlightedTextColor = [UIColor redColor];
重寫 cell 點擊事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath
{
//當離開某行時,讓某行的選中狀態消失
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
或在以下方法中添加
cell.selectionStyle=UITableViewCellSelectionStyleNone;//設置cell點擊效果
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"activityTableViewCell";
activityTableViewCell *cell = (activityTableViewCell *)
[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"activityTableViewCell" owner:self options:nil];
cell = [array objectAtIndex:0];
}
cell.activityName.text = [[parkEntity.activity_rows objectAtIndex:indexPath.row] objectForKey:@"title"];
cell.activityIntroduce.text= [[parkEntity.activity_rows objectAtIndex:indexPath.row] objectForKey:@"description"];
NSString *imageUrl = [NSString stringWithFormat:@"%@/%@", IMAGE_URL, [[parkEntity.activity_rows objectAtIndex:indexPath.row] objectForKey:@"album_thumb"]];
cell.activityImage.imageURL=[NSURL URLWithString:imageUrl];
cell.selectionStyle=UITableViewCellSelectionStyleNone;//設置cell點擊效果
return cell;
}