Question

This may be a dumb question. In books, it shows the following screenshot for collection view cell,

good one!

You can see the collection view cell is below the battery icon.

However, when I tried it in storyboard, it is shown as below.

bad one!

The collection view cell overlap the batter icon line.

It seems I can not move the collection view cell.

How to move it a little bit below the battery icon line?

Thanks.

Was it helpful?

Solution

Put following condition of frame of UICollectionView.

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) 
   collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(x, 20, width, height)];         
else          
   collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(x, 0, width, height)];

For deeply understand refer following question/answer;

iOS 7 status bar overlapping UI
iOS 7 - Status bar overlaps the view
Status bar and navigation bar issue in IOS7
Storyboard-set iOS 7 Status Bar not shown in right style
Storyboard app run on iOS 7 OK but Navbar shift view on iOS 6.1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top