Skip to content

Commit

Permalink
适配iPad,优化iPad下显示
Browse files Browse the repository at this point in the history
  • Loading branch information
longitachi committed Aug 31, 2017
1 parent a7a1073 commit cc64962
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion PhotoBrowser/ZLThumbnailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,16 @@ - (void)initCollectionView
} else {
width = kViewWidth;
}
layout.itemSize = CGSizeMake((width-9)/4, (width-9)/4);

NSInteger columnCount;

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
columnCount = 6;
} else {
columnCount = 4;
}

layout.itemSize = CGSizeMake((width-1.5*columnCount)/columnCount, (width-1.5*columnCount)/columnCount);
layout.minimumInteritemSpacing = 1.5;
layout.minimumLineSpacing = 1.5;
layout.sectionInset = UIEdgeInsetsMake(3, 0, 3, 0);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

### 更新日志
```
● 2.3.1: 新增设置导航颜色api,初步适配横屏;
● 2.3.1: 新增设置导航颜色api,初步适配横屏,适配iPad;
● 2.2.9: 新增单选模式下选择图片后直接进入编辑界面功能,提供设置裁剪比例api;
● 2.2.8: 更新编辑图片功能,增加裁剪比例选项(1:1, 3:4, 2:3, 9:16,等比例,开发者可根据需求,按照规则自行添加所需比例);
● 2.2.6: ①:可混合选择image、gif、livephoto、video类型;
Expand Down

0 comments on commit cc64962

Please sign in to comment.