更新时间:2023-02-27 09:20:12
如果应用程序是通过通知启动的,那么它将出现在应用程序委托的 application:didFinishLaunchingWithOptions:
launchOptions 字典中 UIApplicationLaunchOptionsRemoteNotificationKey 键下,其中包含通知的所有信息(我相信 JSON 已转换为 NSDictionary).
If application is launched by a notification then it will be present in the application delegate's application:didFinishLaunchingWithOptions:
launchOptions dictionary under the key UIApplicationLaunchOptionsRemoteNotificationKey, which has all the info the notification has (JSON converted to NSDictionary I believe).
问题错了,我认为您要查找的只是指向当前所选导航控制器的指针.如果您查询 [tabbarcontroller selectedViewController]
,它会返回可见的导航控制器.然后只需将新创建的控制器推送到该导航控制器的堆栈顶部.
Got the question wrong, I think what you're looking for is just the pointer to the currently selected navigation controller. You get that if you query [tabbarcontroller selectedViewController]
, which returns the visible navigation controller. Then simply push the newly created controller on top of the stack of that navigation controller.