neoneye/SwiftyFORM

Custom fonts

tawrahim opened this issue ยท 12 comments

Would it be possible to extend this library to allow developers to specify custom fonts in the tableView cell?

Theming is not something I have spent time on. I think it should be possible to style things with UIAppearance, but there are probably obstacles. I ought to make an example of how to do it.

What do you think?

Hmm so am not exactly sure with UIAppearance.

I quickly tried this
UITableViewCell.appearance().textLabel?.font = UIFont(name: "Exo2.0-Regular", size: 15.0) in the viewDidLoad method and it did not work. I was looking at the code and notice at round line 34 you set the font style. I think it would be great if we can make that settable.

Yes, the init code currently sets the fonts. It doesn't have to be like this, but I'm not sure what is best practice with theming. Maybe it's UIAppearance or a new swift approach. Maybe it would be better to extend the CellModel with theming properties.

I think extending the CellModel makes the most sense and looks very clean to me.

Awesome @tawrahim, I would love to see a proposal from you.

Haha great I would see if I can squeeze in sometime to work on it.
I also think if it is easier for you to just extend it, It would be awesome since you are most familiar with the code ๐Ÿ˜„

Your cocoapod contributions are much appreciated. Never give up.

When I'm not working, then I'm coding on various iOS projects. There is too little time in this world.

Ok let me see what I can do since I'm also heavily involved with this project to get v2.0 released. Lets see what happens.

Your project looks cool. Is it pure swift?

Yeah it is! And we are using your amazing library for some of our view
controllers.

There is a local phenomenon here in Denmark, it's gomore. I don't know if it's big outside europa. It seems related ๐Ÿ‘

It is a little bit different but we both embody the spirit of the sharing economy ๐Ÿ”น
In any case I would try and see if I can make some progress with this issue this weekend. However if you do get it to work on it first that would be even cooler ๐Ÿ˜„