Reputation: 943
A very short question. Created a UIImageView
in IB with is a IBOutlet
in its view controller. However, when it look for its its size with .frame.size
everything seems to be null. It would be nice to be able to set the dimensions in IB and have the code pick up and respond to it. Is there something I am doing wrong here?
Upvotes: 1
Views: 326
Reputation: 2375
Make sure you connect your UIImageView to it's IBOutlet in IB.
Also, the connections with the outlets aren't actually done until viewDidLoad, so you would still see nil if you tried to access the imageview before this method is called.
Upvotes: 0
Reputation: 16709
I'm almost certain that you haven't connected your IBOutlet with appropriate view in IB.
Upvotes: 1