Jump to content

- - - - -

use sensible table view controller as ios calendar EKEventEditViewController

view-controllers general

  • Please log in to reply
1 reply to this topic



    Experienced Member

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

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.


#2 Tarek


    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452

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