Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-09-2010, 03:20 PM   #1 (permalink)
iPhoneDevelopment
Banned
 
Join Date: Dec 2009
Posts: 61
Default dismissModalViewController not working

Hi everyone,

For some reason, my app crashes every time I try to dismiss a modal view controller. I have been through all my code and cannot find a reason for this (I even re-checked the Apple documentation to make sure that I wasn't missing anything), so I'll post it in the hope one of you may find the problem:
Code:
//IN MY MAIN VIEW CONTROLLER HEADER FILE
#import "GameOverViewController.h"
@interface JumpViewController : UIViewController <GameOverViewControllerDelegate>...

//IN MY MAIN VIEW CONTROLLER IMPLEMENTATION FILE
-(void)gameOverViewControllerDidFinish:(GameOverViewController *)viewController {
	[self dismissModalViewControllerAnimated:YES];
}

//IN MY GameOverViewController HEADER FILE
@interface GameOverViewController : UIViewController {
	id <GameOverViewControllerDelegate> delegate; }
@property (nonatomic, assign) id <GameOverViewControllerDelegate> delegate;
@end
@protocol GameOverViewControllerDelegate
-(void) gameOverViewControllerDidFinish:(GameOverViewController *)viewController;
@end

//IN MY GameOverViewController IMPLEMENTATION FILE
-(IBAction)dismiss {
		[self.delegate gameOverViewControllerDidFinish:self];
}
I am sorry if the problem is something simple I have missed, but I have checked and re-checked it and can find nothing wrong :S

Thanks

Cam
iPhoneDevelopment is offline   Reply With Quote
 

» Advertisements
» Online Users: 265
19 members and 246 guests
ADY, apatsufas, BdR, ckgni, F_Bryant, glenn_sayers, Guthook, ilmman, joeallenpro, ketaskin, michelle, Music Man, NSeven, smethorst, Sunny46, themathminister, TheWebWizz, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,709
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.