Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gmertk/ParkedTextField
A text field with a constant text/placeholder
https://github.com/gmertk/ParkedTextField
Last synced: 3 months ago
JSON representation
A text field with a constant text/placeholder
- Host: GitHub
- URL: https://github.com/gmertk/ParkedTextField
- Owner: gmertk
- License: mit
- Created: 2015-07-14T10:48:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-01-15T05:32:49.000Z (about 4 years ago)
- Last Synced: 2024-10-31T15:52:54.050Z (4 months ago)
- Language: Swift
- Size: 444 KB
- Stars: 862
- Watchers: 18
- Forks: 50
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ParkedTextField
[](http://cocoapods.org/pods/ParkedTextField)
[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/ParkedTextField)
[](http://cocoapods.org/pods/ParkedTextField)A text field subclass with a constant text in the end.
Main functionality works. It is still under development.
## Screenshot

## Usage
ParkedTextField is available through [CocoaPods](http://cocoapods.org), [Carthage](https://github.com/carthage/carthage), and [Swift Package Manager](https://swift.org/package-manager/). To install
it, simply add the following lines to your Podfile:```ruby
use_frameworks!
pod "ParkedTextField"
```Or add the following lines to your Cartfile:
```bash
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
```swift
/// 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](https://github.com/chrisballinger) - Maintainer
* [Günay Mert Karadoğan](https://github.com/gmertk) - Creator## License
ParkedTextField is available under the MIT license. See the LICENSE file for more info.