I need to implement the concept of dropdown
in Xcode.
For
Swift 3.0
txtField.rightViewMode = .always
txtField.rightView = UIImageView(image: UIImage(named: "selectdrop"))
UITextField has the following property:
@property(nonatomic, retain) UIImage *background
example:
UITextField *myTextField = [[UITextField alloc] init];
myTextField.background = [UIImage imageNamed:@"myImage.png"];
UITextField has a rightView
property, if you have image like this- then You can easly set ImageView object to rightView:
UITextField *myTextField = [[UITextField alloc] init];
myTextField.rightViewMode = UITextFieldViewModeAlways;
myTextField.rightView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"downArrow.png"]];