gpt4 book ai didi

ios - viewWillAppear 是否也必须具有 [super viewWillAppear] 方法

转载 作者:可可西里 更新时间:2023-11-01 06:18:13 27 4
gpt4 key购买 nike

我将我的 iAd/AdMob 广告代码放在...

-(void)viewWillAppear:(BOOL)animated{}

广告在所有 iOS 设备上的效果都很好,就像我现在使用的那样。当我将我的 iPhone 连接到 Xcode 并单击 Product -->Analyze 时,一条消息指出...

UIViewController 子类 'iPhoneSIX' 中的 viewWillAppear: 实例方法缺少一个 [super viewWillAppear:] 调用

我只是偶然发现了这个 Product-->Analyze 东西。我真的需要添加 [super viewWillAppear] 即使一切都像目前一样在所有设备上运行得很好。如果我不注意 Product-->Analyze 问题导航器,Apple 会拒绝我的应用吗?

此外,...

[super viewWillAppear:YES];

调用这个有什么作用?

最佳答案

根据 Apple : (强调我的)

This method is called before the receiver's view is about to be added to a view hierarchy and before any animations are configured for showing the view. You can override this method to perform custom tasks associated with displaying the view. For example, you might use this method to change the orientation or style of the status bar to coordinate with the orientation or style of the view being presented. If you override this method, you must call super at some point in your implementation.

关于ios - viewWillAppear 是否也必须具有 [super viewWillAppear] 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30243903/

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