Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. // There is no top banner, but it does use the footer
  2. topBannerView.frame = CGRectMake(0, 0, 320, 0);
  3. mainView.frame = CGRectMake(0, 0, 320, 400);
  4. footerView.frame = CGRectMake(0, 400, 320, 60);
  5.  
  6. if(!topBannerView.hidden)
  7. {
  8. topBannerHeight = topBannerView.bounds.size.height; //syntax here might be a little off, can't test code right now, but I think it's close to this
  9. }
  10. else
  11. {
  12. topBannerHeight = 0;
  13. }
  14.  
  15. topBannerView.frame = CGRectMake(0, 0, 320, topBannerHeight);
  16. mainView.frame = CGRectMake(0, topBannerHeight, 320, mainViewHeight);
  17. footerView.frame = CGRectMake(0, (mainViewHeight+topBannerHeight), 320, footerViewHeight);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement