UI使用时关于button代码

来源:互联网 发布:人工智能要从娃娃抓起 编辑:程序博客网 时间:2024/06/05 16:04
-(IBAction) buttonClick:(id)sender
{
    UIButton *button = (UIButton *) sender;
    NSString *title = [NSString stringWithFormat:
                       @"Button tag %d",button.tag];
    NSString *message = [button currentTitle];
    UIAlertView *alert = [[UIAlertView alloc] initWithFormat:title
                                                     message:message
                                                    delegate:self
                                           cancelButtonTitle:@"OK"
                                            otherButtonTitle:nil];
    [alert show];

    [alert release];



这个哪里错了,有红色感叹号

0 0
原创粉丝点击