是否可以檢查哪個UIViewController場景在代碼中處於活動狀態?如何檢查哪個UIViewController從AppDelegate處於活動狀態(推後)
我有一個推送通知進來的應用程序,並希望這取決於查看用戶不同的事情要做的是,這樣的事情:
的AppDelegate:
- (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo
{
if (tableViewController == active)
//get data from server
else if (detailedViewController == active)
//Get Image from server
}
感謝
太棒了!非常感謝 – BlackMouse 2012-04-26 12:31:13