SwiftyFORM icon indicating copy to clipboard operation
SwiftyFORM copied to clipboard

Custom fonts

Open tawrahim opened this issue 8 years ago • 12 comments

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

tawrahim avatar Jun 05 '16 19:06 tawrahim

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?

neoneye avatar Jun 05 '16 20:06 neoneye

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.

tawrahim avatar Jun 05 '16 20:06 tawrahim

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.

neoneye avatar Jun 05 '16 20:06 neoneye

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

tawrahim avatar Jun 05 '16 21:06 tawrahim

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

neoneye avatar Jun 05 '16 21:06 neoneye

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 :smile:

tawrahim avatar Jun 06 '16 16:06 tawrahim

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.

neoneye avatar Jun 06 '16 16:06 neoneye

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.

tawrahim avatar Jun 06 '16 17:06 tawrahim

Your project looks cool. Is it pure swift?

neoneye avatar Jun 06 '16 17:06 neoneye

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

tawrahim avatar Jun 06 '16 17:06 tawrahim

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

neoneye avatar Jun 06 '16 19:06 neoneye

It is a little bit different but we both embody the spirit of the sharing economy :small_blue_diamond: 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 :smile:

tawrahim avatar Jun 08 '16 17:06 tawrahim