- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *ID=@"cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; if(cell==nil){ cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID]; } // cell.textLabel.text=[NSString stringWithFormat:@"至愛小播指令集-----------------%zd",indexPath.row]; cell.textLabel.text = self.rightArr[indexPath.row];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;//去掉下划線
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //顯示最右邊的箭頭 return cell; }
注意插的位置
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //顯示最右邊的箭頭