gpt4 book ai didi

iphone - 每当我尝试运行此代码时,iPhone都会崩溃

转载 作者:行者123 更新时间:2023-12-01 17:21:05 25 4
gpt4 key购买 nike

因此,我试图在我的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]]];
}

最佳答案

添加对象时错过了@,

试试这个

- (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]]];

}

关于iphone - 每当我尝试运行此代码时,iPhone都会崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14411050/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com