xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.79k stars 1.33k forks source link

Appearance proxies #38

Open mkoppanen opened 9 years ago

mkoppanen commented 9 years ago

Hello,

I've been using XLForm for quite a while and it does save a lot of time while making forms. While you are developing Eureka I would like to suggest including Appearance proxies and global appearance methods in to it.

While it is possible to change to for example font of most elements in XLForm, it's a bit tedious to do element by element. Rarely do I have cases where I want to have multiple different fonts and colours inside one app (rather have unified look and feel).

davidrothera commented 9 years ago

:+1: Would love this feature as well

mtnbarreto commented 9 years ago

If I understood what you want I think Eureka already provides a solution.

Take a look at: http://blog.xmartlabs.com/2015/09/29/Introducing-Eureka-iOS-form-library-written-in-pure-Swift/#fully-customizable which explains how to make change to all row of a particular type.

What I like the most about this class functions is that any custom row will have this capability since it is injected to the row through protocol extensions. So it's a framework capability and doesn't depends on how the custom row/cell is implemented.

We didn't have time to document it yet, I really appreciate if you have time to add these methods documentation on Eureka readme. 🙌

Cheers

samritchie commented 9 years ago

This is pretty clunky - as far as I can tell, if I want to change the label font on every row, I need to set a defaultCellSetup property on every single row type (including all the concrete generic rows) in the whole form. Sometimes this doesn’t work and I have to use defaultCellUpdate, depending on the internal implementation of the row.

I really just want to be able to set UILabel.appearance.font = ... once in application(_:didFinishLaunchingWithOptions:) and not have this overridden by the library.

Failing that, if you need to use preferredFontForTextStyle(), maybe we could have a global font name property so we can override the system font?

hdoria commented 8 years ago

+1

markkohdev commented 7 years ago

+1

mats-claassen commented 7 years ago

We plan to look at this enhancement in the future. I think the best solution is to have a singleton object that holds the fonts to be used. I believe most of the time the title and the value of a row will have a different font size so we should have two fonts there.

We could also store values for the color of these labels (normal and disabled state). I think the highlighted state color of a label should stay the same as the tintColor of its FormViewController.

Apart from fonts and these text colors, is there anything else that you would consider useful?

allenhuang commented 7 years ago

I suggest custom color(text, background) for following states:

Kaakati commented 7 years ago

+1

romeugodoi commented 6 years ago

+1

renetik commented 6 years ago

+1 wau I was looking for this also coming from QuickDialog where this was quite good done...

csr commented 6 years ago

+1

v-sharaev commented 6 years ago

+1

wimbledon commented 6 years ago

+1

philschmitt commented 5 years ago

+1

bijugv commented 5 years ago

We plan to look at this enhancement in the future. I think the best solution is to have a singleton object that holds the fonts to be used. I believe most of the time the title and the value of a row will have a different font size so we should have two fonts there.

We could also store values for the color of these labels (normal and disabled state). I think the highlighted state color of a label should stay the same as the tintColor of its FormViewController.

Apart from fonts and these text colors, is there anything else that you would consider useful?

the hardcoded color values for normal and disabled states is preventing loading color themes for the app. i hope this can be fixed or is there an alternative.