2 alllllllll alllllllll 于 2013.03.15 16:54 提问

每次运行代码后iphone就会崩溃

不知道为什么这段代码一运行就崩溃。

- (IBAction)logOutBtnDown:(id)sender {
    [PFUser logOut];
    NSArray *quotes;
    int r;

    quotes = [NSArray arrayWithObjects:
        @"R u done yet",
        @"Log in again",
        @"Try Me",
        @"SMD",
        @"We can do this all day",
        @"IDC your eating up ur RAM",
        "Please just connect to the servers",
        @"You are not giving up are u",
        @"Forget it I quit",
        @"Imma tell TDK",
        nil];

    r = arc4random() % 10;
    [_welcomeLabel setText:[NSString stringWithFormat:@" %@", [quotes objectAtIndex: r]]];
}

2个回答

dream238
dream238   2013.03.15 17:49
已采纳

"Please just connect to the servers",少写了个@吧?

xiaoyaokk
xiaoyaokk   2013.03.26 10:32

确实是少写了一个@。。。

Csdn user default icon
上传中...
上传图片
插入图片