Quote:
Originally Posted by garyk1968
I have been scouring the net to try and implement a plus (+) button in a UITextField. I know I need to set the rightView to a view containing this button but all the examples I have seen create a custom UIImageView which then gets set. I could go this way but found this code;
[UIButton buttonWithType:UIButtonTypeContactAdd];
but can't see how you assign it as UITextField rightView expects a type of UIView. If I have to go the rightView = [[UImageView alloc] initWithImage... I will but thought this way would be more straightforward and I'm to keen to understand it more.
Can anyone give me some pointers?
Cheers
Gary
|
I'm stumped on the same issue tonight. I need to toggle between Refresh and Cancel buttons and don't know how to set a target and action on a UIView versus a system button. I also don't want to have to hack my own icon images to mimic the system ones.
Why can't we just make a system button and add it as the view?