1
私はUITableViewに問題があります。UITableFieldにUITextFieldを配置すると、UITableFieldに入力されたテキストは、UITableViewをスクロールすると削除されます。そのデータをUITextFieldに保持する方法。私は以下のコードUITableFieldのテキストがUITableViewで消えます。UITableViewをスクロールする場合
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *[email protected]"CELL_ID";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cell_ID];
if(cell==nil)
{
NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"TableViewCellView" owner:self options:nil];
if([nib count]>0)
{
cell=[nib objectAtIndex:0];
}
else
{
NSLog(@"Failed to load nib");
}
}
UITextField *txt1=(UITextField*)[cell viewWithTag:1];//not needed
return cell;
}
を使用していた
私はXIBを使用してUITableViewCell
を設計した事前
テーブルビューにあるuitextfieldsで入力データを使用しようとしていますか?その後、テーブルビューをリロードする必要があります。データを入力した後 –
私はUITextFieldにデータを動的に入力しました。 – user1179912
あなたのセルをforrowatindexpathmethodに表示できますか? –