martinjuhasz / MJPopupViewController

A UIViewController Category to display a ViewController as a popup with different transition effects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Present UIView instead of UIViewController

opened this issue · comments

I like what you've done here, but is there any reason why you're presenting a UIViewController instead of a UIView?

It seems a bit unnecessary to use a UIViewController (although I may well be missing the reason entirely). The code is easily convertible to use a UIView - I'm happy to submit my version if you'd like.

i follow Apples API-Design in this case. They use
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion

for this (reference(http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/presentViewController:animated:completion:))