Welcome, Guest
Username Password: Remember me

Accessing properties of an Edit Detail View of SCArrayOfObjectsSection
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Accessing properties of an Edit Detail View of SCArrayOfObjectsSection

Accessing properties of an Edit Detail View of SCArrayOfObjectsSection 1 year, 6 months ago #1

I'm using a SCArrayOfObjectsSection and I'd like to add a title and add placeholders to the textfields in the cells of the detailView that is presented in the form sheet when I click the add button item.

 
 
SCArrayOfObjectsSection *objectSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:nil withEntityClassDefinition:accountDef];
 
objectSection.addButtonItem = self.navigationItem.rightBarButtonItem;
objectSection.allowEditDetailView = YES;
objectSection.detailViewModalPresentationStyle = UIModalPresentationFormSheet;
 
 


Where would I access those properties?

Gary
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Accessing properties of an Edit Detail View of SCArrayOfObjectsSection 1 year, 6 months ago #2

Hi Gary,

What you're looking for should be set in the class definition. The title is set through the SCPropertyDefinition "title" property, and the placeholder is set through the SCPropertyDefinition "attributes" property (by setting it to an SCTextFieldAttributes instance). Please post your class definition code if you're still stuck and I'll refactor it for you.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: Accessing properties of an Edit Detail View of SCArrayOfObjectsSection 1 year, 6 months ago #3

Hey Tarek,

I got all but the title of the form.

Gary
Scaled_Snapz001_291x324.png
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Accessing properties of an Edit Detail View of SCArrayOfObjectsSection 1 year, 6 months ago #4

You can set the detail view controller's title in the SCTableViewModelDelegate method called "tableViewModel:detailViewWillAppearForSectionAtIndex:withDetailTableViewModel:".

 
- (void)tableViewModel:(SCTableViewModel *)tableViewModel
detailViewWillAppearForSectionAtIndex:(NSUInteger)index
withDetailTableViewModel:(SCTableViewModel *)detailTableViewModel
{
detailTableViewModel.viewController.title = @"My Title";
}
 


Hope this helps.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 0.84 seconds