假设 John 使用我的应用程序 3-6 分钟。然后我想弹出一个视图,在我的情况下,包括一个广告。
像这样的东西,
AdViewController *adViewController = [[AdViewController alloc] init];
[self presentViewController:adViewController animated:YES completion:nil];
但是我怎样才能让它在随机时间后弹出呢?我想我必须使用委托文件并使用 arc4random 函数。
约翰看过广告后,他必须关闭它,但这不是问题..
有人可以给我一个代码示例吗?