Note that there are some explanatory texts on larger screens.

plurals
  1. POLink multiple xib to one controller
    primarykey
    data
    text
    <p>Ive been searching for the answer to this, but nothing yet.</p> <p>I am trying to work around an issue were I have a view that resizes automatically. If 3GS, etc... it uses picture.png, if iphone 4 &amp; 5 it uses picture@2x.png.</p> <p>However when the resize happens, the background on iphone 4 stretches below the bottom border, so part of the background is covered. </p> <p>on the iphone 5 it fits perfectly, but the buttons dont adjust, they stay in place like if the screen was from a 3G (same thing if the iphone 4 is the simulator).</p> <p>If you have a solution for the above issue, I am all ears, I am very new to xcode, and I'm just trying to learn.</p> <p>As a work around I was thinking about checking for screensize, and then loading a xib built for that screen, however my app crashes with the following code:</p> <pre><code>- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; CGRect screenBound = [[UIScreen mainScreen] bounds]; CGSize screenSize = screenBound.size; CGFloat screenHeight = screenSize.height; if (screenHeight == 568){ nibNameOrNil = (NSString*)@"main5"; self = [self initWithNibName:nibNameOrNil bundle:nil]; if (self) { // Custom initialization } }else{ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } } return self; </code></pre> <p>Thank you in advanced</p> <p>debug</p> <p>self Mainscreencantroller * 0x00000000 nibNameOrNil NSString * 0x02a01196 NSObject NSObject<br> isa Class 0x656a626f [0] Class<br> nibBundleOrNil __NSArrayM * 0x0a55d3e0</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload