0

I'm trying to initialize a custom view in a viewcontroller. My custom view has the following code:

- (instancetype)initWithNib {
self = [super initWithFrame:[[UIScreen mainScreen] bounds]];
if (self) {

The problem is, when I run it in emulator, the height is shorter than fullscreen. I am running it for iPhone 5s.

height wrong image

Why is this happening? I know there are a lot of posts where people talk about launch images and what not but I tried that for a little bit and still cant seem to get it to work. Can someone outline for me step by step exactly what I need to do? Thanks!

EDIT:

So I did a little more digging and in my Login ViewController, the self.view.bounds.size.height is 480 while the same attribute is 568 in the page where it looks weird. Why is this happening? How do I have it so the bounds are the same for the whole app?

EDIT 2: I even added all the launch images of proper sizes and it still doesn't work. The size is still wrong.... someone please help!

stellarowl12
  • 525
  • 6
  • 18

0 Answers0