In some applications like Mail, when you have a UITextField, there is a little + button to the right. When you tap it, a modal view controller comes up which you can select a phone number, address, etc from, and it will appear in the text field. I was wondering how to implement this in my own app. Thanks,
Isaac
You can do this by
txtFldObj.rightView = [UIButton buttonWithType:UIButtonTypeContactAdd];
txtFldObj.rightViewMode=UITextFieldViewModeAlways;
you can also refer to this trick also
If you want the plus button inside the text field, take a look at the rightView
property of the UITextField class, which lets you put any UIView in the right-most portion of the text field. You can put a UIButton there, as created with
[UIButton buttonWithType:UIButtonTypeContactAdd];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With