Comments (3)
can you attach a sample project showcasing the problem? the pull request i submitted should've made it work.
from jvfloatlabeledtextfield.
https://github.com/joeljfischer/Test_Floating_Label
I really hope I'm not making an ass of myself by missing something stupid.
from jvfloatlabeledtextfield.
Okay, I found the issue. JVFloatLabeledTextField depends on code to call its setter for the placeholder(- (void)setPlaceholder:(NSString *)placeholder
), because that is where the text and size is set for the floating label. The nib does not call this setter when setting the placeholder so it is never called. As a quick/temporary fix, you can create an outlet in your view controller for the text field, and force a call to the setter in viewDidLoad
, like this "_textField.placeholder = _textField.placeholder;
" (assuming your outlet is called _textField). This will make it function normally.
As to why it is not being called, I'm not sure. I was under the impression that when setting attributes in interface builder, the system first tries to use a setter if there is one, and only is one is not found sets it directly. I would probably know more about this if I actually used storyboards and nibs, but I tend to code all my layouts.
from jvfloatlabeledtextfield.
Related Issues (20)
- Floating label showing Background color for JVFloatLabeledTextView
- Flag to make the calculation of the leftView and leftViewMode to be taken into account or not
- Error when I updated to Swift 4.2 HOT 1
- Warnings with Xcode 10.2
- FloatingLabelText disappears
- crashing on iOS 13 HOT 2
- Add support for SwiftPackageManager HOT 1
- Dark mode issue (dark background, dark text)
- CocoaPods and Carthage have different Swift imports HOT 1
- Floating label active text color.
- How to disable Copy, Paste in a JVFloatLabeledTextField
- Version 1.2.2 not available via SPM HOT 4
- Swift Package Manager doesn't build because it cannot find UIKit HOT 1
- Xcode 12 Support HOT 3
- Xcode 12 warnings with Swift Package Manager HOT 1
- JVFloatLabeledTextView unavailable via SPM & Xcode 12.5 HOT 3
- Feature Request: Add support for multi-line floating labels and Dynamic Type
- Push latest changes to CocoaPods
- fatal error: module 'JVFloatLabeledTextField' in AST file HOT 2
- Label with or without privacy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvfloatlabeledtextfield.