I added images using uiimageview in storyboard and connected them to iboutlets and they are not showing up in the simulator. I don't think they are off screen since they are very close to other images and I have auto layout off as i saw in other threads that may be a problem. This is some code if it may help. None of the hearts will show up in simulator.
EDIT: I just moved one of the other images to the center of the screen and when I clean/build/run nothing changed in the simulator. So for some reason anything I change in storyboard is not being carried over into simulator. It all worked last night and I'm not sure what could have change to this afternoon.
#import <UIKit/UIKit.h>
float LeftMovement;
float RightMovement;
float UpMovement;
int life = 3;
@interface Game : UIViewController
{
IBOutlet UIButton *Start;
IBOutlet UIImageView *Runner;
IBOutlet UIImageView *Water;
IBOutlet UIImageView *Heart1;
IBOutlet UIImageView *Heart2;
IBOutlet UIImageView *Heart3;
IBOutlet UILabel *Lives;
NSTimer *Movement;
}
-(IBAction)StartGame:(id)sender;
-(void)Moving;
-(void)Walk;
@end
i came up late but the right answer is
Right click on the image in Xcode, go to File Inspector, i had to check the checkbox under "Target Membership"
I bet the use auto layout flag is checked for your storyboard by accident. Open your storyboard file, select the file inspector, and make absolutely sure that the "Use Autolayout" checkbox is NOT checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With