9

Any ideas why I would be seeing a "Could not load source: 6" console message when calling "pushViewController"? The new view seems to come up ok. The code is:

Code Except:

EKEventViewController *eventViewController = [[EKEventViewController alloc] init];
eventViewController.event = event;
eventViewController.allowsEditing = YES;
eventViewController.delegate = self;

[self.navigationController pushViewController:eventViewController animated:YES];  // <== OCCURS HERE
Greg
  • 34,042
  • 79
  • 253
  • 454
  • Did you check the IBOutlet connected to the navigationController? – Sahil Khanna Oct 20 '11 at 07:33
  • @Sahil - what do you mean/what are you getting at here? I don't really understand. I don't have an IBOutlet specifically specified in my AppDelegate or RootViewController, but the NavController seems to work OK, excepting this case I'm highlighting when I'm at layer 3 of my navController about to push a 4th view... – Greg Oct 20 '11 at 10:51
  • Can you check if after pushViewController, does it hit the viewDidLoad of eventViewController (by adding a break point)? Also in the subject line you've mentioned **(code attached)**. What do you mean by this. – Sahil Khanna Oct 20 '11 at 10:59
  • can't put a breakpoint in this controller (which is a EKEventViewController) as this isn't my code (i.e. it's Apple's). code attached was just referring to the Code Except I had in the question – Greg Oct 20 '11 at 14:08
  • sample from developer.apple.com http://developer.apple.com/library/ios/#samplecode/SimpleEKDemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010160 i think it's ok – Volodymyr B. Nov 06 '11 at 00:13
  • but i've got next problem :) http://goo.gl/8fGlJ – Volodymyr B. Nov 06 '11 at 00:35
  • Add .xib file with EKEventViewController in initWithNibName and check both class is UIViewController. – Sudesh Kumar Nov 09 '11 at 07:25

4 Answers4

1

EKEventViewController has an IB file which gets loaded? Maybe you're using an image inside your IB/nib file which is no longer in your project. Additionally go to menu "Products" and click on "Clean Build Folder…" (or cmd-option-shift-K)

  • EKEventViewController is an Apple controller (#import ) so it's not my code in this case. I tried the clean build folder but no luck... – Greg Nov 06 '11 at 19:57
  • tried setting `eventViewController.delegate = self;` after pushing the controller? –  Nov 07 '11 at 01:23
1

Why don't you try to set the frame of this view controller before pushing it.

eventViewController.view.frame = CGRectMake(…);

[self.navigationController pushViewController:eventViewController animated:YES]; 
Dimitar Marinov
  • 922
  • 6
  • 14
1

This seems to be new since iOS 5.0. I can verify, that under iOS 4.3 this message does not appear.

nfriese
  • 11
  • 2
0

I know this is a really old question, but (this just happened to me) maybe this will be of use to someone.

Assuming you were trying to test your app on the simulator:

Could not load source: 6 - Some features are not available on the simulator, and you have to run the app on a real device. It simply means that it cannot find the content related to (in your case) the Calendar app.

  • Don't know why this was down voted. I got this error message on the simulator; I ran the same app on a device and didn't get the error message. So this seems to me to be a good answer! – matt Aug 21 '14 at 02:54