XCode Remove Navigation Bar From Tabbed Application - uiviewcontroller

I created an app with XCode (tabbed application) and by default it has 2 ViewController. Then I added few more ViewController on my story board.
but I notice that those first two ViewController are different than ViewController I added.
XCode default ViewController for tabbed application it seems has some kind navigation bar on top. but I don't see it on others.
How to remove this 'navigation bar' on those default ViewController? so it has same appearance like others? thanks.

To remove this 'navigation bar' go to the document outline in the storyboard. Select the default view and remove the 'Toolbar'.

Related

Reuse menuBarTemplate across views

I'm trying to create a simple TVML based app for tvOS. I'm having a problem to wrap my head around how the templating of the menu bar is supposed to work.
Let's assume my tab1.tvml looks like this:
https://developer.apple.com/documentation/tvml/layout_elements/menubar
And I have one other template called tab2.tvml that only has the text "Hello World" in it. When I start my app tab1.tvml is correctly shown with the menu bar. With my actionHandler it's also switching to tab2.tvml if I select it in the menu bar.
Simplified version of my action handler:
function handleMenuBarEvents(event) {
var doc = resourceLoader.getDocument("tab2.tvml");
navigationDocument.pushDocument(doc);
}
But the question is:
How do I "inherit" the menu bar so it's shown on all views when I swipe down like it's in other tvOS apps? Do I have to copy my menu bar into all views and update them everywhere if I decide to add a new menu tab?
Thanks!

What is the maximum number of view controllers in UITabBarController for tvOS

What is the maximum number of view controllers in UITabBarController for tvOS? It's not documented on developer.apple.com.
The screen is obviously bigger than iOS devices. I know for iOS it will add a "More" button if the number is bigger than 5.
The More Navigation Controller The tab bar has limited space for
displaying your custom items. If you add six or more custom view
controllers to a tab bar controller, the tab bar controller displays
only the first four items plus the standard More item on the tab bar.
Tapping the More item brings up a standard interface for selecting the
remaining items. The interface for the standard More item includes an
Edit button that allows the user to reconfigure the tab bar. By
default, the user is allowed to rearrange all items on the tab bar. If
you do not want the user to modify some items, though, you can remove
the appropriate view controllers from the array in the
customizableViewControllers property.
Note
Tab bar customization and
the More interface is not available in tvOS
Differences in tvOS
Tab bar controllers serve the same purpose in tvOS as in iOS, but
provide slightly different user interface features: The tab bar
interface appears at the top of the window. When focus leaves the tab
bar, the tab bar is hidden. Swiping up on the remote shows the tab bar
again and focuses it. A user can also show and focus the tab bar by
pressing the Menu button. Swiping down from the tab bar moves focus
into the content view; specifically, to the first focusable view that
is visually below the selected tab. Swiping down behaves like a normal
focus-changing gesture—that is, focus moves in the direction the user
swiped. If nothing is focusable immediately below the selected tab,
the closest focusable view is focused instead. Pressing the Select
button while a tab is focused moves focus into the content view.
Because there is no direction associated with this change, focus moves
to the view specified in the content view's preferredFocusedView
property. Tab bar controllers in tvOS do not support customization. A
tab bar controller displays only the number of view controllers from
its viewControllers array that fit on the screen, and does not provide
the More interface seen in iOS.
I found it by adding ViewControllers in StoryBoard. No matter how smaller your buttons are, the answer is 7. It will hide if it's more than 7 ViewController. And no "More" button of course. I added an 8 view controller but it only shows 7 (seven).
The answer is 7
Great, right?!
Solution
Sadly, I wrote my own TabBarController :(
Which is not a subclass of UITabBarController but UIViewController. Hoping Apple will change this (they'll not.). Should be depending on the size of the buttons, and could auto calculate each specific case.
Best.

Couldn't find the toolbar items in my xcode 7 IDE

I couldn't see the sceme button or Run button and any toolbar icons in my xcode 7.0.
Please let me know how to view that. its very difficult to me for understanding the scheme name and simulator type running without knowing the build.
Right click on the top bar and select “Icon and text”
The same thing happened to me. I tried right clicking on the top bar as suggested above, but only saw a menu that read, "Hide Toolbar". Once I did that, I clicked on the top bar again and saw the menu with "Icon and Text" as a choice. Unfortunately, that did nothing.
I closed the project and opened it back up again. The top bar was set back to normal with the run and stop buttons, the scheme pulldown menu, etc.

Windows Phone Application Bar Instance Remaining Same When Back Key Pressed

I Have Created an application bar in the First Page and when a click occurs, it navigates to the Second Page and creates a new Application Bar in CodeBehind c#.
Till here it is Working fine but when i press the Back Hard Button while on the second page, the application bar instance is still remaining and appearing in first page.
In the ONNAVIGATEDTO method i'm making the instance of the first page appbar as null but it is not working and the previous application bar (of the Second Page) is still showing in the firstPage.
The application bar is different for each page. No need to create it in code behind.
The null assignment does not work because the appbar is not rendered yet. If you insist of doing it in code behind, which is not recommended, do it on page load. There is also an Items.Clear() method you can use to remove the app bar items. You should do it in XAML though.

Xcode 4 Orientation to Landscape grayed out

I'm trying to create an ipad app in xcode 4 that supports ONLY landscape view. By default the MainWindow.xib file displays the interface in Portrait mode. I cannot change it to landscape mode because the option is grayed out.
If I create a UIViewController subclass, I'm able to rotate that new view to landscape. Just not the original MainWindow.xib viewcontroller.
The way I've been able to work around this, is to create a second view controller and set that to landscape as the option is not grayed out on this one. Then I create a button on the first view controller that switches to the second one where I place all my objects.
There has to be an easier way to have the main viewcontroller "MainWindow.xib" appear in the interface builder as Landscape. I just can't figure it out. Do I really a second view to have a landscape xib to create objects on? If so, how can I have that second view be the main view so that I don't need a button to switch to it?
I'm totally new to Xcode and IOS development, so please forgive my noobness.