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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-18-2011, 10:53 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 35
Kenenth is on a distinguished road
Default Image appears in Simulator but not on Device?

In my app there are images that are created when someone touches a button, and these images are then moved up the screen. In the simulator, the generated Image appears and moves up the screen, But on the Device, when I hit the button, the Image does not appear.(I can still tell there is like a ghost still there because as it moves up the screen it collides with objects, so I think it is being generated but the Image file is not being specified or something like that.) Here is my code for generating the Image:

Code:
UIImageView *newImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Image3.png"]];
	newImage.frame = CGRectMake(0, 0, 10.0, 10.0);
	newImage.center = CGPointMake(239.0, 236.0);
	[ImageArray addObject:newImage];
        //above is just to store the image into an NSMutableArray so I can Later retrieve it and move it.
Could someone please tell me why this is? Is it because the device is more picky or something? This is the final problem on my app that I have to solve so any help is greatly appreciated!
Kenenth is offline   Reply With Quote
Old 04-18-2011, 11:33 PM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 551
aldcorn@live.com is on a distinguished road
Default Did you include the file when you imported?

Try a new image, you may not heve added the image to the project properly, not sure...
Quote:
Originally Posted by Kenenth View Post
In my app there are images that are created when someone touches a button, and these images are then moved up the screen. In the simulator, the generated Image appears and moves up the screen, But on the Device, when I hit the button, the Image does not appear.(I can still tell there is like a ghost still there because as it moves up the screen it collides with objects, so I think it is being generated but the Image file is not being specified or something like that.) Here is my code for generating the Image:

Code:
UIImageView *newImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Image3.png"]];
	newImage.frame = CGRectMake(0, 0, 10.0, 10.0);
	newImage.center = CGPointMake(239.0, 236.0);
	[ImageArray addObject:newImage];
        //above is just to store the image into an NSMutableArray so I can Later retrieve it and move it.
Could someone please tell me why this is? Is it because the device is more picky or something? This is the final problem on my app that I have to solve so any help is greatly appreciated!
aldcorn@live.com is offline   Reply With Quote
Old 04-18-2011, 11:53 PM   #3 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Are you sure the case of the filename is correct? The name "Image3.png" is different than "image3.png" on the device, although the simulator will treat them the same.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 04-19-2011, 12:35 AM   #4 (permalink)
Registered Member
 
ngaikwad's Avatar
 
Join Date: Feb 2011
Location: Mobile World
Posts: 450
ngaikwad is on a distinguished road
Default

Quote:
Originally Posted by smasher View Post
Are you sure the case of the filename is correct? The name "Image3.png" is different than "image3.png" on the device, although the simulator will treat them the same.
ya first check this
ngaikwad is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, objective c, uiimageview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 351
14 members and 337 guests
dansparrow, dre, ilmman, LezB44, lorrettaui53, Nobbsy, Objective Zero, oztemel, pbart, samdanielblr, shagor012, sledzeppelin, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:47 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0