Welcome, Guest
Username Password: Remember me

SCDateCell & SCSelectionCell color & SCSelectionCell action
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SCDateCell & SCSelectionCell color & SCSelectionCell action

SCDateCell & SCSelectionCell color & SCSelectionCell action 1 year, 7 months ago #1

Hi,

I have three small questions.

1. How can I change the SCDateCell type to day-month-year format instead of day-hour format. The general english format (month/day/year) is also ok, but if I can make it day/month/year it'd be perfect

2. I couldn't change the color of the SCSelectionCell's detail text. What I mean is when you select the item from the list, the selected item is on the right side of the main table's cell. Can I change it to blue for instance?

3. This is a tricky one, and I don't know if there is an answer to it. I have selection cells and textfield cells in a tableview. When I tap the textfield cell, the keyboard comes up. Great In general behaviour, to close the keyboard when you are done, you need to tap somewhere else. But the problem is there are lots of selection cells and most likely the user will tap one unintentionally and it will take the user to the selection view again and again for each tap.

I thought I can define a BOOL and hold if the keyboard is shown any time. If I can override a method like,

- (BOOL) shouldTheSelectionViewBeVisible (a weird name for a method, I admit it )

I can then return FALSE if the keyboard is already shown. I hope I could make myself clear.

Thanks,
  • leweo
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: SCDateCell & SCSelectionCell color & SCSelectionCell action 1 year, 7 months ago #2

Hi Oguz:

1- SCDateCell has a property of type NSDateFormatter called dateFormatter that enables you to format any aspect of the displayed date. In addition, SCDateCell exposes its date picker in a property called "datePicker", with which you can customize every aspect of the cell's picker too.

2- You need to override the tableViewModel:didSelectRowAtIndexPath: method of the detailTableViewModel. For an example on how to implement delegate methods for detail views, please refer to this post: www.sensiblecocoa.com/forum/sensible-tab...stomization.html#583

3- Sensible TableView automatically dismisses the keyboard if you tap the "Done" key on the keyboard. Is this what you're looking for?
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: SCDateCell & SCSelectionCell color & SCSelectionCell action 1 year, 7 months ago #3

1. The first one works fine, thanks =)

2. I think there is a misunderstanding. I want to change the color of the text in the same view, not in the detail view. For example, we have a selectioncell and it leads us to choose between @"Item 1", @"Item 2", @"Item 3". When the user changes for instance @"Item 2". It becomes visible in the selection cell itself as,

"Your choice" "Item 2" >

Something like this. I want to change the color of the textlabel "Item 2". The default color is some kind of gray. If we have a control over this detailtext, I may change the font size as well.

3. Actually it wasn't what I meant but, it's not a big problem. If my company asks me to do it, then I'll come back and ask it again. Thanks..
  • leweo
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: SCDateCell & SCSelectionCell color & SCSelectionCell action 1 year, 7 months ago #4

Hi Oguz,

Regarding 2: Sorry if I misunderstood your question. For changing any of the label properties, please use SCSelectionCell's "label" property (inherited from SCLabelCell). Here is a code sample that changes the color:

 
...
mySelectionCell.label.textColor = [UIColor redColor];
...
 


Regarding 3: Sure, please feel free to do so
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.47 seconds