UA-17470720-3

Jump to content


Photo
- - - - -

.detailViewControllerOptions.tableViewStyle is not working

models sections

  • Please log in to reply
5 replies to this topic

#1 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 30 October 2013 - 02:36 AM

hi,

 

I am using SCArrayOfObjectsModel in my app, the tableview is set to plain style. but when i select any cell from the tableview the detailview is having the style 'grouped tableview'  

 

but i want to make it plainstyle.  So i tried the following way but no luck yet. Can anyone suggest a way to make it work?

 

 notesModel.detailViewControllerOptions.tableViewStyle=UITableViewStyleGrouped;

 

thanks,

bala


  • hwf9vjkj8s2 likes this

#2 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 30 October 2013 - 10:50 AM

any one know the way to fix this? 

 

thanks,

bala



#3 wizgod

wizgod

    I'm what you guys call a User

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 575 posts
  • LocationThe Grid
Reputation: 149
Popular

Posted 30 October 2013 - 02:06 PM

Hey Bala,

 


but i want to make it plainstyle.  So i tried the following way but no luck yet. Can anyone suggest a way to make it work?

 

 notesModel.detailViewControllerOptions.tableViewStyle=UITableViewStyleGrouped;

 

thanks,

bala

 

If you want plain, that should be UITableViewStylePlain; unless that was just a typo?

 

Wg


P.S. I love Swift... talk Swift.. Never too old school to learn yet another programming language. LOL! ;-)


#4 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 30 October 2013 - 08:29 PM

Hi Wizgod,

 

thank you for your reply, below is my code. but i am getting grouped style in the detail view. Is it a STV bug?

 

 

notesModel.detailViewControllerOptions.tableViewStyle=UITableViewStylePlain;

 

thanks,

bala



#5 wizgod

wizgod

    I'm what you guys call a User

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 575 posts
  • LocationThe Grid
Reputation: 149
Popular

Posted 30 October 2013 - 09:53 PM

I saw how Joseph was implementing it in his post here: http://sensiblecocoa...-yes/#entry9667 and I tested it with the STV sample Core Data App. Changing between styles using his implementation gave the desired result.

 

Hopefully the same or some similar implementation will work for you:

 

Core Data App - TasksViewController.m (Line 55)

SCPropertyDefinition *categoryPropertyDef = [taskDef propertyDefinitionWithName:@"category"];
categoryPropertyDef.cellActions.willConfigure = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
{
	cell.detailViewControllerOptions.tableViewStyle = UITableViewStylePlain;
};

 

Wg


P.S. I love Swift... talk Swift.. Never too old school to learn yet another programming language. LOL! ;-)


#6 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 31 October 2013 - 05:44 AM

where i can set it to make the new item creation's detailscreen? i am trying to make the detailscreen in plain style when i hit the add button from the table list screen to create a new item.

 

thanks

bala







Also tagged with one or more of these keywords: models, sections

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users