ZLConstraintViewController 1.0×由 Damo 维护。安装指南×ZLConstraintViewController安装指南您想像下面这样将 pod 'ZLConstraintViewController', '~> 1.0' 添加到Podfile中target 'MyApp' do pod 'ZLConstraintViewController', '~> 1.0' end然后在终端内部或从CocoaPods.app中运行 pod install或者为了测试运行,运行以下命令pod try ZLConstraintViewController查看PodspecGitHub仓库CocoaPods.org上的页面ZLConstraintViewController 1.0作者DamoZLDamo/ZLConstraintViewControllerGitHub仓库ZLConstraintViewController 在xib中使用AutoLayout设置约束时,只需控制器继承该类,所有约束将自动按宽比例缩放或扩大。注:iPhone X需要适配状态栏