nicklockwood / FXForms

[DEPRECATED]
Other
2.93k stars 339 forks source link

is it possible to style at IB without subclassing? #166

Open plandem opened 10 years ago

plandem commented 10 years ago

I want: 1) use custom style of cell 2) set textfield manually 3) style detail/text labels at IB 4) use custom height of cell, that i set at IB.

If it would be possible to use IBOutlets, it would be nice! Right now i had to rewrite almost EACH class to use custom styles. But all i want - just restyle default without any code.

nicklockwood commented 10 years ago

It's possible to do all of your cell styling in IB, although currently it's necessary to create a custom cell class for each distinct cell.xib (although the class need not do anything except extend FXFormBaseCell).

Can you paste in some examples of the classes you've had to write? It may be that in some cases there was a better way, but in the cases where there wasn't, I'll see if I can improve the API.

plandem commented 10 years ago

Ok, in my case i need: set font, position title( textLabel), change height of cell. At other screen i need border for textfield, differ font, colors and padding.

Sent from iPhone

16 àâã. 2014 ã., â 1:17, Nick Lockwood notifications@github.com íàïèñàë(à):

It's possible to do all of your cell styling in IB, although currently it's necessary to create a custom cell class for each distinct cell.xib (although the class need not do anything except extend FXFormBaseCell).

Can you paste in some examples of the classes you've had to write? It may be that in some cases there was a better way, but in the cases where there wasn't, I'll see if I can improve the API.

— Reply to this email directly or view it on GitHub.

plandem commented 10 years ago

another reason - in some cases i would like to use extended subclassing of existing UI controls, E.g. - advanced UITextEdit, but without subclassing(actually rewrite from scratch to repeat same functionalities from FXForm side, but to substitute only one line of code: self.textField= [UITextField alloc] init]) FXFormBaseCell that's not possible. I'm sure that's not very flexible pattern - rewrite FXForm to get same results, but with advanced UIControls.