Navigation bar and Tab bar disappears when doing push segue - uitabbarcontroller

I have the following structure in InterfaceBuilder in XCode:
Tab bar controller
Navigation bar controller
View Controller A
.. push segue to..
View Controller B
However I cannot get the push segue to keep the nav bar and tab bar. It also animates from the bottom like a modal segue.
This is how I start the segue:
self.performSegueWithIdentifier(DETAIL_MEETING_SEGUE_ID, sender: self)
Both VC1 and VC2 have unchecked "Hide Bottom Bar on Push".
In Interface Builder tab bar and nav bar are showing correctly. Also, when dragging a segue directly from a button to VC 2 with push set it works perfectly.
Any ideas?

I experienced a similar issue after embedding tab bar stacks of VCs into navigation controllers. There was a storyboard push segue from VC a to VC b (in a different stack) that was called using performSegue:.
My fix:
Delete the segue in storyboard, then create it again the exact same way. After this the VC b showed the tab bar and the navigation bar as expected.
Filed a bug with Apple Bug Reporter.

I "solved" it by dragging a manual segue from the tableview cell to "View Controller 2". I then gave it the same name as before and made setup in prepareForSegue: as normal. I had to drag multiple segues but it was ok to use the same id for them.
If anyone have a better solution please write it here.

Related

how can i change focus from one object to next preferred focus view which i want in appleTv os development project in swift3

Actually i'm developing a Apple Tv project in swift3.I faced some problem with focus navigation using remote.
Is there any way to change focus from one object to another object which i want.
I tried below code but not working......
override var preferredFocusedView: UIView? {
get {
return preferredFocusedView1
}
}
In the bellow screenshot i want to move focus from the pink icon to the star button when pressed down button of remote. how it is possible. plz provide me some code in details

Repositioning Master View display button in Split View Controller

As you know, split view controller hides the master view and displays detail view in full screen mode in ipad. In the full screen mode, ios creates a bar button for the master view on the navigation bar. My question is, is it possible to reposition that button to the far right instead of left? Because my detail view is embedded inside a navigation view controller and there are severals views associated with it. It gets confusing when master view is hidden and the detail view has button to go back to the previous view.
In above screencap, "Category" is a button to display the masterview and "List of Events" is a back button. If you have better way to handle this situation, please feel free to suggest.
Yes, you can do it just send a NotificationCenter.default to the split view controller and change self.preferredDisplayMode in your splitview and coming to moving the category buttom u either can use the right bar button in navigationbar or create your custom navigation bar.
Hope this helps
For those who are having the same issue, I found a very simple solution. All you need to do is assign the rightBarButtonItems with leftBarButtonItems value and set the leftBarButtonItems to nil. Voila, that's about it.
if let leftButton = self.navigationItem.leftBarButtonItems {
self.navigationItem.rightBarButtonItems = leftButton
self.navigationItem.leftBarButtonItems = nil
}

Ionic 2 - How to remove gap between header and content?

I have an Ionic 2 side menu app. When I toggle the menu it pops out, and when toggeling it again it disappears but makes a gap between the header and the content (on the left side).
Does anyone know why this happens ?
Also after doing some interaction on the page (a button click), the gap disappears.
how you are using the menue? can you include your code?
how ever you can close menu function to hide menu without gaps
for Examle:
constructor(public platform: Platform, public menu: MenuController)
openPage(page) {
// close the menu when clicking a link from the menu
this.menu.close();
this.nav.push(page.component);
}

Using Storyboards Get TabBar Reference for UIActionSheet showFromTabBar

I have a storyboard with an initial splash view controller followed by a tabbar controller, navigation controllers, and tableview controllers. I need to present an action sheet from one of my tableview controllers.
[UIActionSheet showInView:self.view] does not work, because touches that fall in the tab bar area are not detected, so I must use [UIActionSheet showInTabBar:tabBar].
My question is how can I get a reference to the tab bar or the UITabBarController. Xcode does not allow me to connect a referencing outlet from the UITabBarController or from the UITabBar to any of my custom view controllers (presumably because view controllers on a storyboard are not static objects, but are only created when necessary and related by segues (?), so you aren't supposed to do it that way), but this leaves me with no way to get at the tab bar directly.
What is the right way to do this ?
There is probably a better answer to this question over here:
Storyboard - UITabBarController
In short, pull the root view controller off your appdelegate's window.
I just did the following in my viewWillAppear to hide my tab bar for that particular view:
AppDelegate *ap = (AppDelegate *)[[UIApplication sharedApplication] delegate];
UITabBarController *tc = (UITabBarController *)[[ad window] rootViewController];
[[tc tabBar] setHidden:YES];

Nesting UITabBar into UINavigation Controller

Hiya, I would like to know if there's an example of this anywhere. Basically I would like to push the UITabBar, and keeping with apple's guidelines I can only do this by placing the UITabBar(not the controller) in a viewController. Examples of this are in the Music selection on your iPhone/iTouch when you hit the "Now Playing" nav item, notice the tab bar pushes over.
This is somewhat of the flow I'm trying to accomplish
-----> Table (cell 1)----> Detail View
|
Navigation Controller ----> UITabBar-|----------> view 2
|
-----> view 3
So when the app launches I'm greeted with my tab bar and when I select a cell from the tableView the detail view is pushed onto the stack resulting in a possible customized button bar at the bottom of that view.
Another good example of this functionality is the [B]NYTimes [/B]app (it's free if you want to check it out)
Now I got the basics of this running, but I'm getting crashes when trying to wire IBOutlets to the tab items in IB. Would appreciate some insight on this.
Thx much!
It's pretty easy. The viewcontroller you push on the stack (the one which should hide the tabbar) should have the hidesBottomBarWhenPushed property set to YES.
viewcontrollerbeingpushed.hidesBottomBarWhenPushed = YES;