How to Hide the Back Button from the Status Bar on the Apple Watch

How to hide the back button from the status bar on the Apple Watch?

This is how you do it:

WKInterfaceController.reloadRootControllersWithNames(
["myInterfaceController"], contexts: []
)

Where myInterfaceController is the identifier of the destination Interface Controller.

Thanks to Harvant for the pointer.

In watchOS, is it possible to display a view without a status bar button that leads to the root view?

Maybe you need to modify your view with:

    .navigationBarBackButtonHidden(true)

Did you try that?

apple Watch: remove status bar for Interface Controller

As of Apple Watch Programming Guide you can customize interface controller title text color by setting your App’s Key Color.

Every WatchKit app has an associated key color, which is applied to the >following UI elements:

-The title string in the status bar

-The app name in short look notifications

An app’s key color is stored in the Global Tint property of the app’s storyboard. To access this property, select your storyboard and display the File inspector. Select one of several preexisting colors from the popup menu or use the color picker to specify a custom color.

This is all we have as of today.


About if it is possible to hide the status bar...
The closer result you will get is by using modal interfaces.
In this ones, the clock will be invisible but the status bar will remain there holding the interface title.

How to hide or remove the time from the Apple Watch status bar?

As you pointed out, trying to hide or remove the time from the status bar will get your app rejected.

There's no way to accomplish what you want to do yet, since Apple doesn't permit developers to create custom watch faces (even in watchOS 3).

Update:

For your information, the only situation when the time does not appear on the status bar is when a modal presentation has both a left AND a right bar button title. This usually does not occur, but will happen during dictation -- the text input controller shows a Cancel button on the left and a Done button on the right of the status bar.

While hacking the bar titles (or using a private API) wouldn't get your app approved, you might look into a way of "hiding" the status bar itself, or the right title of any other modal view which doesn't happen to show the time.

I'm only pointing these things out in case you simply wanted to make a particular app for your own use. Since Apple will reject apps which violate their requirements, I wouldn't encourage you to waste your time trying to make an app which you know would get rejected.

How to hide 'Back' button on navigation bar on iPhone?

Objective-C:

self.navigationItem.hidesBackButton = YES;

Swift:

navigationItem.hidesBackButton = true



Related Topics



Leave a reply



Submit