Platformsios 5.0

A custom view for creating UITextFields divided in segments. Add the files inside the Classes folder to your project and you’re ready to go. Check out the sample project for more examples. The app in the screenshot below uses the SegmentedTextField.

Sample usage of the RPSegmentedTextField



Add the dependency to your Podfile:

platform :ios

pod 'RPSegmentedTextField'

Run pod install to install the dependencies.

Next, import the header file wherever you want to use the segmented text field control:

#import "RPSegmentedTextField.h"


// Initialization of the segmented control
RPSegmentedTextField *segmentedTextField = [[RPSegmentedTextField alloc] initWithFrame:CGRectMake(0, 0, 300, 40)];

// Add a segment for each section. Supply the number of allowed characters and dimensions for the segment.
[segmentedTextField addSegmentWithChars:4 andRect:CGRectMake(0, 0, 40, 40)];
[segmentedTextField addSegmentWithChars:1 andRect:CGRectMake(100, 0, 40, 40)];

Latest podspec

    "name": "RPSegmentedTextField",
    "version": "1.0.0",
    "summary": "RPSegmentedTextField creates an auto flowing UITextField with segments.",
    "description": "                   RPSegmentedTextField is a UITextField, but separated in one or more segments.n                   Segments can have one or more characters. If more characters are entered, then                   RPSegmentedTextField automatically jumps to the next field.n",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Rick Pastoor": "[email protected]"
    "platforms": {
        "ios": "5.0"
    "source": {
        "git": "",
        "tag": "1.0.0"
    "source_files": [
    "exclude_files": "Classes/Exclude",
    "requires_arc": false

Pin It on Pinterest

Share This