How to allow UIView lie under status bar in iOS 10? - styles

How to allow UIView lie under status bar like on the picture below?

Originally answered here.
If you're using Safe Area Layout Guides you can do this completely in Interface Builder.
Pin the view you want under the status bar to the main view using the Top Space to Container Margin constraint instead of Top Space to Safe Area constraint.
Then on the Size Inspector for the main view, uncheck Safe Area Relative Margins.

Just make sure that you've set your top space constraint equals 0 to your superview, not to the Bottom Layout Guide in the Storyboard.
In order to make status bar style like in the screenshot (white text, transparent background) you may want to set it's style to .lightContent.

You can set the status bar style to light content.
1. Add this key-val to your .Plist.
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
2. In your App Delegate class, add the following to didFinishLaunch method.
UIApplication.shared.statusBarStyle = .lightContent
Here are the relevant link.

Related

How do I change the color of the navigation bar icons? (Android studio)

To avoid confusion as to what the navigationbaractually is, here's a
As you can see, I've added a new color instead of the standard black color using:
<item name="android:navigationBarColor">#color/colorBackground</item>
But the icons are barely visible now, so I would like to change them into being black, or at least darker. I have searched SO and the webb but came up empty handed. Any ideas?
You cannot change the color of the buttons yourself.
However you can try to set the navigationbarlight to true. It should be noted that this is only available from API level 27.
windowLightNavigationBar
added in API level 27
int windowLightNavigationBar
If set, the navigation bar will be drawn such that it is compatible
with a light navigation bar background.
For this to take effect, the window must be drawing the system bar
backgrounds with windowDrawsSystemBarBackgrounds and the navigation
bar must not have been requested to be translucent with
windowTranslucentNavigation. Corresponds to setting
SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR on the decor view.
May be a boolean value, such as "true" or "false".
source

In Fusion 360, how can I get a view which shows hollow areas?

For instance, I have a body with a hollow area which is not visible from the outside. What's a good way to view the whole body, visualizing all of the surfaces, especially when there are voids within the body? Is changing the opacity the only way? I was hoping there would be a wireframe view, but I haven't been able to find a way to toggle one, if it exists.
Also, to change the opacity, I have to turn the body into a component. Is there a way to do this without having to make a permanent modification like that?
Another way I've found is to use Section Analysis to see a cross section, but that's not great for getting a view of everything at once.
At the bottom of the view, there is a toolbar. Click on the monitor icon, then choose Visual Style, Wireframe in the menu:
Wireframe with Hidden Edges should be the most appropriate in your case.

Android : part of the layout transparent

I have a zone in my layout that I want to be transparent, while the rest of the layout has a black or an image in the background (kinda like a window effect). Is it possible in android?
Edit : Someone asked, so here is what Im trying to do :
The red part is supposed to be transparent, and there will be a movable widget in its place. The point is that when the widget move, what's behind the application appears.
Here is a link on how to create a transparent Activity.
After creating a transparent activity, make sure that every other component that you add to the xml (except for the zone you want to leave transparent) are opaque. (i.e. have their backgrounds set).

Can I use an image instead of a title in an Apple Watch app?

How can I put an icon in the top left label and make fullscreen? Apple allocates some space on top for the digital clock and back label. I would like to customize it, but I can't find anything in the SDK to enable this.
The top strip of the Watch screen is reserved for displaying the page title, or occasionally links such as "Cancel" by default for modal views, and the clock. It is not possible to hide this.
It is possible to set an empty title for a page. Some settings will alsoplace a background image behind this text (if you set the mode to 'Aspect Fill', at least in the current Xcode 6.2 beta 3). However, the portion of the image at the top of the screen is simply occluded by a black strip, so this does not achieve what you want.
Additionally, Apple have specifically recommended against displaying logos on the Apple Watch screen, with the rationale that the screen is too small to display for the user anything but actual content.
To set the Global tint:
Select the Interface Controller itself in Interface Builder by clicking on the Yellow circle at the top of the view of the screen.
Press Cmd-Opt-1 to display the File Inspector section of the Utilites on the right hand side.
Set the 'Global Tint' option in the section 'Interface Builder Document', as per the screenshot.
Not possible in the first cut but I think it will come later.
It's not actually a back label. The text in the top left of the Watch screen is the title of the current WKInterfaceController. You can change it by using -[WKInterfaceTitle setTitle:], but you are limited to content that is expressible in an NSString (so no UIImages).
It is possible to customise the status bar in watchOS 4.
Select your interface controller in the storyboard
Open the attributes inspector
Check the Full Screen checkbox
After doing this you can add your custom image to the left of the statusbar.

Status bar color on ios7

My question would be that how can you set the status bar to a default color in ios7. (Like in the latest update of Facebook and Twitter app)
Thanks a lot!
The status bar doesn't have a color - it's transparent. The color you are seeing in the new Facebook app is the navigation bar that has been extended under the status bar. In iOS 7 your status bar can be transparent with white text, transparent with black text, or opaque (black). It can't be tinted, but you can give the illusion of a tint by extending your navigation bar.
iOS 7 introduces the concept of extendable view edges to allow for this sort of thing. You might want to review the UI transition guide or UIViewController documentation for more information.
It looks like you can assign a background image to the navigation bar and whatever alpha/ opacity that image has, will be picked up by the status bar.
Create your image 640x128 and whatever colour/pattern you want.
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:#"image.png"] forBarMetrics:UIBarMetricsDefault];
This will make the picture the background of the navigation bar and the status bar.

Resources