UA-17470720-3

Jump to content


Photo
- - - - -

Custom View for selecting options


  • Please log in to reply
26 replies to this topic

#21 poffel

poffel

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 116 posts
Reputation: 19
Good

Posted 14 February 2012 - 07:00 PM

yeah, maybe you can tell me why my (void)tableViewModel:(SCTableViewModel *)tableViewModel valueChangedForRowAtIndexPath:(NSIndexPath *)indexPath don't get called... :-(

*edit*
bah! i am so blind... ;-)

#22 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 14 February 2012 - 07:15 PM

This might be because the cell is in a detail model, and you don't have the model's delegate set. For more on this topic, please refer to the following post: http://www.sensiblec...cells.html#4869

Hope this helps.
  • Paolo Cecchetti likes this

#23 poffel

poffel

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 116 posts
Reputation: 19
Good

Posted 14 February 2012 - 07:19 PM

thx tarek, i found it already, was waiting for it to be called by the wrong action happening...
i guess it will only be called if the table is already loaded (and just hidden through a modal view or similar) ;-)

#24 Nicholas Watson

Nicholas Watson

    Jr. Member

  • STV 3.0 Pro
  • PipPip
  • 28 posts
Reputation: 4
Good

Posted 15 February 2012 - 05:23 PM

I'm still completely baffled, so if anyone does come up with a solution please let me know :) I still can't get the code I posted recently to behave how I want it to.

Thanks
  • Karl1348790290 likes this

#25 Nicholas Watson

Nicholas Watson

    Jr. Member

  • STV 3.0 Pro
  • PipPip
  • 28 posts
Reputation: 4
Good

Posted 18 February 2012 - 07:58 AM

I've missed my deadline now, I'll just wait for the next version of STV. I felt I was so close yet I just can't get any further :(

Thank you all for your help.

#26 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 19 February 2012 - 11:01 PM

@optixsolutions: I checked your post. STV's default search algorithm returns the cell if its text contains any of the characters being typed. STV allows you to provide your own search algorithm and completely replace its results if you wish. To do that, simply implement the SCTableViewModelDataSource method called 'tableViewModel:customSearchResultForSearchText:autoSearchResults:' and return whatever search results you want.

Hope this helps.

#27 Nicholas Watson

Nicholas Watson

    Jr. Member

  • STV 3.0 Pro
  • PipPip
  • 28 posts
Reputation: 4
Good

Posted 20 February 2012 - 06:27 PM

Thanks tarekskr, I really do appreciate it. That is what I have been trying to do (see the code here: http://www.sensiblec...6&start=12#5619) - it's near the bottom, yet it doesn't even call that function (The console doesn't log anything)

Thanks again, the support here is great :)
[b]
*edit* changed "tableModel" to "tableViewModel" and now it works - such a silly mistake, but I guess that happens when you've spent several hours staring at a screen :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users