转自:http://blog.csdn.net/remote_roamer/article/details/40190465
在xcode 6 和 ios 8 中,如果使用了 use size classes 的方法来调整屏幕尺寸。
在自动调整table view 和 table cell view的时候,会出现 cell的宽度不会自动适应各种手机屏幕尺寸的问题。
解决办法:
在自定义的 table cell 类中 重写
- -(void)setFrame:(CGRect)frame
- -(void)setFrame:(CGRect)frame{
- frame.size.width=self.window.frame.size.width;
- [supersetFrame:frame];
- }