开发者社区 问答 正文

每次运行代码后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]]];
}

展开
收起
爵霸 2016-03-24 10:34:03 2072 分享 版权
1 条回答
写回答
取消 提交回答
  • "Please just connect to the servers",少写了个@吧?

    2019-07-17 19:12:09
    赞同 展开评论
问答分类:
问答标签:
问答地址: