Welcome, Guest
Username Password: Remember me

design secondary tableView
(1 viewing) (1) Guest

TOPIC: design secondary tableView

design secondary tableView 1 year, 8 months ago #1

hi there

first i want to thank you fro your great work.
i was in the middle of updating my app when i saw your project. i stopped everything and now i am using your code and find it great.

now to my question:

i have a tableViewModel with selection cell.
i want selection table view to be grouped and designed in my app design.
is there a way to do that.

thanks again
sahni
  • shannoga
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 1
Last Edit: 1 year, 8 months ago by shannoga.

Re: design secondary tableView 1 year, 8 months ago #2

Thank you very much for your complements Sahni

Sure, you can fully customize how the selection table view looks like (or any detail view for that matter).

The detail table view style can be modified using a new property added to Sensible TableView new release called detailTableViewStyle. I will send you an RC version of the new release right away so that you'll be able to compile the following code:

 
...
SCSelectionCell *selectionCell = ...; // define selection cell normally here
selectionCell.detailTableViewStyle = UITableViewStyleGrouped;
...
 


You can also customize the look and feel of all detail cells as illustrated in the Samples App sample application. I'll also be glad to provide some more customization code if you tell me what exactly is it that you want to customize, and post some code on how you're creating the selection cell.

Hope this helps
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: design secondary tableView 1 year, 8 months ago #3

hi again

Thanks for the fast reply.

i have tried what you suggested and it does not work.

i have checked the documentation and saw that property.
but when i am using it i get the -
" error: request for member 'detailTableViewStyle' in something not a structure or union"

i have noticed that the code hinting does not showing that property too.

any thing i am doing wrong?

here is my code -
 
//categories & note settings cells
SCTableViewSection *categoriesSection = [SCTableViewSection sectionWithHeaderTitle:nil];
[tableModel addSection:categoriesSection];
SCSelectionCell *presetCategoriesCell = [SCSelectionCell cellWithText:NSLocalizedString(@"Change category",@"") withBoundKey:@"category" withSelectedIndexesValue:nil withItems:categories allowMultipleSelection:NO];
 
presetCategoriesCell.detailTableViewStyle = UITableViewStyleGrouped;
 
presetCategoriesCell.detailViewTitle = @"Change Category";
NSMutableArray * images = [[NSMutableArray alloc] init];
 
for(int i=0;i<[categories count];i++){
// UIImage *img = [UIImage imageNamed:@"Work_l.png"]
imageView=nil;
imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[categories objectAtIndex:i]]];
[images addObject:imageView];
[imageView release];
}
 
 
presetCategoriesCell.detailCellsImageViews =images;
 
 
[categoriesSection addCell:presetCategoriesCell];



shani
  • shannoga
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 1
Last Edit: 1 year, 8 months ago by shannoga.

Re: design secondary tableView 1 year, 8 months ago #4

You'll have to use the new RC version I've sent you for this code to compile. Please tell me if it works well for you now. Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: design secondary tableView 1 year, 8 months ago #5

thats works great, thanks a lot.

i will accept your suggestion from above and will ask -

how can i reach the other properties of the detailed tableView -

background, cells background' cell text color etc.

thanks
shani
  • shannoga
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 1

Re: design secondary tableView 1 year, 8 months ago #6

Please check out this post on customizing Sensible TableView cells: sensiblecocoa.com/forum/general-discussi...e-table-cell.html#12

Please tell me if you need further assistance with this.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Time to create page: 0.96 seconds