gpt4 book ai didi

ios - [ViewController PresentPopupViewController :animationType:]: unrecognized selector

转载 作者:行者123 更新时间:2023-11-29 03:46:19 25 4
gpt4 key购买 nike

一直在解决这个问题......我正在尝试使用 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(非常简单)

这是我的代码:

ViewController.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

DetailViewController.m

#import "DetailViewController.h"

@implementation DetailViewController

@end

如果有任何帮助,我将不胜感激。顺便说一句:我使用的是 XCode 4.6.3。提前致谢。

最佳答案

确保您的“编译源”设置包含 UIViewController+MJPopupViewController.m 文件。

关于ios - [ViewController PresentPopupViewController :animationType:]: unrecognized selector,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17716523/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com