Text input

Text inputs are used to capture textual information as well as numbers and passwords.

Backpack/TextField

Cocoapods class reference view on Github

Default

Day Night

Usage

BPKTextField contains the Backpack TextField component which is a subclass of UITextField with Skyscanner styles. It accepts a Backpack font style to set the desired size.

Objective-C


                                                
                                                #import <Backpack/TextField.h>
                                                
                                                BPKTextField *textField = [[BPKTextField alloc] initWithFontStyle:BPKFontStyleTextBase];
                                                // Position textView with autolayout or other method

Swift


                                                
                                                import Backpack
                                                
                                                let textField = BPKTextField(fontStyle: .textBase)
                                                // Position TextField with autolayout or other method

Dynamic Text

BPKTextField doesn't currently support Dynamic Text, but this is planned for a later release.