简体   繁体   中英

How to make auto layout for uiview inside uitableViewCell

i'm working for universal app; i've two uiView (top View and bottom View) top view with imageView and bottom View with uitableView; i make constrains for this tableView and the label inside the cell; but the problem on iPad; as shown on the following images 第一次截屏

so when i put constrains for uiLbael to be at the center of the cell it's the center at all devices except iPad

这些是我的约束

the problem here for iPad uiLabel not on the center 在此处输入图片说明

Did you check that label has the constraint horizontally centered in container? I cannot tell from your screen shot. I see the guide lines, but this does not necessarily meant the constraint is set. Select horizontal centered in container from the align menu. If that doesn't work I'd suggest keeping the constraints and changing your size class to the iPad (Regular/Regular) and adding the constraint.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM