UA-17470720-3

Jump to content


Photo
- - - - -

Allow to see detail on SCPropertyTypeArrayOfObjects even when requireEditingModetoEditPropertyValues = YES


  • Please log in to reply
3 replies to this topic

#1 Joseph Galbraith

Joseph Galbraith

    Starting Out

  • STV Lite
  • Pip
  • 6 posts
Reputation: 3
Good

Posted 30 July 2013 - 04:38 PM

I have a class definition; one of the properties is a NSMutableArray.  I have set the propertyDefinitionWith name to SCPropertyTypeArrayOfObjects.  In addition, I have set the requireEditingModeToEditPropertyValues to YES for the class definition.

 

However, this disables viewing the contents of the array of objects as well as editing them.

 

I would like to allow the user to see the list of contents and to see the content details without entering editing mode.  They should only have to enter edit mode to add/remove/modify an object in the array of objects.

 

Is this possible?

 

Thanks,

 

Joseph


  • cratrenue likes this

#2 Joseph Galbraith

Joseph Galbraith

    Starting Out

  • STV Lite
  • Pip
  • 6 posts
Reputation: 3
Good

Posted 31 July 2013 - 08:01 AM

I ended up doing something like this:

[myDef propertyDefinitionWithName:@"arrayProperty"].cellActions.willConfigure = ^(SCTableViewCell* pCell, NSIndexPath*)
{
	pCell.enabled = YES;
	pCell.detailViewControllerOptions.title = self.navigationItem.title;
	pCell.detailViewControllerOptions.tableViewStyle = UITableViewStylePlain;
};
The key was to enable the cell.


Thanks,
Joseph


Edited by Joseph Galbraith, 31 July 2013 - 08:04 AM.

  • wizgod likes this

#3 Balachandhar

Balachandhar

    Experienced Member

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

Posted 31 October 2013 - 01:50 PM

hi joseph,

 

do you know the way to make the detailview in UITableViewStylePlain while creating new item.

 

if yes, can you point me the exact place that i need to add the .tableViewStyle = UITableViewStylePlain; ?

 

thanks,

bala.



#4 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 14 February 2014 - 03:14 PM

i know this is an old question but someone just stumble across it and want the answer

 

hi joseph,

 

do you know the way to make the detailview in UITableViewStylePlain while creating new item.

 

if yes, can you point me the exact place that i need to add the .tableViewStyle = UITableViewStylePlain; ?

 

thanks,

bala.

 

set the generating table object (something SCObjectSection, SCArrayOfObjectsModel etc)

this id for a new item

obj.newItemDetailViewControllerOptions.tableViewStyle = UITableViewStylePlain;

this is for the editing detail view

obj.detailViewControllerOptions.tableViewStyle = UITableViewStylePlain;

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users