开发者

Shut off UITableView autosize

开发者 https://www.devze.com 2023-02-22 21:16 出处:网络
I have a table view which is autosizing to the full frame of the view it is in.I don\'t want 开发者_如何学编程it to stretch.I\'ve shut off all of the bars in AutoSizing in Interface Builder but to no

I have a table view which is autosizing to the full frame of the view it is in. I don't want 开发者_如何学编程it to stretch. I've shut off all of the bars in AutoSizing in Interface Builder but to no avail. How can I shut off autosizing and stretching in IB?


I had a similar issue and tried everything to no avail. Maybe this isn't the most elegant answer, but my solution was to make a UIView which is the size I want for the table view and then add the table view as a subview.

Bit hacky, but worked for me!


What I found to be the best answer is to just create the UITableView from code and size it there.

0

精彩评论

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