Re: UIImageView without using the Interface Builder?
Re: UIImageView without using the Interface Builder?
- Subject: Re: UIImageView without using the Interface Builder?
- From: Søren Krogh Neigaard <email@hidden>
- Date: Sun, 30 Nov 2008 18:56:26 +0100
Thank you Andrew and Fritz
The reason I want to avoid interface builder is that I want to add
images dynamicly, so that image a + b + c is loaded and show at some
times, and c + d + e and so on at others. So instead of having created
all the images at compile time, i load them when I need them at run
time. Does that make sense?
Best regards
Søren
On 30/11/2008, at 18.09, Fritz Anderson wrote:
But he wants to set an outlet in File's Owner as well.
myController.imageView = myImgView;
Where myController is whatever "File's Owner" was, and imageView is
the retained property you've declared to refer to the view.
OP: Don't avoid Interface Builder. Take the trouble to understand
it, and switch to doing it manually ONLY when you can PROVE IB can't
do what you need. If you're just starting with Xcode (note
capitalization), you probably aren't in that very unusual position.
If you don't understand Interface Builder, you don't understand Cocoa.
This point has been elaborated at huge length, frequently, on cocoa-
dev, and debate should go there. Better, read the discussion in the
archives.
— F
On 30 Nov 2008, at 8:26 AM, Andrey Dubinin wrote:
Something like this? :
UIImage* myImage = [UIImage imageNamed:@"myImage.jpg"];
UIImageView* myImgView = [[UIImageView alloc] initWithImage:
myImage];
...
Im completely new to XCode, and I found a small tutorial where the
programmer added a UIImageView in Interface Builder, added a image
to this UIImageView and then linked the UIImageView to the code by
dragging it to "Files owner".
How do I do this in the code without using Interface Builder?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Med venlig hilsen/Best regards
Søren Neigaard <email@hidden>
If I'd known computer science was going to be like this, I'd never
have given up being a rock 'n' roll star.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden