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

flashyx

macrumors newbie
Original poster
Mar 1, 2013
3
2
hi guys,

super new here,

been googling for hours, cant work it out and need a hand.

i have set up a UIImageView and one Round Rect Button onto my storyboard.

i have a png image i have draged into the root of my project.

im trying to get it that when you press a button image1.png will load into the UIImageView.

how the heck do i do it?

a step by step would be fantastic.

thanks guys.
 
link both to your header file, button as ibaction, uiimageview as outlet

switch to your implementation file, find the method for your button and write the following:

Code:
self.youruiimageview.image = [UIImage imageNamed:@"image1.png"];
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.