Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuming
/
developer-docs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
suyuexin
2015-12-01 17:51:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
569c2c7b9a0f597c53e12d82be0146dfe4e17c3e
569c2c7b
1 parent
ffaffb4a
Updated iPhone适配 (markdown)
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
iPhone适配.md
iPhone适配.md
View file @
569c2c7
...
...
@@ -11,7 +11,7 @@
**适配须知:**
原版设计图的约束数值都是按照iPhone6(4.7-inch)的设计给的,在项目中
都是按照iPhone5(4-inch)的数值
实际使用的
原版设计图的约束数值都是按照iPhone6(4.7-inch)的设计给的,在项目中
转换为iPhone5(4-inch)的标准
实际使用的
**方法1:**
...
...
@@ -19,7 +19,7 @@
**适用环境:**
在没有新的
设计图的情况下,项目内的参数都需要这个宏来
,参数是:(按照iPhone6给的约束计算出的iPhone5的标准)
在没有新的
iPhone6P的设计图的情况下,项目内的UI约束都需要使用这个宏
,参数是:(按照iPhone6给的约束计算出的iPhone5的标准)
**例如:**
...
...
@@ -42,4 +42,8 @@
UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100 / 2 * 0.854, 100)];
新设计图的约束是width = 50 ; height = 120;
适配后的代码是:
UILabel
*nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, LayoutForFitIPhone6P(100 / 2 *
0.854, 50), LayoutForFitIPhone6P(100, 120))];
\ No newline at end of file
UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, LayoutForFitIPhone6P(100 / 2 * 0.854, 50), LayoutForFitIPhone6P(100, 120))];
**有疑问?:**
苏越鑫suyuexin@boxfish.cn
\ No newline at end of file
...
...
Please
register
or
login
to post a comment