I have 3 TextFields, each connected to a UIPicker. I have three sets of arrays with values. When I have specific values set I'd like for an image to display below the UITextFields.
This is what I am trying but doesn't seem to be working. Am I on the right track or can someone explain how I can get this to work.
Aside from the == problem when comparing objects, you are also leaking the image 'womenTopImage', and you're leaking the imageview you create on the next line. But more importantly, you are trying to assign an imageview object, to an image property of another imageview. Compiler should have at least given you a warning there, and you'd get a crash when that code is executed.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView scale]: unrecognized selector sent to instance 0x4b393c0'
I've been getting this warning a lot but can't find a solution for it.
For future reference, when you get a crash and ask for assistance, it helps others a lot that want to help you if you post the details of the crash up front.
You need to read the Memory Management Programming Guide: Loading In short everything you copy, alloc, retain or new, you must release. But do read the guide, and as many times as you need until you fully understand it. Concepts explained there are absolutely a must-know.
In your code you were releasing womenTopImageView, but that's even worse since you weren't setting it, but it's image property. UIImage is not the same as UIImageView. Instead of assigning an imageview to the image property, you need to assign a UIImage to it.
I'm getting closer! The image displays now but it's showing up in the top left corner of the view. It's not placing the image in the UIViewController I have in the view. Just have to figure out how to position the image and it's good to go!