Change text alignment for Eureka TextRow

I am looking for a way to change the alignment of text with textField. I tried it with

cell.textField.textAlignment = .Left 

but this does not change alignment. It will always be aligned to the right. I was wondering why this was the default, as Apple itself uses left aligned text inputs in most, if not all places.

+5
source share
1 answer

For Eureka, a little different. You must use the cell update callback. This has not been well documented regarding alignment changes. But he mentioned here to change the color or font that you have to use .cellUpdate. Therefore, I believe that this work will work for you

 let row = TextRow() { row.title = "Field:" }.cellUpdate { cell, row in cell.textField.textAlignment = .left } 
+7
source

All Articles