GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gmertk/ParkedTextField: A text field with a constant text/placeholder

BranchesTags
Open more actions menu

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
.swiftpm/xcode/package.xcworkspace
.swiftpm/xcode/package.xcworkspace
 
 
ParkedTextField
ParkedTextField
 
 
Screenshots
Screenshots
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Package.swift
Package.swift
 
 
ParkedTextField.podspec
ParkedTextField.podspec
 
 
README.md
README.md
 
 

Repository files navigation

ParkedTextField

Version Carthage compatible License Platform

A text field subclass with a constant text in the end.

Main functionality works. It is still under development.

Screenshot

ParkedTextField.gif

Usage

ParkedTextField is available through CocoaPods, Carthage, and Swift Package Manager. To install it, simply add the following lines to your Podfile:

use_frameworks!
pod "ParkedTextField"

Or add the following lines to your Cartfile:

github "gmertk/ParkedTextField" "master"

Or for Swift Package Manager:

  1. In Xcode, open your project and navigate to File → Swift Packages → Add Package Dependency...
  2. Paste the repository URL (https://github.com/gmertk/ParkedTextField) and click Next.
  3. For Rules, select Branch (with branch set to master).
  4. Click Finish.

Setup

If you want to use storyboards, just drop a TextField into your storyboard and set its class to ParkedTextField. Then customize through the attributes inspector or code. Otherwise, you can write the code to initialize with frame and set the properties.

Properties

/// Constant text. Defaults to "".
var parkedText: String = ".slack.com" 

/// Placeholder next to parkedText. Defaults to "".
var placeholderText: String = "yourteam" 

/// Variable part of the text. Defaults to "".
var typedText: String

/// Font of parkedText. Defaults to bold version of the text field's font if it exists. If not, defaults to the font of the text field.
var parkedTextFont: UIFont!

/// Color of parkedText. Defaults the font's color.
var parkedTextColor: UIColor! 

Development

  • Instead of subclassing UITextField, investigate making a UITextField extension.
  • Test setting placeholder and text. In some cases it breaks the parkedText.

Authors

  • Chris Ballinger - Maintainer
  • Günay Mert Karadoğan - Creator

License

ParkedTextField is available under the MIT license. See the LICENSE file for more info.

About

A text field with a constant text/placeholder

Resources

Readme
MIT license
Activity

Stars

857 stars

Watchers

17 watching

Forks

50 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.