iDhaval / Dttextfield
Licence: mit
DTTextField is a custom textfield with floating placeholder and error label
Stars: ✭ 213
Programming Languages
swift
15916 projects
Labels
Projects that are alternatives of or similar to Dttextfield
Uitextfield Navigation
🏄♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+104.69%)
Mutual labels: xcode, uitextfield
Injectioniii
Re-write of Injection for Xcode in (mostly) Swift
Stars: ✭ 2,680 (+1158.22%)
Mutual labels: xcode
Iosdevicesupport
存放iOS镜像文件、iOSDeviceSupport、真机调试包、DeviceSupport、iOS-DeviceSupport,供大家参考,目前收录iOS8.0~iOS14.5,持续更新中
Stars: ✭ 197 (-7.51%)
Mutual labels: xcode
Downpicker
A lightweight DropDownList / ComboBox for iOS, written in Objective-C
Stars: ✭ 201 (-5.63%)
Mutual labels: uitextfield
Xcodeequatablegenerator
Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.
Stars: ✭ 188 (-11.74%)
Mutual labels: xcode
Periphery
A tool to identify unused code in Swift projects.
Stars: ✭ 3,017 (+1316.43%)
Mutual labels: xcode
Pdfxkit
A drop-in replacement for Apple PDFKit powered by our PSPDFKit framework under the hood.
Stars: ✭ 195 (-8.45%)
Mutual labels: xcode
Xchammer
XCHammer generates Xcode projects from a Bazel Workspace.
Stars: ✭ 195 (-8.45%)
Mutual labels: xcode
Keyboardavoidanceswiftui
How to move SwiftUI view up when keyboard appears https://www.vadimbulavin.com/how-to-move-swiftui-view-when-keyboard-covers-text-field/
Stars: ✭ 198 (-7.04%)
Mutual labels: xcode
Placeholders
🅿️ Define multiple placeholders for UITextField and animate their change
Stars: ✭ 190 (-10.8%)
Mutual labels: uitextfield
Xcodesourceeditorextension Alignment
This Xcode source editor extension align your assignment statement.
Stars: ✭ 211 (-0.94%)
Mutual labels: xcode
Traceutility
Extract data from .trace documents generated by Instruments
Stars: ✭ 188 (-11.74%)
Mutual labels: xcode
Pixelsdk
The modern photo and video editor for your iPhone / iPad app. A fully customizable image & video editing iOS Swift framework.
Stars: ✭ 192 (-9.86%)
Mutual labels: xcode
Nocturnal
A Dimness and Night Shift menu bar app for macOS 🌙
Stars: ✭ 199 (-6.57%)
Mutual labels: xcode
Fastlane Plugin Test center
🎯 The best fastlane plugin to understand and tame misbehaving iOS tests 🎉
Stars: ✭ 214 (+0.47%)
Mutual labels: xcode
DTTextField
Introduction
DTTextField is a UITextField library with floating placeholder and error label.
Floating placeholder inspired from JVFloatLabeledTextField 👍.
Example
Clone the repo and run the example project from the Example directory.
Requirements
- Xcode 11.0+
- Swift 5.0+
Installation
DTTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DTTextField'
Usage
- Open a storyboard or Xib file.
- Drag and drop a
UITextField
to a ViewController. - In Identity Inspector, replace the class from
UITextField
toDTTextField
and the module toDTTextField
.
Properties
Property name | Type | Remark |
---|---|---|
errorMessage | String | Add your error message to this property |
errorFont | UIFont | Change font of error text |
paddingYErrorLabel | CGFloat | Error text top padding |
floatPlaceholderColor | UIColor | To change float placeholder color |
floatPlaceholderActiveColor | UIColor | To change float placeholder color while TextField is active(First responder) |
floatPlaceholderFont | UIFont | Change font of float placeholder |
paddingYFloatLabel | CGFloat | float placeholder top padding |
placeholderColor | UIColor | change placeholder color |
animateFloatPlaceholder | Bool | animate float placeholder label |
hideErrorWhenEditing | Bool | hide error label when typing |
floatingDisplayStatus | enum | maintain display status always, never, defaults |
Important Properties
Property name | Type | Remark |
---|---|---|
dtLayer | CALayer | If you want to formate DTTextField than use dtLayer property instead of layer (e.g. background color) |
borderColor | UIColor | Change border color of DTTextField |
canShowBorder | Bool | Toggle border of DTTextField |
dtborderStyle | enum | none, rounded , sqare , top , bottom , left , right |
Methods
Method Name | Remark |
---|---|
showError | to show error message |
hideError | to hide error message |
Note
Don't give height constraint to DTTextField otherwise it won't work properly.
TODO
- Add inbuilt validation
Author
Dhaval Thanki 😎
License
DTTextField
is available under the MIT license. See the LICENSE file for more info.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].