- (IBAction)showPopup:(id)sender {
UAModalPanel *modalPanel = [[UAExampleModalPanel alloc] initWithFrame:self.view.bounds];
[self.view addSubview:modalPanel];
[modalPanel showFromPoint:[sender center]];
}
有人可以帮我吗?
感谢。
答案 0 :(得分:7)
看起来您需要将发件人转换为对象类型。我认为这是一个UIView。
[modalPanel showFromPoint:[(UIView *)sender center]];
您可以查看类似的问题:Why am I am getting the warning "Multiple methods named 'center' found"