ios - CollectionView content goes under NavigationBar -



ios - CollectionView content goes under NavigationBar -

i added uicollectionviewcontroller using ib. added uinavigationbar in code:

uinavigationbar *navbar = [[uinavigationbar alloc] init]; [navbar setframe:cgrectmake(0, 20, self.view.frame.size.width, 44)]; [navbar setdelegate:self]; [self.view addsubview:navbar];

all works fine except fact collection view content hidden navigation bar. doesn't scroll beneath navigation bar in fact displays beneath when first loaded.

how can prepare that?

why using standalone navigation bar? it's bad idea. embed view controller in uinavigationcontroller, , create sure top contraint of uicollectionview set top layout guide , not view.

ios objective-c uinavigationbar uicollectionview

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -