Welcome, Guest
Username Password: Remember me

SCSelectionCell checkmark problem
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: SCSelectionCell checkmark problem

SCSelectionCell checkmark problem 1 year, 7 months ago #1

Hi,

I think there is a problem with selection cell. I have a selection cell set up like this:

 
SCSelectionCell *belgelerCell = [SCSelectionCell cellWithText:@"Cell title"
withBoundObject:myObject
withSelectedIndexesPropertyName:@"selectedItems"
withItems:[NSArray arrayWithObjects:@"Item 1",
@"Item 2", @"Item3", nil]
allowMultipleSelection:YES];
belgelerCell.textLabel.font = [UIFont boldSystemFontOfSize:16];
belgelerCell.displaySelection = NO;
belgelerCell.detailTableViewStyle = UITableViewStyleGrouped;
 


My selectedItems description:

@property (nonatomic, readonly) NSMutableSet *selectedItems;


The selection cell remembers which items are selected. I need change the accessory type of this cell, if all the items are selected. However, no matter what I try this type doesn't change, if I don't select the cell and go to the detail view and come back. I need to change it at start. The most basic one I've tried is:

[belgelerCell setAccessoryType:UITableViewCellAccessoryCheckmark];

This goes before the cell is added to the model. I can't imagine why this doesn't work. I believe this is a bug and I'd really appreciate if you can help me out real soon.

Thanks,

Oguz Kocer
  • leweo
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: SCSelectionCell checkmark problem 1 year, 7 months ago #2

Ok one more similar problem. This doesn't seem to work either:

 
SCSelectionCell *aracSecCell = [SCSelectionCell cellWithText:@"Select Car"
withBoundObject:myObject
withSelectedIndexPropertyName:@"selectedCar"
withItems:arr];
aracSecCell.autoDismissDetailView = YES;
aracSecCell.textLabel.font = [UIFont boldSystemFontOfSize:16];
[section2 addCell:aracSecCell];
 


The definition:
@property (nonatomic, retain) NSNumber *selectedCar;


This doesn't even remember the selection. I have set it up as in the documentation. Either I didn't really understand how the selection cells work, or there is something wrong either in the documentation or in the source code.

Please help me!

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

Re: SCSelectionCell checkmark problem 1 year, 7 months ago #3

Hi Oguz,

Would you please elaborate more on what new accessory are you trying to set for the selection cell? Are you trying to replace the checkmark with another accessory when all the cells are selected?

As for the second problem: are you sure you did a clean build after you added the new v1.6 release files? Is this the same project you sent us earlier? I'd love to have another look at it and help you solve the problem.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: SCSelectionCell checkmark problem 1 year, 7 months ago #4

Yes Tarek, it is the same project I have sent you. I'm almost done with it but having problems in a couple of places. I'm sending you the project with a detailed explanation of what I'm trying and what is going wrong.

Thanks a lot, that was really fast
  • leweo
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: SCSelectionCell checkmark problem 1 year, 7 months ago #5

Tarek, I have send an e-mail to your sensiblecocoa mail account. Thanks..
  • leweo
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: SCSelectionCell checkmark problem 1 year, 7 months ago #6

Hi Oguz,

I am just updating the post that your issues have been resolved:

1- SCSelectionCell can now have any user defined accessory.

2- We've discovered a bug in your code that prevented SCSelectionCell from working properly (you were overwriting the value that SCSelectionCell was saving to your object's property).

Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Last Edit: 1 year, 7 months ago by tarekskr.
  • Page:
  • 1
  • 2
Time to create page: 1.00 seconds