gpt4 book ai didi

ios - Objective-c BOOL 总是传递

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

我如何检查真假,因为这不是

 BOOL *isLoggedIn = [[NSUserDefaults standardUserDefaults] boolForKey:kSignedInBool];
BOOL *userSignedUp = [[NSUserDefaults standardUserDefaults] boolForKey:kHasUserEverSignedUpBool];

if(userSignedUp == NO || isLoggedIn == NO) { // they don't have an account so can't sign in.

//Show the modal opening screen path

[self performSegueWithIdentifier:@"showOpeningScreen" sender:self];

} else { //

// We have signed up before so findNearbyamulanes
[self performSelector:@selector(findNearByAmbulances) withObject:nil afterDelay:4.0];
}

最佳答案

您不应该使用原始数据类型的指针。

BOOL * 更改为 BOOL

编辑:强制性 link到一个(有点荒谬,但有用的)关于指针的视频。

关于ios - Objective-c BOOL 总是传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17034159/

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