- 链接地址:https://blog.csdn.net/mingquantingxue/article/details/109670911
- 链接标题:ios手机margin-bottom失效问题_margin-bottom 不起作用-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1401
文章浏览阅读1.4k次。问题小程序中的页面设置margin-bottom,在模拟器及安卓机中的展示效果都与预想的一样。而在iPhone手机中margin-bottom会失效。原因从IOS8开始,UIView的属性var layoutMargins:UIEdgeInsets指定该View的subview同其edge的间距。AutoLayout使用margins来放置内容。其默认值为8pt。如果一个View是ViewController的rootview,系统会自动设置和管理margins,top和bottom。margins_margin-bottom 不起作用
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除