UA-17470720-3

Jump to content


Photo
- - - - -

use sensible table view controller as ios calendar EKEventEditViewController

view-controllers general

  • Please log in to reply
1 reply to this topic

#1 TODD GARLAND

TODD GARLAND

    Experienced Member

  • STV 4.0 Pro
  • PipPipPipPip
  • 69 posts
Reputation: 21
Excellent

Posted 26 February 2013 - 06:39 AM

More than likely this is a very basic question but I have been struggling with it.

I have a calendar built into my application and the current EKEventEditViewController allows minimal editing/creation of an event if using core data.
As such, does anyone have a snippet of code they could share wherein a sensible table view controller could be launched in lieu of the EKEventEditViewController.

Thanks

#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 26 February 2013 - 07:09 PM

Hi Todd,

I am not sure what you're trying to do exactly, but the following code should allow you to easily push an STV view controller without any subclassing:

- (void)pushSTVDetailView
{
  SCTableViewController *detailVC = [[SCTableViewController alloc] initWithStyle:UITableViewStyleGrouped];

  // Configure the model as you wish here
  [detailVC.tableViewModel addSection:...];

  detailVC.actions.willDismiss = ^(SCTableViewController *viewController)
  {
     // Set whatever code you need to run when the detail view is about to dismiss here
  }

  // finally push the detailVC (the following code assumes you have a navigation controller in place)
  [self.navigationController pushViewController:detailVC animated:YES];
}

Hope this helps!





Also tagged with one or more of these keywords: view-controllers, general

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users