Iphone 如何知道何时使用Default.png从头启动应用程序?
有没有办法确定应用程序是从零开始启动的,这意味着它没有从后台被唤醒,而是真的不知从何处启动,包括显示Default.png或Default iPad.png?在你的应用程序代理中有一个方法Iphone 如何知道何时使用Default.png从头启动应用程序?,iphone,ios,ipad,Iphone,Ios,Ipad,有没有办法确定应用程序是从零开始启动的,这意味着它没有从后台被唤醒,而是真的不知从何处启动,包括显示Default.png或Default iPad.png?在你的应用程序代理中有一个方法 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIAlertView * alert = [[UIAlertView alloc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Only at launch" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
在你的应用程序委托中有一个方法
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Only at launch" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
你确定只有从头启动应用程序时才会调用此方法吗?是100%确定:),据我所知,此方法仅在新启动时调用。这是开发人员设置应用程序以获取数据或启动通知(如设备是否连接到internet)的唯一机会:)您确定此方法仅在应用程序从头启动时调用吗?是100%确定:),据我所知,此方法仅在新启动时调用。这是开发人员设置数据应用程序或启动通知(如设备是否连接到internet)的唯一机会:)