Arrogant IOS8 introduced the TableView adaptive height, I have always wanted to try, just have a news app need to use to try the next.
Use the process many blogs have mentioned, pull a cell in the storyboard and then set the elements inside the constraints. I do this a lot. Note the last element to be set to the bottom of the constraint.
I'm not going to tick in the storyboard.
And that's how it turns out.
iphone6p on all normal:
The highly adaptive TableView on IPhone5 and IPhone6 did not succeed:
If I make this tick,
Look again at the iphone6p:
On IPhone5S or IPhone6:
To summarize, that is to say
| Preferred width |
Yes |
No |
| iphone6p |
Exception
|
Normal |
| IPhone5S or IPhone6 |
Normal |
Abnormal |
Of course, the size of the preferred width is also related to whether the page is normal. If the setting is larger than the screen width, then even if selected, the problem will still occur on iphone5s or 6.
The solution I'm giving you here is
1. Do not select
2. Add the following code in the awakefromnib of the custom cell. By judging the model to adapt to the adaptive.
if 414 ) { =$; [Self.commentlabel Setpreferredmaxlayoutwidth:premaxwaith]; }
IOS8 new feature Tableviewcell adaptive height iphone5siphone6 and iphone6p difference settings