We are designing an ios application and we have a problem with tabbar.
We have some pages that are not shown in tabbar. User can only access these pages when they click buttons in pages. Thus, we didn't connect them to tabbar.
If user open the app and click buttons, tabbar shown in these pages properly. This is what I want, tabbar should be shown in each page.
However if a user click a shared link such as "myApp://pageToShow" and I directly push user to this page from app delegate, tabbar is not shown. Since page is not belong to tabbar, I cannot present tabbar with index.
Here is my source code in app delegate:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
let ID: String = (String(describing: url)).replacingOccurrences(of: "myApp131774217473267://", with: "")
print(ID)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
var nextView = storyboard.instantiateViewController(withIdentifier: "RestStory") as? RestViewController
nextView?.mainToRestInfo = ID
let firstNavigationController = storyboard.instantiateViewController(withIdentifier: "RestStoryNavbar") as! UINavigationController
window?.rootViewController = firstNavigationController
firstNavigationController.pushViewController(nextView as! RestViewController, animated: true)
return true
}
Do you have any suggestion?