TextView implementation using material design iOS swift || MDCOutlinedTextArea implementation

  Solution:

Import the below libraries in your class

import MaterialComponents.MaterialTextControls_FilledTextAreas

import MaterialComponents.MaterialTextControls_OutlinedTextAreas

import MaterialComponents.MaterialTextControls_OutlinedTextAreasTheming


Inside the class you can create the textView as like below


        let textViewCustom =  MDCOutlinedTextArea()


You can set the placeholder as like below


textViewCustom.label.text = "placeholder"


You can set the outline border color as like below


 textViewCustom.setOutlineColor(UIColor.red, for: .normal)

You can set the placeholder color as like below


 textViewCustom.setNormalLabel(.lightGray, for: .normal)


You can minimise the height of the field using below option


        textViewCustom.verticalDensity = 40

        textViewCustom.maximumNumberOfVisibleRows = 2


You can increase the height value not the fontsize and other as using below


        textViewCustom.preferredContainerHeight = 100

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

store cgpoint in userdefaults iOS swift