开发者

UITableViewCell wrong width on iPad?

开发者 https://www.devze.com 2023-04-12 05:56 出处:网络
My tableview size is 500 by 500. I am creating a UITableViewCell and setting it\'s style as default in init method. However, when I log the frame of the cell, it comes ou开发者_高级运维t as 320. Is th

My tableview size is 500 by 500. I am creating a UITableViewCell and setting it's style as default in init method. However, when I log the frame of the cell, it comes ou开发者_高级运维t as 320. Is this normal? Thanks

Also, for some reason, I can't use the reuse identifier if I init the cell with a frame.


It's perfectly possible that UITableViewCell's initializer just hardcodes the width to 320 points. After all, at this point the cell does not yet belong to a table view so it can't possibly know its final size.

0

精彩评论

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