发出“命名为...的多个方法"的问题. [英] Issue with "Multiple methods named...."

查看:56
本文介绍了发出“命名为...的多个方法"的问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个探秘.我想在我的项目中实现UAModalpanelview.起初它运行良好...无论如何我都实现了文件.但是现在我想运行该应用程序,但是每次都会出现此错误.正是因为有了中心",我才知道发现了名为中心"的多个方法的结果,参数类型或属性不匹配".

I got a probelm. I would like to implement the UAModalpanelview to my project. At first it worked fine...I implemented the files...whatever. But now I would like to run the application, but I got this error every time. It is because of the "center" it shows me that "Mutliple methods named center found with mismatched result, parameter type or attributes".

- (IBAction)showPopup:(id)sender {

    UAModalPanel *modalPanel = [[UAExampleModalPanel alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:modalPanel];
    [modalPanel showFromPoint:[sender center]];
}

有人可以帮我吗?

谢谢.

推荐答案

看起来您需要将sender强制转换为对象类型.我认为这是一个UIView.

Looks like you need to cast sender to an object type. I would assume it is a UIView.

[modalPanel showFromPoint:[(UIView *)sender center]];

您可以看一下这个类似的问题:

You can take a look at this similar question: Why am I am getting the warning "Multiple methods named 'center' found"

这篇关于发出“命名为...的多个方法"的问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆