Commit 27efa814 authored by Wilson Yuan's avatar Wilson Yuan

Fix frame issue when navigation bar translucent is NO

parent 640c1b9e
......@@ -516,8 +516,11 @@
albumModel.selectedModels = imagePickerVc.selectedModels;
}
if (!_tableView) {
CGFloat top = 44;
CGFloat top = 0;
if (self.navigationController.navigationBar.translucent) {
top = 44;
if (iOS7Later) top += 20;
}
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, top, self.view.tz_width, self.view.tz_height - top) style:UITableViewStylePlain];
_tableView.rowHeight = 70;
_tableView.tableFooterView = [[UIView alloc] init];
......
......@@ -119,8 +119,12 @@ static CGSize AssetGridThumbnailSize;
layout.itemSize = CGSizeMake(itemWH, itemWH);
layout.minimumInteritemSpacing = margin;
layout.minimumLineSpacing = margin;
CGFloat top = 44;
CGFloat top = 0;
if (self.navigationController.navigationBar.translucent) {
top = 44;
if (iOS7Later) top += 20;
}
CGFloat collectionViewHeight = tzImagePickerVc.showSelectBtn ? self.view.tz_height - 50 - top : self.view.tz_height - top;
_collectionView = [[TZCollectionView alloc] initWithFrame:CGRectMake(0, top, self.view.tz_width, collectionViewHeight) collectionViewLayout:layout];
_collectionView.backgroundColor = [UIColor whiteColor];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment