Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-08-2010, 05:23 AM   #1 (permalink)
hermonir
Registered Member
 
Join Date: Mar 2010
Posts: 17
hermonir is on a distinguished road
Unhappy UIImageView shows in simulator, does not show on device

Hello,

I have a UIScrollView that has three view controllers added to it, as such:

Code:
	[scrollView addSubview:islandViewController.view];
On one of them, I'm adding three images in viewDidLoad:

Code:
- (void)viewDidLoad {
    [super viewDidLoad];
	
	CGRect myImageRect = CGRectMake(0.0f,0.0f, 320.0f, 480.0f);
	UIImageView *sky = [[UIImageView alloc] initWithFrame:myImageRect];
	[sky setImage:[UIImage imageNamed:@"sky.png"]];
	sky.opaque = YES; // explicitly opaque for performance
	[self.view addSubview:sky];
	[sky release];
	
	CGRect myImageRect3 = CGRectMake(0.0f,432.0f, 320.0f, 48.0f);
	UIImageView *sea = [[UIImageView alloc] initWithFrame:myImageRect3];
	[sea setImage:[UIImage imageNamed:@"sea.png"]];
	sea.opaque = NO; 
	[self.view addSubview:sea];
	[sea release];
	
	CGRect myImageRect2 = CGRectMake(40.0f,365.0f, 241.0f, 101.0f);
	UIImageView *island = [[UIImageView alloc] initWithFrame:myImageRect2];
	[island setImage:[UIImage imageNamed:@"island.png"]];
	island.opaque = NO; 
	[self.view addSubview:island];
	[island release];

}
When I'm running it on the simulator all images are shown fine. When building and running on the device, only the "sea" image is shown.

I've tried cleaning and re-building, changing the order of the images, looking for lowercase/uppercase issues... All seems fine.
What could be the problem, and more importantly, how could this be fixed?

Thanx in advance,
Nir.
hermonir is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,536
Threads: 94,052
Posts: 402,640
Top Poster: BrianSlick (7,979)
Welcome to our newest member, bppnormal11
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:03 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.