Eureka: Formatting Placeholder + Value on UITextField

Created on 2 Nov 2017  路  2Comments  路  Source: xmartlabs/Eureka

I'm trying to change the font in the UITextField using this property

cell.textField.font

The only thing is being changed is the UILabel using the below properties, but not the placeholder nor the value of the UITextfield, your help is highly appreciated, below is how I'm presenting the my forms.

let myCustomFont = UIFont(name: "Helvetica", size: 12)

<<< EmailRow(){
    $0.title = "Email"
    $0.placeholder = "Enter Email Address"
    }.cellSetup { cell, row in
        cell.separatorInset.left = 0
        cell.textLabel?.font = self.myCustomFont
        cell.detailTextLabel?.font = self.myCustomFont
        cell.textField.font = self.myCustomFont
    // To update the textField Font, thanks to @ajitam
    }.cellUpdate { cell, row in
        cell.textField.font = self.myCustomFont
    }

Most helpful comment

try

.cellUpdate { cell, row in
  cell.textField.font = myCustomFont
}

All 2 comments

try

.cellUpdate { cell, row in
  cell.textField.font = myCustomFont
}

@ajitam Thank you, it worked.

Was this page helpful?
0 / 5 - 0 ratings