- July 30, 2025
- Mins Read
TextField with DropDown support using UIPickerView
Install using cocoapods. Add in your Podfile
:
pod ‘IQDropDownTextField’
Or below for Swift version
pod ‘IQDropDownTextFieldSwift’
In IB (story boards or xibs) you can add UITextField
‘s and set the class as IQDropDownTextField
Nothing more easy than it!
@implementation ViewController
– (void)viewDidLoad
{
[super viewDidLoad];
textFieldTextPicker.isOptionalDropDown = NO;
[textFieldTextPicker setItemList:[NSArray arrayWithObjects:@”London”,@”Johannesburg”,@”Moscow”,@”Mumbai”,@”Tokyo”,@”Sydney”, nil]];
}
@end
It’s very simple to setup your IQDropDownTextField
. The sample below shows you how to:
import IQDropDownTextFieldSwift
class MyController : UIViewController {
@IBOutlet var occupationTextField: IQDropDownTextField!
override func viewDidLoad() {
occupationTextField.isOptionalDropDown = false
occupationTextField.itemList = [“programmer”, “teacher”, “engineer”]
}
}
And that’s all you need! =)
PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...
Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...
1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...