neoneye / SwiftyFORM

iOS framework for creating forms
MIT License
1.08k stars 87 forks source link

Custom fonts #19

Open tawrahim opened 8 years ago

tawrahim commented 8 years ago

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

neoneye commented 8 years ago

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?

tawrahim commented 8 years ago

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.

neoneye commented 8 years ago

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.

tawrahim commented 8 years ago

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

neoneye commented 8 years ago

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

tawrahim commented 8 years ago

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:

neoneye commented 8 years ago

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.

tawrahim commented 8 years ago

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.

neoneye commented 8 years ago

Your project looks cool. Is it pure swift?

tawrahim commented 8 years ago

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

neoneye commented 8 years ago

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

tawrahim commented 8 years ago

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: