一直在打我的头......我正在尝试使用 MJViewPopupViewController 并不断收到以下错误:
****-[ViewController presentPopupViewController:animationType:]: unrecognized selector sent to instance 0x8016a30
2013-07-17 23:35:20.091 DesiTest[1055:c07] ****** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController presentPopupViewController:animationType:]: unrecognized selector sent to instance 0x8016a30'*******
为了简单起见,我尝试使用一个按钮设置一个小型测试应用程序,单击该按钮时会显示 DetailViewController 包含一个带有标签的 UIView(非常简单)
这是我的代码:
视图控制器.m
#import "ViewController.h"
#import "UIViewController+MJPopupViewController.h"
#import "DetailViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)openView: (id) sender
{
DetailViewController *dView = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil];
[self presentPopupViewController:dView animationType:MJPopupViewAnimationFade];
}
@end
细节视图控制器.m
#import "DetailViewController.h"
@implementation DetailViewController
@end
我真的很感激任何帮助。顺便说一句:我在 XCode 4.6.3 上。提前致谢。