gpt4 book ai didi

ios - 运行 ntimer 来显示广告,但仅显示在某些 View Controller 上

转载 作者:行者123 更新时间:2023-11-29 03:52:58 24 4
gpt4 key购买 nike

效果很好,但我需要它出现在某个类名称“food”中,而不是其他类中。任何提示将不胜感激。

  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

// [Shared instance];

[NSTimer scheduledTimerWithTimeInterval:20 target:self selector:@selector(ad) userInfo:nil repeats:YES];
}




-(void)ad{
[ALInterstitialAd showOver:self.window];
}

最佳答案

好吧,如果您需要在某个类中显示它,就在该类中进行。您可以使用 viewDidLoadviewDidAppearviewWillAppear 实例化 NSTimer

关于ios - 运行 ntimer 来显示广告,但仅显示在某些 View Controller 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16866740/

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