0
A
回答
1
如果您使用的子类为NSTextFieldCell
(ImageAndTextCell)。你可以在
- (NSRect)imageRectForBounds:(NSRect)cellFrame
方法中控制图像的位置。
0
而不是默认TableViewCell,创建您自己的自定义tableViewCell并根据您的需要来定位它。
1
可以创建自定义单元格...
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ImageOnRightCell";
UIImageView *photo;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
photo = [[[UIImageView alloc] initWithFrame:CGRectMake(225.0, 0.0, 80.0, 45.0)]];
photo.tag = PHOTO_TAG;
photo.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleHeight;
[cell.contentView addSubview:photo];
} else {
photo = (UIImageView *)[cell.contentView viewWithTag:PHOTO_TAG];
}
return cell;
}
这看起来就像.... 或U可以读取此链接.... http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/TableViewCells/TableViewCells.html
+0
感谢您的帮助..... :-) – Fritzables 2013-02-24 06:46:00
相关问题
- 1. 设置位置
- 2. 设置tfoot位置
- 3. SSRS动态设置表位置/位置
- 4. 设置滚动位置
- 5. 设置鼠标位置
- 6. Panel AutoScroll位置设置
- 7. UIGraphicsBeginImageContext如何设置位置?
- 8. JQuery:拖放设置位置
- 9. Windows Phone的位置设置
- 10. 更改位置设置
- 11. IE8设置的位置
- 12. 设置属性位置?
- 13. 设置光标位置
- 14. 设置位置返回E_NOTIMPL
- 15. 设置绝对位置
- 16. ImageView和设置位置
- 17. 设置位置属性
- 18. 设置路径的位置
- 19. 设置按钮位置
- 20. 设置Form类的位置
- 21. 设置弹出的位置
- 22. 如何设置BoundingRectangle位置
- 23. 设置tempdir的位置
- 24. reportlab设置左表位置
- 25. Nginx的位置设置
- 26. NSWindow忽略位置设置
- 27. 使用点设置位置
- 28. Wikitude POI未设置位置
- 29. 设置多个位置
- 30. HtmlUnit设置下载位置
您使用的子类NSTextFieldCell的? – 2013-02-23 10:58:14