调用时方法不会触发

时间:2013-10-11 09:58:13

标签: ios objective-c methods

我有一个名为MyAlertView的自定义创建对象,我正在创建它的实例:

MyAlertView *alertView2 = [[MyAlertView alloc] initWithTitle:@"TITLE" message:@"MESSAGE" delegate:self cancelButtonTitle:@"CANCEL" otherButtonTitles:nil, nil];

初始化程序工作正常并初始化对象。 然后我称之为这个方法:

[alertView2 show];

这是MyAlertView类中的方法实现:

- (void)show {
    [self.delegate willPresentAlertView:self];
    [self.myWindow makeKeyAndVisible];
    [self.delegate didPresentAlertView:self];
}

我在那里设置了一个断点,但该方法不会被调用。 那是为什么?

0 个答案:

没有答案