├── FrameAutoScaleLFL ├── FrameAutoScaleLFL.h ├── FrameAutoScaleLFL.m └── FrameMainLFL.h ├── README.md ├── ScreenAdaptation-Rapid.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ ├── LFL.xcuserdatad │ └── UserInterfaceState.xcuserstate │ ├── Srain.xcuserdatad │ └── UserInterfaceState.xcuserstate │ └── vintop_xiaowei.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── ScreenAdaptation-Rapid ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── LFLMainViewController.h ├── LFLMainViewController.m ├── info.plist ├── main.m └── testXib.xib └── ScreenCompatible_LFL.podspec /FrameAutoScaleLFL/FrameAutoScaleLFL.h: -------------------------------------------------------------------------------- 1 | /* 2 | The Name Of The Project:FrameAutoScaleLFL.h 3 | The Creator  :Created by DragonLi 4 | Creation Time:On 15/11/14. 5 | Copyright : Copyright © 2015年 DragonLi. All rights reserved. 6 | File Content Description: 7 | */ 8 | 9 | 10 | #import 11 | #import "FrameMainLFL.h" 12 | @interface FrameAutoScaleLFL : NSObject 13 | 14 | + (FrameAutoScaleLFL*)sharedFrameAutoScaleLFL; 15 | 16 | #pragma mark-----------Commonly used method 17 | 18 | #pragma mark CGRect 19 | /** 20 | setting a view Frame With the UIfigure number all value will be size to fit UIScreen 21 | 全部对应数值都将按照比例缩放返回一个进过处理缩放比例的frame. 22 | */ 23 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width height:(CGFloat) height; 24 | /** 25 | setting a view Frame With the UIfigure number special CGRectGetY 26 | 全部对应数值都将按照比例缩放而Y参数除外的frame.eg: 获取上个控件的Y,不可以再次缩放. 27 | */ 28 | + (CGRect)CGLFLMakeX:(CGFloat) x CGRectGetY:(CGFloat) GetY width:(CGFloat) width height:(CGFloat) height; 29 | /** 30 | setting a view Frame With the UIfigure number special CGRectGetX 31 | 返回正常处理通过CGRectGetX方式的frame(其他均正常) special X eg: 20 always 20 Value 32 | 比如控件,左边距离 屏幕20 就可以使用这个设置 33 | */ 34 | + (CGRect)CGLFLMakeGetX:(CGFloat)GetX Y:(CGFloat) Y width:(CGFloat) width height:(CGFloat) height; 35 | /** 36 | setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 37 | 比如导航栏的高度,一直不变,或者设置固定的高度,可以使用 38 | */ 39 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width heightAllSame:(CGFloat) heightAllSame; 40 | + (CGRect)CGLFLfullScreen; 41 | #pragma mark CGPoint 42 | /** 43 | setting view Frame 44 | */ 45 | + (CGPoint)CGLFLPointMakeX:(CGFloat) x Y:(CGFloat) y; 46 | 47 | #pragma mark CGsize 48 | /** 49 | setting view size 50 | */ 51 | + (CGSize)CGSizeLFLMakeWidth:(CGFloat) widthLFL hight:(CGFloat) hightLFL; 52 | /** 53 | setting view Size equal MainScreen. 54 | */ 55 | + (CGSize)CGSizeLFLMakeMainScreenSize; 56 | /** 57 | setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 58 | 更加方便设置宽高相等的控件,解决4s变形的问题, 59 | * @param radiusValue 指定控件的相等的宽或高的数值 60 | * @param isScale radiusValue是否不同机型缩放 ,根据不同要求,如果YES 则不同机型控件大小不同,如果所有机型都需保证同样数据,此处填写 NO即可 61 | */ 62 | 63 | //+ (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y radiusValue:(CGFloat)radiusValue isScale:(BOOL)isScale; 64 | /** 65 | * storyBoard中得view自动适配 66 | * @param storyBoradClassName 需要适配的storyBorad类名. 67 | */ 68 | //+ (void)storyBoradLFLAutoLayoutsWithstoryBoradClassName:(NSString *)storyBoradClassName; 69 | 70 | /** 71 | * Xib中得view自动适配 72 | * @param NibClassName 需要适配的xib类名 73 | */ 74 | //+ (void)xibLFLAutoLayoutsWithNibClassName:(NSString *)NibClassName; 75 | 76 | /** 77 | return a fullSrceen frame 78 | */ 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /FrameAutoScaleLFL/FrameAutoScaleLFL.m: -------------------------------------------------------------------------------- 1 | /* 2 | The File Name:FrameAutoScaleLFL.m 3 | The Creator  :Created by DragonLi 4 | Creation Time:On 15/11/14. 5 | Copyright : Copyright © 2015年 DragonLi. All rights reserved. 6 | File Content Description: 7 | */ 8 | 9 | #import "FrameAutoScaleLFL.h" 10 | 11 | @interface FrameAutoScaleLFL () 12 | 13 | @property (nonatomic ,assign)float autoSizeScaleX;/**< 宽度缩放的比例 */ 14 | 15 | //@property (nonatomic ,assign)float autoSizeScaleY;/**< 高度缩放的比例 */ 16 | 17 | @end 18 | 19 | @implementation FrameAutoScaleLFL 20 | 21 | static FrameAutoScaleLFL *SINGLETON = nil; 22 | 23 | static bool isFirstAccess = YES; 24 | 25 | #pragma mark - Public Method 26 | 27 | + (instancetype)sharedFrameAutoScaleLFL{ 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | isFirstAccess = NO; 31 | SINGLETON = [[super allocWithZone:NULL] init]; 32 | 33 | }); 34 | 35 | return SINGLETON; 36 | } 37 | - (instancetype) init 38 | { 39 | if(SINGLETON){ 40 | return SINGLETON; 41 | } 42 | if (isFirstAccess) { 43 | [self doesNotRecognizeSelector:_cmd]; 44 | } 45 | [self AutoSizeScale]; 46 | self = [super init]; 47 | return self; 48 | } 49 | 50 | #pragma mark - Life Cycle 51 | 52 | + (instancetype) allocWithZone:(NSZone *)zone 53 | { 54 | return [self sharedFrameAutoScaleLFL]; 55 | } 56 | 57 | #pragma mark ----storyBorad Xib AutoLayouts 58 | /** 59 | * storyBoard中得view自动适配 60 | * @param storyBoradClassName 需要适配的storyBorad类名. 61 | */ 62 | + (void)storyBoradLFLAutoLayoutsWithstoryBoradClassName:(NSString *)storyBoradClassName 63 | { 64 | [self scaleAutoLayouts: [[UIViewController alloc] initWithNibName:storyBoradClassName bundle:nil].view ]; 65 | } 66 | 67 | /** 68 | * Xib中得view自动适配 69 | * @param NibClassName 需要适配的xib类名 70 | */ 71 | + (void)xibLFLAutoLayoutsWithNibClassName:(NSString *)NibClassName 72 | { 73 | [self scaleAutoLayouts:[[[NSBundle mainBundle] loadNibNamed: NibClassName owner:nil options:nil]firstObject]]; 74 | } 75 | /** 76 | *可视化的缩放适配 77 | * @param LayoutsBaseView 需要适配的控件添加的父类view 78 | */ 79 | + (void)scaleAutoLayouts:(UIView *)LayoutsBaseView{ 80 | for (UIView *viewLFL in LayoutsBaseView.subviews) { 81 | viewLFL.frame = [FrameAutoScaleLFL CGLFLMakeX:viewLFL.frame.origin.x Y:viewLFL.frame.origin.y width:viewLFL.frame.size.width height:viewLFL.frame.size.height]; 82 | if (viewLFL.subviews.count) { 83 | [self scaleAutoLayouts:LayoutsBaseView]; 84 | } 85 | } 86 | } 87 | 88 | 89 | #pragma mark -CGRect 90 | /** 91 | setting a view Frame With the UIfigure number all value will be size to fit UIScreen 92 | * @return 全部对应数值都将按照比例缩放返回一个进过处理缩放比例的frame. 93 | */ 94 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width height:(CGFloat) height{ 95 | return CGLFLMake(x, y, width, height); 96 | } 97 | /** 98 | setting a view Frame With the UIfigure number special CGRectGetY 99 | 全部对应数值都将按照比例缩放而Y参数除外的frame.eg: 获取上个控件的Y,不可以再次缩放. 100 | */ 101 | + (CGRect)CGLFLMakeX:(CGFloat) x CGRectGetY:(CGFloat) GetY width:(CGFloat) width height:(CGFloat) height{ 102 | CGFloat CGRectGetY = [FrameAutoScaleLFL sharedFrameAutoScaleLFL].autoSizeScaleX; 103 | return CGLFLMake(x, GetY / CGRectGetY, width, height); 104 | } 105 | /** 106 | 返回正常处理通过CGRectGetX方式的frame(其他均正常) 107 | */ 108 | + (CGRect)CGLFLMakeGetX:(CGFloat)GetX Y:(CGFloat) Y width:(CGFloat) width height:(CGFloat) height{ 109 | CGFloat CGRectGetX = [FrameAutoScaleLFL sharedFrameAutoScaleLFL].autoSizeScaleX; 110 | return CGLFLMake(GetX / CGRectGetX, Y, width, height); 111 | } 112 | /** 113 | setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 114 | 比如导航栏的高度,一直不变,或者设置固定的高度,可以使用. 115 | */ 116 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width heightAllSame:(CGFloat) heightAllSame{ 117 | CGFloat heightValue_LFL = [FrameAutoScaleLFL sharedFrameAutoScaleLFL].autoSizeScaleX; 118 | return CGLFLMake(x, y, width,heightAllSame / heightValue_LFL); 119 | } 120 | 121 | /** 122 | 返回一个全屏幕的 frame 123 | */ 124 | + (CGRect)CGLFLfullScreen{ 125 | return CGLFLMake(0, 0, RealUISrceenWidth, RealUISrceenHight); 126 | } 127 | #pragma mark CGPoint 128 | + (CGPoint)CGLFLPointMakeX:(CGFloat) x Y:(CGFloat) y{ 129 | return CGPointLFLMake(x, y); 130 | } 131 | #pragma mark CGsize 132 | + (CGSize)CGSizeLFLMakeWidth:(CGFloat) widthLFL hight:(CGFloat) hightLFL{ 133 | return CGSizeLFLMake(widthLFL, hightLFL); 134 | } 135 | + (CGSize)CGSizeLFLMakeWH:(CGFloat)WH{ 136 | return CGSizeLFLMake(WH, WH); 137 | } 138 | + (CGSize)CGSizeLFLMakeMainScreenSize{ 139 | return CGSizeLFLMake( RealUISrceenWidth, RealUISrceenHight); 140 | } 141 | 142 | #pragma mark 重写CGRectMake方法 143 | /** 144 | 重写CGRectMake 方法 145 | */ 146 | CG_INLINE CGRect 147 | CGLFLMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) 148 | { 149 | 150 | FrameAutoScaleLFL *LFL = [FrameAutoScaleLFL sharedFrameAutoScaleLFL]; 151 | CGRect rect; 152 | rect.origin.x = x *LFL.autoSizeScaleX; 153 | rect.origin.y = y * LFL.autoSizeScaleX; 154 | rect.size.width = width * LFL.autoSizeScaleX; 155 | rect.size.height = height * LFL.autoSizeScaleX; 156 | return rect; 157 | } 158 | /** 159 | 重写CGPoint 方法 160 | */ 161 | CG_INLINE CGPoint 162 | CGPointLFLMake(CGFloat x, CGFloat y) 163 | { 164 | FrameAutoScaleLFL *LFL = [FrameAutoScaleLFL sharedFrameAutoScaleLFL]; 165 | CGPoint pointLFL; 166 | pointLFL.x = x * LFL.autoSizeScaleX; 167 | pointLFL.y = y * LFL.autoSizeScaleX; 168 | return pointLFL; 169 | } 170 | /** 171 | 重写CGSize 方法 172 | */ 173 | CG_INLINE CGSize 174 | CGSizeLFLMake(CGFloat width, CGFloat height) 175 | { 176 | FrameAutoScaleLFL *LFL = [FrameAutoScaleLFL sharedFrameAutoScaleLFL]; 177 | CGSize sizeLFL; 178 | sizeLFL.width = width* LFL.autoSizeScaleX; 179 | sizeLFL.height = height* LFL.autoSizeScaleX; 180 | return sizeLFL; 181 | } 182 | 183 | #pragma mark------所有设置中只计算一次缩放比例 只采用 x缩放计算 放弃x和y同时 184 | - (void)AutoSizeScale{ 185 | _autoSizeScaleX = ScreenWidthLFL/RealUISrceenWidth; 186 | // _autoSizeScaleY = ScreenHightLFL/RealUISrceenHight; 187 | } 188 | @end 189 | -------------------------------------------------------------------------------- /FrameAutoScaleLFL/FrameMainLFL.h: -------------------------------------------------------------------------------- 1 | // 2 | // FrameMainLFL.h 3 | // ScreenAdaptation-Rapid 4 | // 5 | // Created by vintop_xiaowei on 16/3/20. 6 | // Copyright © 2016年 DragonLi. All rights reserved. 7 | /** 8 | 1.1 如果工程文件多处使用的话,最好在pch文件中导入 9 | 10 | #import "FrameMainLFL.h" 11 | 12 | 1.2 说明可以设置 CGRect CGPoint CGSize 13 | 14 | label_LFL.frame =[FrameAutoScaleLFL CGLFLMakeX:100 Y:0 width:100 height:100]; 15 | label_LFL.frame.size = [FrameAutoScaleLFL CGSizeLFLMakeMainScreenSize]; 16 | label_LFL.frame.origin= [FrameAutoScaleLFL CGLFLPointMakeX:200 Y:200]; 17 | 其他详细说明参考文件中readme或者demo代码即可. 18 | https://github.com/DevDragonLi/ScreenAdaptation-Rapid 19 | 20 | 1.3.如果觉得不错,希望给个star ,谢谢. 21 | */ 22 | 23 | #ifndef FrameMainLFL_h 24 | #define FrameMainLFL_h 25 | 26 | #define ScreenWidthLFL CGRectGetMaxX([UIScreen mainScreen].bounds) 27 | #define ScreenHightLFL CGRectGetMaxY([UIScreen mainScreen].bounds) 28 | 29 | #pragma mark 说明:下面二个参数,看公司项目UI图 具体是哪款机型,默认 iphone6 30 | /** 31 | RealUISrceenH 4/4s 修改480 5/5s 568 6/6s 667 6p/6sp 736 32 | */ 33 | static const float RealUISrceenHight = 667.0; 34 | /** 35 | RealUISrceenW 4/4s 5/5s 320 6/6s 375 6p/6sp 414 36 | */ 37 | static const float RealUISrceenWidth = 375.0; 38 | 39 | #import "FrameAutoScaleLFL.h" 40 | 41 | #pragma mark 一系列宏定义,快速设置frame等 42 | /** 43 | [FrameAutoScaleLFL CGLFLMakeX:20 CGRectGetX:CGRectGetMaxY(detailUI.frame) width:300 height:30] 44 | 如果觉得这样写麻烦,可以使用一下宏定义 45 | */ 46 | #define WIDTH_LFL(X_LFL) ScreenWidthLFL*(X_LFL)/RealUISrceenWidth 47 | #define HEIGHT_LFL(Y_LFL) ScreenHightLFL*(Y_LFL)/RealUISrceenHight 48 | 49 | #define RectMake_LFL(X_LFL,Y_LFL,WIDTH_LFL,HEIGHT_LFL) CGRectMake(ScreenWidthLFL*(X_LFL)/RealUISrceenWidth,ScreenHightLFL*(Y_LFL)/RealUISrceenHight,ScreenWidthLFL*(WIDTH_LFL)/RealUISrceenWidth, ScreenHightLFL*(HEIGHT_LFL)/RealUISrceenHight) 50 | 51 | #define EdgeInsets_LFL(X_LFL,Y_LFL,WIDTH_LFL,HEIGHT_LFL) UIEdgeInsetsMake(ScreenWidthLFL*(X_LFL)/RealUISrceenWidth,ScreenHightLFL*(Y_LFL)/RealUISrceenHight,ScreenWidthLFL*(WIDTH_LFL)/RealUISrceenWidth, ScreenHightLFL*(HEIGHT_LFL)/RealUISrceenHight) 52 | 53 | #define PointMake_LFL(X_LFL,Y_LFL) CGPointMake(ScreenWidthLFL*(X_LFL)/RealUISrceenWidth, ScreenHightLFL*(Y_LFL)/RealUISrceenHight) 54 | 55 | #define SizeMake_LFL(WIDTH_LFL,HEIGHT_LFL) CGSizeMake(ScreenWidthLFL*(WIDTH_LFL)/RealUISrceenWidth, ScreenHightLFL*(HEIGHT_LFL)/RealUISrceenHight) 56 | 57 | #endif /* FrameMainLFL_h */ 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ScreenAdaptationKit 2 | 3 | 4 | - **[已上线项目采取此库适配APP](#Adapt_app)** 5 | - **[Installation](#Installation)** 6 | - **[使用示例代码](#codeExample)** 7 | - **[更新日志](#changeLog)** 8 | - [停止更新维护原因](#changeLog) 9 | - **[参考](#reference)** 10 | - **[contact me ](#email)** 11 | 12 | [![star this repo](http://githubbadges.com/star.svg?user=DevDragonLi&repo=ScreenAdaptationKit)](http://github.com/DevDragonLi/ScreenAdaptationKit) 13 | [![fork this repo](http://githubbadges.com/fork.svg?user=DevDragonLi&repo=ScreenAdaptationKit)](http://github.com/DevDragonLi/ScreenAdaptationKit/fork) 14 | 15 | ## Stargazers over time 16 | 17 | [![Stargazers over time](https://starcharts.herokuapp.com/DevDragonLi/ScreenAdaptationKit.svg)](https://starcharts.herokuapp.com/DevDragonLi/ScreenAdaptationKit) 18 | 19 | ### 已上线项目采取此库适配APP 20 | 21 | > 中国文化与艺术 22 | 23 | > Aparty 24 | 25 | > ... 26 | 27 | ## Installation 28 | 29 | - With [CocoaPods](http://cocoapods.org), add this line to your Podfile. 30 | 31 | ``` 32 | pod 'ScreenCompatible_LFL', '~> 1.0.0' 33 | 34 | pod install 35 | 36 | ``` 37 | - 下载源码后把`FrameAutoScaleLFL`文件夹直接拖入工程即可 38 | 39 | - 如果发现使用后代码适配依旧有问题,请检查你的工程中,启动图片是否完整,如果启动图片不完整,默认最大图片尺寸为屏幕尺寸. 40 | 41 | ## user code Example 42 | 43 | - 使用宏布局,框架定义了一系列宏,更方便设置,详见demo 44 | 45 | ```objc 46 | 47 | // 2016年3.20号更新 48 | // 1.frame 49 | // RectMake_LFL(<#X_LFL#>, <#Y_LFL#>, <#WIDTH_LFL#>, <#HEIGHT_LFL#>) 50 | RectMake_LFL(20, 20, 100, 100); 51 | // 2. point 52 | // PointMake_LFL(<#X_LFL#>, <#Y_LFL#>) 53 | PointMake_LFL(30, 30); 54 | // 3. Size 55 | // SizeMake_LFL(<#WIDTH_LFL#>, <#HEIGHT_LFL#>) 56 | SizeMake_LFL(60, 60); 57 | // 4. edgeInsets 58 | // EdgeInsets_LFL(<#X_LFL#>, <#Y_LFL#>, <#WIDTH_LFL#>, <#HEIGHT_LFL#>) 59 | EdgeInsets_LFL(10, 0, 10, 0); 60 | 61 | ``` 62 | 63 | - 使用`frame`布局 64 | 65 | ```objc 66 | /** 67 | #pragma mark 68 | 1.1普通使用 以下测试。请切换模拟器查看打印数据对比 是否等比例缩放 iPhone4s -6sPlus 如果公司UI图是以iphone6为基准, 直接写UI图上的坐标即可,如果其他尺寸,进入FrameAutoScaleLFL.h文件头文件修改RealUISrceenHight 和RealUISrceenWidth 为其他尺寸即可. 69 | /** 70 | 1.1 Eg: [FrameAutoScaleLFL CGLFLMakeX:30 Y:300 width:200 height:40] 71 | setting a view Frame With the UIfigure number all value will be size to fit UIScreen 72 | 全部对应数值都将按照比例缩放返回一个进过处理缩放比例的frame. 73 | */ 74 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width height:(CGFloat) height; 75 | 76 | /** 77 | setting a view Frame With the UIfigure number special CGRectGetY 78 | 全部对应数值都将按照比例缩放而Y参数除外的frame.eg: 获取上个控件的Y,不可以再次缩放. 79 | */ 80 | + (CGRect)CGLFLMakeX:(CGFloat) x CGRectGetY:(CGFloat) GetY width:(CGFloat) width height:(CGFloat) height; 81 | /** 82 | setting a view Frame With the UIfigure number special CGRectGetX 83 | 返回正常处理通过CGRectGetX方式的frame(其他均正常) special X eg: 20 always 20 Value 84 | 比如控件,左边距离 屏幕20 就可以使用这个设置 85 | */ 86 | + (CGRect)CGLFLMakeGetX:(CGFloat)GetX Y:(CGFloat) Y width:(CGFloat) width height:(CGFloat) height; 87 | /** 88 | setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 89 | 比如导航栏的高度,一直不变,或者设置固定的高度,可以使用 90 | */ 91 | + (CGRect)CGLFLMakeX:(CGFloat) x Y:(CGFloat) y width:(CGFloat) width heightAllSame:(CGFloat) heightAllSame; 92 | 93 | /** 94 | return a fullSrceen frame 95 | */ 96 | + (CGRect)CGLFLfullScreen; 97 | 98 | ``` 99 | 100 | ```objc 101 | label_LFL.frame =[FrameAutoScaleLFL CGLFLMakeX:100 Y:0 width:100 height:100]; 102 | label_LFL.frame.size = [FrameAutoScaleLFL CGSizeLFLMakeMainScreenSize]; 103 | label_LFL.frame.origin= [FrameAutoScaleLFL CGLFLPointMakeX:200 Y:200]; 104 | 105 | ``` 106 | 107 | ## `masonry`测试耗时,创建view控件100个,同样位置大小,测试次数三次,相比较而言,对于简单布局,采取frame效率更佳.(不同项目要求不同,可以搭配使用). 108 | 109 | ```objc 110 | 111 | - (void)viewDidLoad { 112 | [super viewDidLoad]; 113 | // 测试:创建100个view 颜色均为红色 114 | #define TICK NSDate *startTime = [NSDate date]; 115 | #define TOCK NSLog(@"耗时统计:%f", -[startTime timeIntervalSinceNow]); 116 | 117 | //[self Masonry]; // 0.017872 0.016632 0.020712 118 | 119 | [self ScreenCompatible]; // 0.001341 0.000702 0.000923 120 | } 121 | 122 | - (void)Masonry{ 123 | for (int i = 0; i < 100; i++) { 124 | UIView *view = [[UIView alloc]init]; 125 | view.backgroundColor = [UIColor redColor]; 126 | [self.view addSubview:view]; 127 | __weak typeof(self) weakSelf=self; 128 | [view mas_makeConstraints:^(MASConstraintMaker *make) { 129 | make.size.mas_equalTo(100); 130 | make.top.equalTo(weakSelf.view.mas_top); 131 | make.left.equalTo(weakSelf.view.mas_left); 132 | }]; 133 | } 134 | } 135 | 136 | - (void)ScreenCompatible{ 137 | for (int i = 0; i < 100; i++) { 138 | UIView *view = [[UIView alloc]init]; 139 | view.backgroundColor = [UIColor redColor]; 140 | [self.view addSubview:view]; 141 | view.frame = RectMake_LFL(0,0, 100, 100); 142 | } 143 | } 144 | ``` 145 | 146 | ## 更新日志 147 | 148 | - **2018 - 05 - 18** 149 | - 增加`Stargazers over time`,`star`,`fork` 150 | - fix : `Xcode warning`,更新日志 . 151 | 152 | - **2017 - 03 - 16** 153 | 154 | - 鉴定与缩放适配,在大屏幕手机显示存在,肉眼可分辨的问题(更大的屏幕应该显示更多的内容),后期不再维护. 155 | - 建议使用:**[Masonry](https://github.com/cloudkite/Masonry.git)** 156 | 157 | - **2016 - 03 - 05** 158 | - update `API` 159 | - 减少代码多余的框架,演示代码修改 160 | 161 | - **2016 - 02 - 19** 162 | 163 | - 如果布局中有涉及设置导航栏和使用CGRectGetMaxY() CGRectGetMaxX等导致再次缩放的问题,提供新API方法 164 | - 长文本无法获取具体Y点,需要通过CGRectGetMaxY()方式,如果使用之前方法,会导致y数值二次缩放,导致出错.代码调整,便于查看demo 165 | 166 | - **2016 - 01 - 23** 167 | 168 | - 更新可视化的storyBoard和xib中得view自动适配方法,参考demo代码,一行搞定! 169 | - 布局控件时可以(按照UI手机型号)尺寸布局,布局完成后,Size选择Freeform即可,可以自行测试. 170 | - 修改屏幕宽高的宏定义名字,避免和项目中的重名 171 | 172 | 173 | - **2016 - 01 - 22** 174 | 175 | - 适配全机型(之前适配到5而已,网上缩放适配也都是到5) 176 | 177 | - **2015 - 11 - 14** 178 | 179 | - 控件设置坐标时 如下写即可 ,直接调用类方法设置,eg: CGRect CGPoint CGSize 180 | 181 | 182 | ## 参考资料和其他 183 | 184 | - [知乎](https://www.zhihu.com/question/25421514) 185 | 186 | - [blog.csdn](http://blog.csdn.net/phunxm/article/details/42174937) 187 | 188 | 189 | ## 有任何问题,请及时 issues me 190 | 191 | > Email:`dragonli_52171@163.com` 192 | 193 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4337B1DE1C51D470007CDB1C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4337B1D31C51D470007CDB1C /* AppDelegate.m */; }; 11 | 4337B1DF1C51D470007CDB1C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4337B1D41C51D470007CDB1C /* Assets.xcassets */; }; 12 | 4337B1E01C51D470007CDB1C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4337B1D61C51D470007CDB1C /* LaunchScreen.storyboard */; }; 13 | 4337B1E11C51D470007CDB1C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4337B1D81C51D470007CDB1C /* Main.storyboard */; }; 14 | 4337B1E31C51D470007CDB1C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4337B1DB1C51D470007CDB1C /* main.m */; }; 15 | 4337B1EF1C520053007CDB1C /* LFLMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4337B1ED1C520053007CDB1C /* LFLMainViewController.m */; }; 16 | 43B76DA91C53B8A900DCFA3D /* testXib.xib in Resources */ = {isa = PBXBuildFile; fileRef = 43B76DA71C53B8A900DCFA3D /* testXib.xib */; }; 17 | 43F57F571C78D31100AFC2DC /* FrameAutoScaleLFL.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F57F561C78D31100AFC2DC /* FrameAutoScaleLFL.m */; }; 18 | 43F57F591C78D3E300AFC2DC /* info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 43F57F581C78D3E300AFC2DC /* info.plist */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 4337B1D21C51D470007CDB1C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "ScreenAdaptation-Rapid/AppDelegate.h"; sourceTree = SOURCE_ROOT; }; 23 | 4337B1D31C51D470007CDB1C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "ScreenAdaptation-Rapid/AppDelegate.m"; sourceTree = SOURCE_ROOT; }; 24 | 4337B1D41C51D470007CDB1C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = "ScreenAdaptation-Rapid/Assets.xcassets"; sourceTree = SOURCE_ROOT; }; 25 | 4337B1D71C51D470007CDB1C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = LaunchScreen.storyboard; sourceTree = ""; }; 26 | 4337B1D91C51D470007CDB1C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Main.storyboard; sourceTree = ""; }; 27 | 4337B1DB1C51D470007CDB1C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "ScreenAdaptation-Rapid/main.m"; sourceTree = SOURCE_ROOT; }; 28 | 4337B1ED1C520053007CDB1C /* LFLMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LFLMainViewController.m; path = "ScreenAdaptation-Rapid/LFLMainViewController.m"; sourceTree = SOURCE_ROOT; }; 29 | 4337B1EE1C520053007CDB1C /* LFLMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LFLMainViewController.h; path = "ScreenAdaptation-Rapid/LFLMainViewController.h"; sourceTree = SOURCE_ROOT; }; 30 | 43B76DA71C53B8A900DCFA3D /* testXib.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = testXib.xib; path = "ScreenAdaptation-Rapid/testXib.xib"; sourceTree = SOURCE_ROOT; }; 31 | 43F57F551C78D31100AFC2DC /* FrameAutoScaleLFL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameAutoScaleLFL.h; sourceTree = ""; }; 32 | 43F57F561C78D31100AFC2DC /* FrameAutoScaleLFL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FrameAutoScaleLFL.m; sourceTree = ""; }; 33 | 43F57F581C78D3E300AFC2DC /* info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = info.plist; path = "ScreenAdaptation-Rapid/info.plist"; sourceTree = SOURCE_ROOT; }; 34 | 43F7878C1C9DD2B800364B34 /* FrameMainLFL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameMainLFL.h; sourceTree = ""; }; 35 | 87725DB81BF6513A00BD3569 /* ScreenAdaptation-Rapid.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ScreenAdaptation-Rapid.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 87725DB51BF6513A00BD3569 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 4337B1D51C51D470007CDB1C /* Base.lproj */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | 4337B1D61C51D470007CDB1C /* LaunchScreen.storyboard */, 53 | 4337B1D81C51D470007CDB1C /* Main.storyboard */, 54 | ); 55 | name = Base.lproj; 56 | path = "ScreenAdaptation-Rapid/Base.lproj"; 57 | sourceTree = SOURCE_ROOT; 58 | }; 59 | 4337B1E51C51D4AC007CDB1C /* FrameAutoScaleLFL */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 43F7878C1C9DD2B800364B34 /* FrameMainLFL.h */, 63 | 43F57F551C78D31100AFC2DC /* FrameAutoScaleLFL.h */, 64 | 43F57F561C78D31100AFC2DC /* FrameAutoScaleLFL.m */, 65 | ); 66 | path = FrameAutoScaleLFL; 67 | sourceTree = SOURCE_ROOT; 68 | }; 69 | 4337B1EC1C51FB0F007CDB1C /* Other */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 43B76DA51C53B88000DCFA3D /* xib */, 73 | 4337B1D21C51D470007CDB1C /* AppDelegate.h */, 74 | 4337B1D31C51D470007CDB1C /* AppDelegate.m */, 75 | ); 76 | name = Other; 77 | sourceTree = ""; 78 | }; 79 | 43B76DA51C53B88000DCFA3D /* xib */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 43B76DA71C53B8A900DCFA3D /* testXib.xib */, 83 | ); 84 | name = xib; 85 | sourceTree = ""; 86 | }; 87 | 87725DAF1BF6513A00BD3569 = { 88 | isa = PBXGroup; 89 | children = ( 90 | 87725DBA1BF6513A00BD3569 /* ScreenAdaptation-Rapid */, 91 | 87725DB91BF6513A00BD3569 /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 87725DB91BF6513A00BD3569 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 87725DB81BF6513A00BD3569 /* ScreenAdaptation-Rapid.app */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 87725DBA1BF6513A00BD3569 /* ScreenAdaptation-Rapid */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 4337B1E51C51D4AC007CDB1C /* FrameAutoScaleLFL */, 107 | 4337B1EE1C520053007CDB1C /* LFLMainViewController.h */, 108 | 4337B1ED1C520053007CDB1C /* LFLMainViewController.m */, 109 | 4337B1EC1C51FB0F007CDB1C /* Other */, 110 | 87725DBB1BF6513A00BD3569 /* Supporting Files */, 111 | ); 112 | name = "ScreenAdaptation-Rapid"; 113 | path = ceshi; 114 | sourceTree = ""; 115 | }; 116 | 87725DBB1BF6513A00BD3569 /* Supporting Files */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 43F57F581C78D3E300AFC2DC /* info.plist */, 120 | 4337B1D41C51D470007CDB1C /* Assets.xcassets */, 121 | 4337B1D51C51D470007CDB1C /* Base.lproj */, 122 | 4337B1DB1C51D470007CDB1C /* main.m */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 87725DB71BF6513A00BD3569 /* ScreenAdaptation-Rapid */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 87725DCF1BF6513A00BD3569 /* Build configuration list for PBXNativeTarget "ScreenAdaptation-Rapid" */; 133 | buildPhases = ( 134 | 87725DB41BF6513A00BD3569 /* Sources */, 135 | 87725DB51BF6513A00BD3569 /* Frameworks */, 136 | 87725DB61BF6513A00BD3569 /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = "ScreenAdaptation-Rapid"; 143 | productName = ceshi; 144 | productReference = 87725DB81BF6513A00BD3569 /* ScreenAdaptation-Rapid.app */; 145 | productType = "com.apple.product-type.application"; 146 | }; 147 | /* End PBXNativeTarget section */ 148 | 149 | /* Begin PBXProject section */ 150 | 87725DB01BF6513A00BD3569 /* Project object */ = { 151 | isa = PBXProject; 152 | attributes = { 153 | LastUpgradeCheck = 0930; 154 | ORGANIZATIONNAME = "李夫龙"; 155 | TargetAttributes = { 156 | 87725DB71BF6513A00BD3569 = { 157 | CreatedOnToolsVersion = 7.1; 158 | DevelopmentTeam = UXF482VEW7; 159 | }; 160 | }; 161 | }; 162 | buildConfigurationList = 87725DB31BF6513A00BD3569 /* Build configuration list for PBXProject "ScreenAdaptation-Rapid" */; 163 | compatibilityVersion = "Xcode 3.2"; 164 | developmentRegion = English; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | Base, 169 | ); 170 | mainGroup = 87725DAF1BF6513A00BD3569; 171 | productRefGroup = 87725DB91BF6513A00BD3569 /* Products */; 172 | projectDirPath = ""; 173 | projectRoot = ""; 174 | targets = ( 175 | 87725DB71BF6513A00BD3569 /* ScreenAdaptation-Rapid */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | 87725DB61BF6513A00BD3569 /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 43F57F591C78D3E300AFC2DC /* info.plist in Resources */, 186 | 4337B1E11C51D470007CDB1C /* Main.storyboard in Resources */, 187 | 43B76DA91C53B8A900DCFA3D /* testXib.xib in Resources */, 188 | 4337B1DF1C51D470007CDB1C /* Assets.xcassets in Resources */, 189 | 4337B1E01C51D470007CDB1C /* LaunchScreen.storyboard in Resources */, 190 | ); 191 | runOnlyForDeploymentPostprocessing = 0; 192 | }; 193 | /* End PBXResourcesBuildPhase section */ 194 | 195 | /* Begin PBXSourcesBuildPhase section */ 196 | 87725DB41BF6513A00BD3569 /* Sources */ = { 197 | isa = PBXSourcesBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | 43F57F571C78D31100AFC2DC /* FrameAutoScaleLFL.m in Sources */, 201 | 4337B1EF1C520053007CDB1C /* LFLMainViewController.m in Sources */, 202 | 4337B1E31C51D470007CDB1C /* main.m in Sources */, 203 | 4337B1DE1C51D470007CDB1C /* AppDelegate.m in Sources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXSourcesBuildPhase section */ 208 | 209 | /* Begin PBXVariantGroup section */ 210 | 4337B1D61C51D470007CDB1C /* LaunchScreen.storyboard */ = { 211 | isa = PBXVariantGroup; 212 | children = ( 213 | 4337B1D71C51D470007CDB1C /* Base */, 214 | ); 215 | name = LaunchScreen.storyboard; 216 | sourceTree = ""; 217 | }; 218 | 4337B1D81C51D470007CDB1C /* Main.storyboard */ = { 219 | isa = PBXVariantGroup; 220 | children = ( 221 | 4337B1D91C51D470007CDB1C /* Base */, 222 | ); 223 | name = Main.storyboard; 224 | sourceTree = ""; 225 | }; 226 | /* End PBXVariantGroup section */ 227 | 228 | /* Begin XCBuildConfiguration section */ 229 | 87725DCD1BF6513A00BD3569 /* Debug */ = { 230 | isa = XCBuildConfiguration; 231 | buildSettings = { 232 | ALWAYS_SEARCH_USER_PATHS = NO; 233 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 234 | CLANG_CXX_LIBRARY = "libc++"; 235 | CLANG_ENABLE_MODULES = YES; 236 | CLANG_ENABLE_OBJC_ARC = YES; 237 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 238 | CLANG_WARN_BOOL_CONVERSION = YES; 239 | CLANG_WARN_COMMA = YES; 240 | CLANG_WARN_CONSTANT_CONVERSION = YES; 241 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 242 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INFINITE_RECURSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 249 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 250 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 251 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 252 | CLANG_WARN_STRICT_PROTOTYPES = YES; 253 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | DEBUG_INFORMATION_FORMAT = dwarf; 259 | ENABLE_STRICT_OBJC_MSGSEND = YES; 260 | ENABLE_TESTABILITY = YES; 261 | GCC_C_LANGUAGE_STANDARD = gnu99; 262 | GCC_DYNAMIC_NO_PIC = NO; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 276 | MTL_ENABLE_DEBUG_INFO = YES; 277 | ONLY_ACTIVE_ARCH = YES; 278 | SDKROOT = iphoneos; 279 | }; 280 | name = Debug; 281 | }; 282 | 87725DCE1BF6513A00BD3569 /* Release */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ALWAYS_SEARCH_USER_PATHS = NO; 286 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 287 | CLANG_CXX_LIBRARY = "libc++"; 288 | CLANG_ENABLE_MODULES = YES; 289 | CLANG_ENABLE_OBJC_ARC = YES; 290 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 291 | CLANG_WARN_BOOL_CONVERSION = YES; 292 | CLANG_WARN_COMMA = YES; 293 | CLANG_WARN_CONSTANT_CONVERSION = YES; 294 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INFINITE_RECURSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 301 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 302 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 304 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 305 | CLANG_WARN_STRICT_PROTOTYPES = YES; 306 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 307 | CLANG_WARN_UNREACHABLE_CODE = YES; 308 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 309 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 310 | COPY_PHASE_STRIP = NO; 311 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 312 | ENABLE_NS_ASSERTIONS = NO; 313 | ENABLE_STRICT_OBJC_MSGSEND = YES; 314 | GCC_C_LANGUAGE_STANDARD = gnu99; 315 | GCC_NO_COMMON_BLOCKS = YES; 316 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 317 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 318 | GCC_WARN_UNDECLARED_SELECTOR = YES; 319 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 320 | GCC_WARN_UNUSED_FUNCTION = YES; 321 | GCC_WARN_UNUSED_VARIABLE = YES; 322 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 323 | MTL_ENABLE_DEBUG_INFO = NO; 324 | SDKROOT = iphoneos; 325 | VALIDATE_PRODUCT = YES; 326 | }; 327 | name = Release; 328 | }; 329 | 87725DD01BF6513A00BD3569 /* Debug */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 333 | CODE_SIGN_IDENTITY = "iPhone Developer"; 334 | DEVELOPMENT_TEAM = UXF482VEW7; 335 | GCC_PREFIX_HEADER = ""; 336 | INFOPLIST_FILE = "ScreenAdaptation-Rapid/Info.plist"; 337 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 338 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 339 | PRODUCT_BUNDLE_IDENTIFIER = com.lilong.ceshi; 340 | PRODUCT_NAME = "ScreenAdaptation-Rapid"; 341 | }; 342 | name = Debug; 343 | }; 344 | 87725DD11BF6513A00BD3569 /* Release */ = { 345 | isa = XCBuildConfiguration; 346 | buildSettings = { 347 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 348 | CODE_SIGN_IDENTITY = "iPhone Developer"; 349 | DEVELOPMENT_TEAM = UXF482VEW7; 350 | GCC_PREFIX_HEADER = ""; 351 | INFOPLIST_FILE = "ScreenAdaptation-Rapid/Info.plist"; 352 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 353 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 354 | PRODUCT_BUNDLE_IDENTIFIER = com.lilong.ceshi; 355 | PRODUCT_NAME = "ScreenAdaptation-Rapid"; 356 | }; 357 | name = Release; 358 | }; 359 | /* End XCBuildConfiguration section */ 360 | 361 | /* Begin XCConfigurationList section */ 362 | 87725DB31BF6513A00BD3569 /* Build configuration list for PBXProject "ScreenAdaptation-Rapid" */ = { 363 | isa = XCConfigurationList; 364 | buildConfigurations = ( 365 | 87725DCD1BF6513A00BD3569 /* Debug */, 366 | 87725DCE1BF6513A00BD3569 /* Release */, 367 | ); 368 | defaultConfigurationIsVisible = 0; 369 | defaultConfigurationName = Release; 370 | }; 371 | 87725DCF1BF6513A00BD3569 /* Build configuration list for PBXNativeTarget "ScreenAdaptation-Rapid" */ = { 372 | isa = XCConfigurationList; 373 | buildConfigurations = ( 374 | 87725DD01BF6513A00BD3569 /* Debug */, 375 | 87725DD11BF6513A00BD3569 /* Release */, 376 | ); 377 | defaultConfigurationIsVisible = 0; 378 | defaultConfigurationName = Release; 379 | }; 380 | /* End XCConfigurationList section */ 381 | }; 382 | rootObject = 87725DB01BF6513A00BD3569 /* Project object */; 383 | } 384 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/LFL.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevDragonLi/ScreenAdaptationKit/90069ab02fde6de729a2dc63aa7d664c42f5b9b7/ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/LFL.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/Srain.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevDragonLi/ScreenAdaptationKit/90069ab02fde6de729a2dc63aa7d664c42f5b9b7/ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/Srain.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/vintop_xiaowei.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevDragonLi/ScreenAdaptationKit/90069ab02fde6de729a2dc63aa7d664c42f5b9b7/ScreenAdaptation-Rapid.xcodeproj/project.xcworkspace/xcuserdata/vintop_xiaowei.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ScreenAdaptation-Rapid 4 | // 5 | // Created by DragonLi on 15/11/14. 6 | // Copyright © 2015年 李夫龙. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ScreenAdaptation-Rapid 4 | // 5 | // Created by DragonLi on 15/11/14. 6 | // Copyright © 2015年 李夫龙. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "LFLMainViewController.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | _window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; 19 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:[LFLMainViewController new]]; 20 | _window.rootViewController = nav; 21 | [_window makeKeyAndVisible]; 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 28 | } 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | - (void)applicationWillEnterForeground:(UIApplication *)application { 36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 37 | } 38 | 39 | - (void)applicationDidBecomeActive:(UIApplication *)application { 40 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 41 | } 42 | 43 | - (void)applicationWillTerminate:(UIApplication *)application { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/LFLMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFLMainViewController.h 3 | // ScreenAdaptation-Rapid 4 | // 5 | // Created by vintop_xiaowei on 16/1/22. 6 | // Copyright © 2016年 李夫龙. All rights reserved. 7 | // 8 | 9 | #define LFLog(...) NSLog(__VA_ARGS__) 10 | #import 11 | @interface LFLMainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/LFLMainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LFLMainViewController.m 3 | // ScreenAdaptation-Rapid 4 | // demo 5 | // Created by vintop_xiaowei on 16/1/22. 6 | // Copyright © 2016年 李夫龙. All rights reserved. 7 | // 8 | #import "LFLMainViewController.h" 9 | #import "FrameMainLFL.h" 10 | @interface LFLMainViewController () 11 | 12 | @end 13 | 14 | @implementation LFLMainViewController 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | self.view.backgroundColor = [UIColor whiteColor]; 19 | #pragma mark 1.1普通使用 以下测试。请切换模拟器查看打印数据对比 是否等比例缩放 iPhone4s -6sPlus 如果公司UI图是以iphone6为基准, 直接写UI图上的坐标即可,如果其他尺寸,进入FrameMainLFL.h文件头文件修改RealUISrceenHight 和RealUISrceenWidth 为其他尺寸即可. 20 | 21 | /** 22 | 1.1 Eg: [FrameAutoScaleLFL CGLFLMakeX:30 Y:300 width:200 height:40] 23 | setting a view Frame With the UIfigure number all value will be size to fit UIScreen 24 | 全部对应数值都将按照比例缩放返回一个进过处理缩放比例的frame. 25 | */ 26 | // [self normallysettingAviewFrame]; 27 | UIView *view =[[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; 28 | view.backgroundColor =[UIColor redColor]; 29 | view.layer.masksToBounds = YES; 30 | view.layer.cornerRadius = 55; 31 | view.frame = RectMake_LFL(100, 100, 100, 100); 32 | 33 | [self.view addSubview:view]; 34 | 35 | NSLog(@"%@",NSStringFromCGRect(view.frame)); 36 | 37 | 38 | 39 | /** 40 | 1.2 Eg:[FrameAutoScaleLFL CGLFLMakeX:20 CGRectGetX:CGRectGetMaxY(lable_LFL1.frame) width:300 height:30] 41 | setting a view Frame With the UIfigure number special CGRectGetY 42 | 全部对应数值都将按照比例缩放而X / Y参数除外的frame.eg: 获取上个控件的Y,不可以再次缩放.或者x一直都为固定值. 43 | */ 44 | // [self specialCGRectGetXorYValue]; 45 | /** 46 | 1.2.2 setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 47 | 比如导航栏的高度,一直不变,或者设置固定的高度,可以使用 48 | */ 49 | // [self navigationUIExample]; 50 | // 1.3 其他CGSize CGPoint代码演示 51 | // [self otherMethodExample]; 52 | 53 | // 1.4 宏定义设置,去掉了调用的系统CG ,更方便打出宏, 54 | // [self MacroUse]; 55 | 56 | #pragma mark ---2. 关于storyBorad xib 的还未完善解决. 57 | // 1.storyBorad (填入对应storyBorad 类名即可) 58 | // 2. xib 类名 testXib.xib 59 | // 仅仅演示xib代码了,storyBorad一样,一行即可 60 | // [FrameAutoScaleLFL xibLFLAutoLayoutsWithNibClassName:@"testXib"]; 61 | // 得到 xib 的按钮 62 | // UIView *testXib = [[[NSBundle mainBundle] loadNibNamed: @"testXib" owner:nil options:nil]firstObject]; 63 | // UIButton *btn = testXib.subviews.firstObject; 64 | // LFLog(@"xib的按钮%@",NSStringFromCGRect(btn.frame)); 65 | 66 | } 67 | 68 | /** 69 | 1.1 Eg: [FrameAutoScaleLFL CGLFLMakeX:30 Y:300 width:200 height:40] 70 | setting a view Frame With the UIfigure number all value will be size to fit UIScreen 71 | 全部对应数值都将按照比例缩放返回一个进过处理缩放比例的frame. 72 | */ 73 | - (void)normallysettingAviewFrame{ 74 | UILabel *lable_LFL = [UILabel new]; 75 | lable_LFL.textAlignment = NSTextAlignmentCenter; 76 | lable_LFL.adjustsFontSizeToFitWidth = YES; 77 | lable_LFL.backgroundColor = [UIColor yellowColor]; 78 | // Generally we wrote any View frame code like this. 79 | lable_LFL.frame = CGRectMake(30, 300, 200, 40); 80 | // Example One : lable_LFL iphone 6 (30 300 200 40) 81 | lable_LFL.frame = [FrameAutoScaleLFL CGLFLMakeX:30 Y:300 width:200 height:40]; 82 | lable_LFL.text = NSStringFromCGRect(lable_LFL.frame); 83 | LFLog(@"不同机型缩放后对应坐标%@",NSStringFromCGRect(lable_LFL.frame)); 84 | [self.view addSubview:lable_LFL]; 85 | /** 86 | 4/4s : {25 215}, {170 28} 87 | 5/5s : {25 256}, {170 34} 88 | 6/6s : {30 300}, {200 40} 89 | 6p/6sp : {33 331}, {220 44} 90 | */ 91 | } 92 | #pragma mark 1.2增加 如果布局中有使用 CGRectGetMaxY() CGRectGetMaxX等方式的 新API方法 93 | /** 94 | 1.2 Eg:[FrameAutoScaleLFL CGLFLMakeX:20 CGRectGetX:CGRectGetMaxY(lable_LFL1.frame) width:300 height:30] 95 | setting a view Frame With the UIfigure number special CGRectGetY 96 | 全部对应数值都将按照比例缩放而X / Y参数除外的frame.eg: 获取上个控件的Y,不可以再次缩放.或者x一直都为固定值. 97 | */ 98 | - (void)specialCGRectGetXorYValue{ 99 | /** 获取相对上一个控件的最大X/Y,使用 [FrameAutoScaleLFL CGLFLMakeX:30 Y:CGRectGetMaxY(lable_LFL.frame) width:200 height:40] 造成问题解决 100 | */ 101 | // 1.21 creat a long text label 102 | CGFloat begainY = 64; 103 | UILabel *lable_LFL1 = [UILabel new]; 104 | lable_LFL1.layer.borderWidth = 1; 105 | lable_LFL1.text = @"https://github.com/LFL2018.DragonLihttps://github.com/LFL2018.DragonLi测试文字"; 106 | CGFloat TextHeight = [self label_LFL:lable_LFL1 getHeightWithTextWidth:350]; 107 | lable_LFL1.frame = [FrameAutoScaleLFL CGLFLMakeX:10 Y:begainY width:350 height:TextHeight]; 108 | [self.view addSubview:lable_LFL1]; 109 | // 1.22 此时需要在长文本下,创建其他控件.按照lable_LFL1 的最大Y 为开始值,如果使用之前方式,会二次缩放,导致比较麻烦 110 | // 切换5s 发现,6效果正常,5s就不对了,其他也不对 111 | UIView *belowTextView = [[UIView alloc]initWithFrame:[FrameAutoScaleLFL CGLFLMakeX:10 Y:CGRectGetMaxY(lable_LFL1.frame) width:300 height:20]]; 112 | belowTextView.backgroundColor = [UIColor greenColor]; 113 | [self.view addSubview:belowTextView]; 114 | LFLog(@"belowTextView坐标%@",NSStringFromCGRect(lable_LFL1.frame)); // 5s 错位 115 | //1.23 可以使用这个新的方法 即可解决! CGRectGetMaxX() CGRectGetMinX() 同样也可以 116 | 117 | belowTextView.frame = [FrameAutoScaleLFL CGLFLMakeX:10 CGRectGetY:CGRectGetMaxY(lable_LFL1.frame) width:320 height:25]; 118 | LFLog(@"belowTextView坐标%@",NSStringFromCGRect(lable_LFL1.frame)); // 正常显示 119 | #pragma mark 如果要求x一直都是20 可以这样使用即可 120 | // belowTextView.frame = [FrameAutoScaleLFL CGLFLMakeGetX:20 Y:20 width:20 height:20]; 121 | } 122 | 123 | /** 124 | 1.2.2 setting a view Frame With the UIfigure number special height eg: 64 always 64 Value 125 | 比如导航栏的高度,一直不变,或者设置固定的高度,可以使用 126 | */ 127 | - (void)navigationUIExample{ 128 | [self.navigationController.navigationBar setHidden:YES]; 129 | UILabel *navigationBarLabel = [[UILabel alloc]init]; 130 | navigationBarLabel.backgroundColor = [UIColor grayColor]; 131 | navigationBarLabel.textAlignment = NSTextAlignmentCenter; 132 | navigationBarLabel.text = @"我的高度任何机型下都是64"; 133 | navigationBarLabel.frame = [FrameAutoScaleLFL CGLFLMakeX:0 Y:0 width:375 heightAllSame:64]; 134 | [self.view addSubview:navigationBarLabel]; 135 | LFLog(@"navigationBarLabel高度%@",NSStringFromCGRect(navigationBarLabel.frame)); 136 | } 137 | 138 | /** 139 | 1.3 其他CGSize CGPoint代码演示 140 | */ 141 | - (void)otherMethodExample{ 142 | /**********************其他代码演示********************************/ 143 | // 1. CGSize 144 | UIScrollView *SV = [UIScrollView new]; 145 | SV.contentSize = [FrameAutoScaleLFL CGSizeLFLMakeMainScreenSize]; 146 | LFLog(@" 全屏size%@",NSStringFromCGSize(SV.contentSize)); 147 | SV.contentSize = [FrameAutoScaleLFL CGSizeLFLMakeWidth:200 hight:200]; 148 | LFLog(@"CGSize%@",NSStringFromCGSize(SV.contentSize)); 149 | 150 | // 2.CGPoint 151 | SV.center = [FrameAutoScaleLFL CGLFLPointMakeX:200 Y:200]; 152 | LFLog(@"CGPoint%@",NSStringFromCGPoint(SV.center)); 153 | } 154 | 155 | /** 156 | MacroUse 已经全部进行缩放处理 157 | */ 158 | - (void)MacroUse{ 159 | // 1.frame 160 | // RectMake_LFL(<#X_LFL#>, <#Y_LFL#>, <#WIDTH_LFL#>, <#HEIGHT_LFL#>) 161 | RectMake_LFL(20, 20, 100, 100); 162 | // 2. point 163 | // PointMake_LFL(<#X_LFL#>, <#Y_LFL#>) 164 | PointMake_LFL(30, 30); 165 | // 3. Size 166 | // SizeMake_LFL(<#WIDTH_LFL#>, <#HEIGHT_LFL#>) 167 | SizeMake_LFL(60, 60); 168 | // 4. edgeInsets 169 | // EdgeInsets_LFL(<#X_LFL#>, <#Y_LFL#>, <#WIDTH_LFL#>, <#HEIGHT_LFL#>) 170 | EdgeInsets_LFL(10, 0, 10, 0); 171 | } 172 | /** 173 | * @author iOS_DragonLi 174 | * 根据宽度和字体计算label所占高度 175 | * @param TextWidth 文本宽度 176 | * @return 所占TextWidth 177 | */ 178 | - (CGFloat)label_LFL:(UILabel *)label_LFL getHeightWithTextWidth:(CGFloat)TextWidth 179 | { 180 | NSDictionary *attribute = @{NSFontAttributeName: label_LFL.font}; 181 | label_LFL.numberOfLines = 0; 182 | CGSize retSize = [label_LFL.text boundingRectWithSize:CGSizeMake(TextWidth, 0) 183 | options:\ 184 | NSStringDrawingTruncatesLastVisibleLine | 185 | NSStringDrawingUsesLineFragmentOrigin | 186 | NSStringDrawingUsesFontLeading 187 | attributes:attribute 188 | context:nil].size; 189 | return retSize.height; 190 | } 191 | 192 | @end 193 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ceshi 4 | // 5 | // Created by DragonLi on 15/11/14. 6 | // Copyright © 2015年 李夫龙. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ScreenAdaptation-Rapid/testXib.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ScreenCompatible_LFL.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "ScreenCompatible_LFL" 4 | s.version = "1.0" 5 | s.summary = "iOS4s-6sp全机型基于缩放实现快速屏幕兼容适配_DragonLi" 6 | s.homepage = "https://github.com/LFL2018" 7 | s.license = "MIT" 8 | s.author = { "DragonLi" => "DragonLi_52171@163.com" } 9 | s.platform = :ios, "6.0" 10 | s.source = { :git => "https://github.com/LFL2018/ScreenAdaptation-Rapid.git", :tag => "1.0" } 11 | s.source_files = "FrameAutoScaleLFL", "*.{h,m}" 12 | s.requires_arc = true 13 | end --------------------------------------------------------------------------------