material-components-ios
material-components-ios copied to clipboard
isFloatingEnabled in MDCTextInputControllerOutlined
As per my requirement, I want to hide the floating label in MDCTextInputControllerOutlined. If I check the file, isFloatingEnabled flag is always YES. I want to set this as NO. Please help to set this as a customisation value like floatingEnabled so that we can just pass YES/NO based on our condition
-
(BOOL)isFloatingEnabled { return YES; ------ Here instead of setting YES, please have the floatingEnabled varaible }
-
(void)setFloatingEnabled:(__unused BOOL)floatingEnabled { // Unused. Floating is always enabled. }
Hi @Kalidasan1, I encourage you to switch to our newer text field offerings, specifically the MDCOutlinedTextField. To use it add TextControls+OutlinedTextFields and/or TextControls+OutlinedTextFieldsTheming to your Podfile, and then #import "MaterialTextControls+OutlinedTextFields.h". See these docs for more info. To disable floating on the new text field use textFied.labelBehavior = .disappears. Hope this helps!