特牛网址导航

ios手机margin-bottom失效问题_margin-bottom 不起作用-CSDN博客

网友收藏
文章浏览阅读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 不起作用