这里的标签是:兄弟。。如果我能在这个问题上给你+100,我就不会再三考虑了!男人非常感谢你让我看到了这个充满“弹性”的世界。。一定会在某个时候派上用场+1请注意,从iOS 6开始,您可以选择拉伸内部区域,而不是“复制粘贴”它。看见 - (void)tabl
这里的标签是:兄弟。。如果我能在这个问题上给你+100,我就不会再三考虑了!男人非常感谢你让我看到了这个充满“弹性”的世界。。一定会在某个时候派上用场+1请注意,从iOS 6开始,您可以选择拉伸内部区域,而不是“复制粘贴”它。看见 - (void)tabl,ios,objective-c,uitableview,uiimageview,uiedgeinsets,Ios,Objective C,Uitableview,Uiimageview,Uiedgeinsets,这里的标签是:兄弟。。如果我能在这个问题上给你+100,我就不会再三考虑了!男人非常感谢你让我看到了这个充满“弹性”的世界。。一定会在某个时候派上用场+1请注意,从iOS 6开始,您可以选择拉伸内部区域,而不是“复制粘贴”它。看见 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
这里的标签是:兄弟。。如果我能在这个问题上给你+100,我就不会再三考虑了!男人非常感谢你让我看到了这个充满“弹性”的世界。。一定会在某个时候派上用场+1请注意,从iOS 6开始,您可以选择拉伸内部区域,而不是“复制粘贴”它。看见
- (void)tableView:(UITableView *)tableView
willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 0) {
UIImageView *topCellBackgroundImageView =
[[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"grouped-cell-bg-top"]
resizableImageWithCapInsets:UIEdgeInsetsMake(5.0, 5.0, 5.0, 5.0)]];
cell.backgroundView = topCellBackgroundImageView;
}
// If it's the last row
else if (indexPath.row == ([tableView numberOfRowsInSection:0] - 1)) {
UIImageView *bottomCellBackgroundImageView =
[[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"grouped-cell-bg-bottom"]
resizableImageWithCapInsets:UIEdgeInsetsMake(5.0, 5.0, 5.0, 5.0)]];
cell.backgroundView = bottomCellBackgroundImageView;
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
// For the top one
UIEdgeInsetsMake(38.0, 5.0, 5.0, 5.0)
// For the bottom one
UIEdgeInsetsMake(5.0, 5.0, 38.0, 5.0)
- (CGFloat)heightForRow:(NSIndexPath *)indexPath {
CGFloat standardHeight = 44.0f;
NSInteger numberOfRowsInSection = [self numberOfRowsInSection:indexPath.section];
if (numberOfRowsInSection == 1) {
standardHeight -= 2;
}
else if (indexPath.row == 0 || indexPath.row == numberOfRowsInSection-1) {
standardHeight -= 1;
}
return standardHeight;
}
- (CGFloat)tableView:(UITableView *)tableView
heightForRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat rowHeight = 44.0f;
if (indexPath.row == 0) {
rowHeight -=1;
}
return rowHeight;
}