Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Kapthehat

macrumors member
Original poster
Jul 1, 2013
51
0
Hello,

The answer to this must be simple - but I cant see it !! I have a XIB with a button on it (there is also a single picker on it). However when I build and run my app, the button does not appear on the simulator (but the picker does).

Any thoughts ? Thanks

Regards

Kaps
 
do a product > clean in xcode and remove the app from your phone.

The xib is not in a subproject or in another project in the workspace?
 
Hello,

The answer to this must be simple - but I cant see it !! I have a XIB with a button on it (there is also a single picker on it). However when I build and run my app, the button does not appear on the simulator (but the picker does).

Any thoughts ? Thanks

Regards

Kaps

Here is a possibility:

Watch your "struts and springs" (resize masks) or your auto-layout rules, if you're using auto-layout.

If you have the button near the bottom of the screen, and you are laying out your form on the default iPhone 5 screen layout, it needs to be anchored to the bottom of the screen. If the button is anchored to the top of the screen instead, when the system resizes your view to iPhone 4 size, the button will be off-screen.
 
Thanks- I have done a product >clean and i still does not appear.

I am a newbie - still working on the simulator - how do I remove it from the simulator ? As I mentioned, there is a picker on the xib which does appear - but not the button - so I am not sure of the relevance of sub projects.

regards

Kaps
 
Duncan might be on to something. Stick this into the viewdidload of the viewcontroller where you recon you should have a button
Code:
	for (UIView *view in self.view.subviews) {
		NSLog(@"%@ %@", [view class], NSStringFromCGRect(view.frame));
	}
It should tell you where your button is, if there at all.
 
Thanks- I have done a product >clean and i still does not appear.

I am a newbie - still working on the simulator - how do I remove it from the simulator ? As I mentioned, there is a picker on the xib which does appear - but not the button - so I am not sure of the relevance of sub projects.

regards

Kaps

To remove an app from the simulator, go to the springboard and long press on the app icon just like you would on the device. Then click the X (iOS <7) or drag up (iOS 7) to delete the app.

Under Xcode 4.6.3 lately, I've had to both clean the project and delete it from the simulator before changes to certain files actually get installed in my app on the simulator. This seems like a step backwards, although I haven't figured out the sequence that causes it yet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.