Welcome, Guest
Username Password: Remember me

Switch Cell Customization
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Switch Cell Customization

Switch Cell Customization 1 year, 4 months ago #1

Afternoon

Is it possible to change the Switch Cell from an On / Off to something like Celsius/Fahrenheit or C / F?

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Switch Cell Customization 1 year, 4 months ago #2

Hi Iain,

It is not possible to customize the UISwitch control using Apple's documented APIs. Some developers have created their own custom switch control, for example: www.catamount.com/blog/?p=1063

If you are interested in using any of these custom controls, you'll have to create your own custom cell class and subclass it from SCControlCell, then add the custom control to it (only applicable to STV 2.0 and later). You should then normally set a tag for the control and bind a property name to it, using the same technique used to create custom cells in the "Custom Cells App" sample application.

As a final note, you must make sure that the custom control you'll be using is not calling any private APIs (many of them do!), otherwise your app will be immediately rejected by Apple.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Switch Cell Customization 1 year, 4 months ago #3

Hi Tarek

Thanks for the link.

I also found this one - but this costs money.

www.cocoanetics.com/parts/dtcustomswitch/

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Switch Cell Customization 1 year, 4 months ago #4

Hi Tarek

Do you know if this will work in STV ?

www.cocoanetics.com/parts/dtcustomswitch/

I was talking with Oliver from CocoaNectics and he is giving a discount of 20% to the first 11 customers - he has invoiced 4 people so far, so would like to take him up on this if it will work.

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0

Re: Switch Cell Customization 1 year, 4 months ago #5

Would you please ask Oliver if his custom switch is a UISwitch subclass?

If it is, then STV will detect it and automatically save and load its value for you. If not, then you'll have to be doing the saving and loading manually.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Switch Cell Customization 1 year, 4 months ago #6

Hi Tarek

Oliver says

it's a UIControl subclass, but is can be used anywhere a UISwitch is used because it employs the same API.

What do you think ?

Iain
  • ihmunro
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Karma: 0
  • Page:
  • 1
  • 2
Time to create page: 2.94 seconds