- (void)viewDidLoad
{
[super ViewDidLoad];
[brandTextField addTarget:self action:@selector(showImageFromFilter) forControlEvents:UIControlEventAllEvents];
}
- (void)showImageFromFilter
{
if (brandTextField.text == @"Awake")
{
NSString * imageString = @"awake_top_purple.png";
UIImage * womenTopImage = [[UIImage alloc] initWithContentsOfFile:imageString];
womenTopImageView.image = [[UIImageView alloc] initWithImage:womenTopImage];
womenTopImageView.contentMode = UIViewContentModeScaleAspectFit;
}
}
Here is the general idea of what I am doing.
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.
Thanks