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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-08-2009, 01:10 AM   #1 (permalink)
Savij
Registered Member
 
Join Date: Mar 2009
Posts: 17
Default A noob and his nib, hooking a UIImageView

hello,

I am learning iPhone dev and I love it so far. I am having an issue where I created a UITabBarController that loads 4 views. All of this was done in the nibs (except for actually creating the UITabBarController in the delegate class). Everything works perfectly. What I want to do is hook an UIImageView in the xib so I can change it in code from the viewcontroller. So I created an IBOutlet in my firstViewController and dragged a UIImageView onto my view. But anytime I hook the outlet up, the application just bombs. I even tried dragging a UIImageView into the firstView.xib and didnt put it on the view, that runs fine, but when I hook up the outlet it just bombs on me with an uncaught exception.

Maybe I am approaching this the wrong way. Ultimately I want a view with a few images that the user can swipe to view. Am I going about this the wrong way?

Thanks and sorry if this is really basic stuff... I am a c# developer but I'm tryin real hard to convert.

Here is my code:

@interface HomeViewController : UIViewController {
IBOutlet UIImageView *homeImageView;
}

@property(nonatomic,retain) UIImageView *homeImageView;
@end


@implementation HomeViewController
@synthesize homeImageView;
Then I just ctrl+drag from File Owner to the ImageView in IB and save. Then BOOM!

-Savij

Last edited by Savij; 03-08-2009 at 01:47 AM. Reason: added code
Savij is offline   Reply With Quote
 

» Advertisements
» Online Users: 708
24 members and 684 guests
annchavez78, at0m87, biskwit, chiataytuday, CityBrains, Domele, ilmman, iVenh, kaileymo123, katearmine, Macaret, manojb, mayaz7_ayaz, MozyMac, MSJJ, nidie, nik's, qkstrk, ratheesh, rocel1234, s kumar, sacha1996, saqibjaan
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,819
Threads: 89,206
Posts: 380,632
Top Poster: BrianSlick (7,129)
Welcome to our newest member, rocel1234
Powered by vBadvanced CMPS v3.1.0

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