、これはあなたが考えるほど難しいことではありません。
基本的には、区切り文字の間に2つのUITextFieldとUIImageViewを追加するだけです。
私はあなたが達成しようとしているものと非常に類似したコードサンプルを持っているAppleのテーブルビュー・プログラミング・ガイドを見てすることをアドバイスし、特にA Closer Look at Table-View Cells
。このことができます
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ImageOnRightCell";
UITextField*main, *second;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
main = [[[UITextField alloc] initWithFrame:CGRectMake(0.0, 0.0, 220.0, 15.0)] autorelease];
main.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
[cell.contentView addSubview:main];
second = [[[UITextField alloc] initWithFrame:CGRectMake(220.0, 0.0, 220.0, 15.0)] autorelease];
second.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
[cell.contentView addSubview:second];
}
return cell;
}
希望、 ヴィンセント
あなたの考えを破ることはできますか? – user501836