Domanda

Is there a way to hide clock(time) from UIStatusBar?StatusBar without clock

È stato utile?

Soluzione

No this is not possible in the current iOS SDK.

Altri suggerimenti

Not possible with public API. It is possible to fake it, but it is likely you will get banned for modifying a behavior that the user is accustomed to.

If you are feeling adventurous, you can create a UIWindow with the size of the clock, set its background to the color of the background, set its level to UIWindowLevelStatusBar + 1 and display it. It will be on top of the status bar, hiding the status bar clock.

Access the UIWindow. You should get it from the AppDelegate. Acesss its subviews and find the Status bar. Within the status bar's subviews identify the clock. Then add a solid white subview to the clock using the clock's bounds as frame.

Frankly, I never did that myself but accessed the network indicator, which follows pretty much the same logic just without adding a subview.

I would not remove the clock view element. Alternatively I might try hiding it or assigning alpha=0 or so.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top