nitz19arg
nitz19arg

Reputation: 427

How to access mac files(images) in iPad application running on iPad

Im pretty new to Xcode. I made a simple app which shows an image in UIImageView. I used following code:

- (IBAction)btnClicked:(id)sender {
[imgBox setImage:[UIImage imageNamed:@"DSC01522.jpg"]];
}

The images were copied in project by creating a new group "trial images" and adding images to it by right clicking on project navigator.

I am facing the following issue: When I run the app on simulator, I can see the Images. But I can't see them in iPad. Why is it so? And can anyone please explain me or provide a link where these concepts of file access are explained. Finally, I need to access iPad images through my app. How I manage that. Thank you.

Upvotes: 0

Views: 54

Answers (1)

sunkehappy
sunkehappy

Reputation: 9101

  1. Make sure your image name is exact "DSC01522.jpg". Device is case sensitive.
  2. Try UIImagePickerController to get access to iPad's image.

Upvotes: 1

Related Questions