Xib中使用UIScrollView的AutolayoutDemo

时间:2022-04-19 05:54:00
【文件属性】:
文件名称:Xib中使用UIScrollView的AutolayoutDemo
文件大小:38KB
文件格式:ZIP
更新时间:2022-04-19 05:54:00
xib scroll autola Xib中使用UIScrollView的AutolayoutDemo。主要思路:給scrollView添加一个contentView,设置contentView的top ,left,right,bottom的约束与scrollView为0,再设置contentView水平居中,然后设置contentView的高度约束值,这样scrollView的ContentSize就确定了,contentView的高度约束值大于scrollView的高度就可以垂直滚动了。
【文件预览】:
testAView
----testAView()
--------AppDelegate.h(271B)
--------ViewController.h(209B)
--------Base.lproj()
--------TestViewController.h(263B)
--------Assets.xcassets()
--------TestViewController.m(347B)
--------TestViewController.xib(5KB)
--------main.m(328B)
--------Info.plist(1KB)
--------AppDelegate.m(2KB)
--------ViewController.m(786B)
----testAView.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(14KB)
--------xcuserdata()

网友评论