gpt4 book ai didi

ios - 如何在 Swift 4 中使用启动屏幕或图像来阻止 secret 信息?

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

<分区>

当应用程序移至后台时,如何通过启动图像屏蔽 View 来隐藏我的应用程序中的 secret 信息?我正在使用 Swift 和 iOS 11 创建应用程序。

下面是其他人在旧版 Swift 的 App Delegate 中使用的东西,但我不明白为什么 if on 在当前版本上工作:

- (void)applicationDidEnterBackground:(UIApplication *)application
{

UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.bounds];

imageView.tag = 101; // Give some decent tagvalue or keep a reference of imageView in self
// imageView.backgroundColor = [UIColor redColor];
[imageView setImage:[UIImage imageNamed:@"Default.png"]]; // assuming Default.png is your splash image's name

[UIApplication.sharedApplication.keyWindow.subviews.lastObject addSubview:imageView];
}

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