开发者

How do I decrease cell size to 280*35?

I need to decrease the table view cell of navigation controller to 280*35. I have tried to with cgrect, but it's not working...

How can I set 开发者_StackOverflowit?


The width of a UITableViewCell is always determined by the width of the UITableView that contains it.

You can change the height of your Cell by using UITableViews delegate message tableView:heightForRowAtIndexPath:


You can set row height programmatically, as tonclon pointed out, or, if all rows need to get the same height, set it in Interface Builder as a propery of the UITableView, in de Inspector window under the size tab. It says "height" right at the top, that's the row height.

This is easier and (presumably) faster.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜