2011-12-15 3 views

답변

2

한 가지 방법 : 당신의 TableViewController에 cellForRowIndexAtPath. 예 :

- (UITableViewCell*) tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    static NSString* CellIdentifier = @"Cell"; 

    UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 
    if (cell == nil) 
    { 
     cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; 

     UIStepper* stepper = [[UIStepper alloc] init]; 
     stepper.frame = CGRectMake(220, 10, 100, 10); 
     [cell.contentView addSubview: stepper]; 
    } 

    return cell; 
} 

이렇게하면 표의 각 셀 오른쪽에 스테퍼가 추가됩니다.

+0

특정 화면 크기에서는 작동하지 않습니다. – DaynaJuliana

관련 문제