0

I'm developing iMessage Extension app. My problem is that the collection view is visible behind navigation bar in expand mode.

Is there anybody who has experience in this area? Looking for any help.

Ioan Moldovan
  • 2,272
  • 2
  • 29
  • 54

3 Answers3

0

Give constraint to your CollectionView like this while Constraint to marginsis unselected.

enter image description here

Source code

Mohammad Zaid Pathan
  • 16,304
  • 7
  • 99
  • 130
0

you can try changing the content offset of the collection view to in order to shift it below the navigation bar, something like this:

collectionView.contentOffset = CGPointMake(0, navigationController.navigationBar.frame.size.height)
Amjad Husseini
  • 475
  • 7
  • 12
  • thanks for your answer, but it only adjusts the scroll view start position, and it is still visible behind navigation bar. – Ioan Moldovan Oct 23 '16 at 00:26
0

After give Constraints(Top:0,Left:0,Right:0,Bottom:0),you should give Top Constraints of CollectionView to Top Layout Guide.Bottom ratherthan Superview.Top like this:

CollectionView.Top = Top Layout Guide.Bottom is set to 0.

Pragnesh Vitthani
  • 2,532
  • 20
  • 28