gpt4 book ai didi

ios - iOS7 中的警报 View

转载 作者:行者123 更新时间:2023-11-28 18:20:52 25 4
gpt4 key购买 nike

我是 iOS 和 Objective C 的新手。我有以下代码可以在 iOS7 中为 iPhone 应用程序创建警报 View :

if ([tracker exceededGoal]){
[UIAlertView] *alert = [[UIAlertView alloc] initWithTitle:@"Done" message:@"You acheived your goal!" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];

}

我收到以下错误:

Use of Undeclared identifier 'alert'

Expected identifier

我做错了什么?

最佳答案

去掉这里的括号:UIAlertView *alert =

关于ios - iOS7 中的警报 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20953487/

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