KNSemiModalViewController icon indicating copy to clipboard operation
KNSemiModalViewController copied to clipboard

Exception: Defaults must have been set when accessing options

Open skywalkerlw opened this issue 12 years ago • 2 comments

I'm sure i'm using the latest code (i pulled yesterday)

During trying to execute following code:

UIViewController * parent = [self.view containingViewController]; if ([parent respondsToSelector:@selector(dismissSemiModalView)]) { [parent dismissSemiModalView]; }

An exception is given below:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Defaults must have been set when accessing options.'

I searched in history and found this kind of issue happened long time ago. However, how could this happen in latest version ?

Thanks so much if somebody could look into it

skywalkerlw avatar Nov 12 '13 02:11 skywalkerlw

I'm having the same issue at the moment.

coryhymel avatar Feb 04 '14 00:02 coryhymel

I was able to find out what was causing the issue. If you presenting from a UIViewController that is wrapped in a UINavigationController, you have to modally present like this:

[self.navigationController presentSemiViewController....

Instead of doing:

[self presentSemiViewController....

The example project is a bit confusing.

coryhymel avatar Feb 04 '14 17:02 coryhymel