UIImageView displays white in place of the status bar - iphone

I have set the statusbar to unspecified in IB.
On the app start up the space where the status bar was is white, not allowing my image to fill the screen.
When I return to that View after selecting back from another view. The image is full and he white bar is gone.
Do I have to set the status bar to hidden in the code as well as in IB, or is that set in the info.plist file?

try adding UIStatusBarHidden to info.plist set it to bool en enable it..

Related

How to make transparent navigate bar with Table View Cell

I faced with the Table View Cells issue. If I choose default View Controller settings, cells are located under transparent navigation Bar. This is unacceptable because bars items overlap the cell.
navigation bar overload the tableView
If I changing Extend Edges setting at the tab on the right side, specifically "Under Top Bars", cells as expected are located under bar, but in this case NavigateBar is black.
navigation Bar is black
As you see I tried to fix that issue with the Simulated Metrics, but nothing is chanced. Also self.navigationController?.navigationBar.isTranslucent = true and self.navigationController?.view.backgroundColor = .clear in viewDidLoad method did't give any result. I able to color navigation Bar, but i need it transparent. Any ideas?
I guess you haven't set a background color to the ViewController's view. That's why it's appearing black.
Try adding the background color you want and it should work as expected.

How to add a titlebar to a popover

I'm trying to replicate the appearance of the (no longer functional) Degrees app, but I can't figure out the components used to make the title bar (highlighted here in red).
I've managed to get my app running as a menu bar agent, and I've wired up a popover to display a window view on click. But it's not quite right: my window's title bar disappears when in the popover, and the bar used in the Degrees app is wider than the one provided by the stock window control.
How might I mimic the appearance here? it just an ImageView?
Popover's don't show window title bar's as you've discovered.
Just add an NSView at the top of your window view and add a label for the title and a button for the "Done" button to create your top bar with desired height. Then add a horizontal line to the bottom of this title view and programmatically set the background color of its layer to whatever you desire. Offset all your other views by that bar height.
Basically:
[Window]
[View]
[View (Title Parent)]
[NSTextField]
[NSButton]
[Horizontal Line]
[Other Views]
For getting the gray background, in your NSWindowController windowDidLoad,
self.titleParentView.wantsLayer = YES
self.titleParentView.layer.backgroundColor = [NSColor grayColor].CGColor;
where titleParentView is an IBOutlet connected to the view you created above in the xib/storyboard

Swift / Set a white background on back button on navigation bar

After a lot of research, i have to resign...
I'm working on Xcode7, and swift.
I have a transparent navigation bar, so when i'm scrolling on the viewcontroller (a map), i would like the back button be more visible, so with a white opaque background.
Any idea to perform that ?
Maybe, just to insert an image as back button.
In your main.storyboard file, click anywhere in the storyboard that is not a viewcontroller, so in the white space. Then in the file inspector, there is property Global Tint that will change the back bar text color. I've looked around for other ways to change it, such as changing the back buttons text color programmatically, and none seem to work. Hope that helps.

how to resize window with status bar in landscape mode

I have a window that is in landscape mode. I have shifted my statusbar in landscape mode but the area where my statusbar was is still left white. I need to remove my window so that the area is filled. Can anyone help?
If you're using Interface Builder, set the Status Bar attribute to None in your view (under Simulated Metrics in the Inspector), and it will stop believing it has a status bar. I don't know if this is the specific problem you're having without further information, but this has been the cause of white status bar areas for me in the past.

How to set the Transparent statusbar in iphone

In my application i want to set the statusbar transparent.There are three styles are possible for changing the style of the statusbar.
gray
black
black translucent
mycode:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
How to set the transparent statusbar?
The best solution for this problem is to set self.wantsFullScreenLayout = YES; in your view controller and [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; for your status bar.
UPDATE:
As Mihir Oza told in comments the UIStatusBarStyleBlackTranslucent constant from old version of my answer is now deprecated. Use UIStatusBarStyleLightContent instead.
For the global app in the info.plist add Status bar style: Transparent Black Style (alpha 0.5).
The best way of doing this is with info.plist. Have a look at Apple's UIKit pList keys, specifically UIStatusBarStyle (and the value UIStatusBarStyleBlackTranslucent) for making it translucent, or the UIStatusBarHidden key (for hiding it totally).
It's not possible to make the status bar transparent. There are only 3 possible styles (gray, black and black translucent) you can set and you cannot get the bar's UIView.
However if you have static content behind it (i.e. a fixed part of your UI that you can edit) you can set the status bar to black translucent and add a 50% white layer just behind the bar. This makes the bar appear to be transparent.
Here's an example of what I mean.
See an example http://cl.ly/7WST/Untitled-1.png
In the info.plist set status bar style Transparent black style (alpha of 0.5).
In viewcontroller.xib set size fullscreen and status bar none.
In viewcontroller.m add following codes in viewWillAppear:
self.view.frame = CGRectMake(0,0,320,480);
This worked for me.
You can only hide the status bar using Status bar is initially hidden property in your info.plist