CLCascade icon indicating copy to clipboard operation
CLCascade copied to clipboard

CLViewSizeWider help

Open justinamberson opened this issue 14 years ago • 4 comments

In a subclass of CLViewController, I've imitated the CLWebViewController -init methods and inserted

    _viewSize = CLViewSizeWider;

into the if (self) code block. However, when pushing this view onto the stack, it's still half sized. What is it that I'm doing wrong? This view is also loaded from a nib, fwiw, so is there a special consideration for this case? I've also tried putting the _viewSize variable in -viewDidLoad to no avail.

justinamberson avatar Dec 03 '11 01:12 justinamberson

It looks like it has something to do with loading from a nib. I've just created a generic CLViewController class and used the initWithSize:CLViewSizeWider method, and it works fine. Loading a nib creates the smaller size view, and I'm not sure why.

justinamberson avatar Dec 03 '11 17:12 justinamberson

I had the same issue. If you dig in you'll find that basically when you load from a nib the size is ignored.

jeffmcfadden avatar Dec 09 '11 03:12 jeffmcfadden

Thanks for taking a look. I tried overriding a bunch of the nib related methods and nothing ever worked. I finally gave up and just resorted to laying out my views in code, even though it's a little harder to get autorotation struts and stretches worked out. I can't figure out a fix

justinamberson avatar Dec 09 '11 03:12 justinamberson

I ended up doing the same thing and had all around better luck with the lib.

jeffmcfadden avatar Dec 09 '11 04:12 jeffmcfadden