When running my app via the iPhone Simulator / Xcode, the tab bar color is black. However, when I moved the app onto my iPhone for testing, the tab bar turned white. I looked for someone with a similar experience via Google / Stack Overflow, but I couldn't find any answers.
Any suggestions?
EDIT - My Tab Bar icons have a clear background. As i mentioned before the color is black in the simulator, but white on my phone. Do i need to color in the background of my icons?
EDIT 2 - I actually went into Interface Builder and found out that the tabbar default color was white. I still cant figure out why it showed up as black in the simulator but thanks for your help!
When running in the iPhone Simulator, you are only "simulating" the style of the device's status bar. The simulated setting for this can be found in the Interface Builder portion of Xcode 4 or in Interface Builder.app bundled with Xcode3 – look for the "Simulated Metrics" section of the Attributes inspector when you have your UIViewController selected.
Since the setting in Interface Builder only simulates the status bar style, you need to set it explicitly in your application code. This is done with the setStatusBarStyle:animated: method of the UIApplication class:
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque
animated:NO];
See the UIApplication Class Reference page for more information.
Related
I am using Swift 5, testing on a 4K Apple TV.
I am using the UISearchController without subclassing. I am trying to display a white search bar and keyboard on a dark background. So I set:
self.searchController.searchBar.keyboardAppearance = .dark
(I've tried this in viewDidLoad, viewWillAppear and viewDidAppear)
This creates a search bar and keyboard that looks like:
Then if I hit the menu button to leave my app and go back to the Apple TV home page and resume the app it changes the keyboard bar black:
Any ideas what is going on here?
(Note: When running this on the Simulator in Xcode the search bar stays white after backgrounding, I don't know why but it only seems to happen on actual Apple TVs)
This is a bit of a strange one, but basically I am having a problem whereby the xib size of my initial view controller seems to be longer than the screen.
So, if you have an ad banner set to be on the bottom of the screen... If I run the app in simulator, it does not show on iPhone 3GS/4/4S devices, yet WILL show on the iPhone 5.
I have tried changing the xib size settings, I even created a new xib file, but the same problem is occuring which leads me to believe it is hardcoded somewhere, but I cannot think where to look for this.
It is basically like it thinks the bottom of the screen is about 30-50px more than what it actually is... Hence why the iPhone5 displays ok as it has the taller screen.
Any help would be appreciated!
Its bcoz of the StatusBar. It reserve 20px of screen . You can remove this space by do change in Status bar is initially hidden in plist and set status bar to NONE in IB.
The iPhone 5 has a taller screen. The most flexible way to lay out your xib is via AutoLayout. Here is a tutorial to get you started:
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2
Basically, you want the ad banner to be contrained to the bottom of the view.
I am developing iPhone app for iOS 5 or above version, and making use of storyboard for UI design. My problem is when i am on phone call my UI gets misaligned because my upper status bar is taking 20 to 30 pixel of screen space.
How to handle my UI when i am on phone call?
I finally got answer for my question. Following are the things i made changes in my project and everything started working fine.
Took sliced images of all the things needed in my UI. (Initially
i was taking common image to save slicing time)
Made you of autoResizingMask property. It help me save my lots of time. Just make sure only 3 arrows top, left and right one is in ON state and your work is over.
For making everyones search easy i will add following Stackoverflow links to save your time
How to position view below green bar during phone call?
Resize for in-call status bar?
How do I detect a double-height status bar?
How to Remove Status Bar in "View Based Application" - iOS
how to hide status bar in Iphone application
How In-Call status bar impacts UIViewController's view size ? (and how to handle it properly)
iPhone Programming In Call Status Bar
resize content after iPhone status bar is shown/hidden
How to programmatically get iOS status bar height
How is the in-call status bar impacting my CGAffineTransform'd view?
View resize when In-Call Status Bar changes
Thanks to all the people who have replied to all the questions above. It made my big problem resolved.
As asked in the title,
My Default.png is displayed below status bar region.
Status bar area is blacked out.
How can I make the default.png to be shown in true full screen.
edit
It's not duplicate question as the ones linked.
"Status bar is initially hidden" is checked in my info.plist already.
I don't see status bar, just the area where status bar resides appear black when default.png loads.
I must add I see this happening in iphone 3g with ios 3.1.2, other devices I tested works fine.
when the app is designed for iOS7 with Xcode5, just select the option:Target->[Your App Name]->General->DeployMent Info->Hide during application launch.It's perfect for iOS7,but if you want to fit with iOS6,it's necessary for you to add the code behind in the method :
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
the code is:
application.statusBarHidden = NO;
Is it possible to customise the top bar of an iPhone application (not a website)? If so, how can I change the background colour to orange?
If you are talking about the very top bar (with the wifi-strength etc) then it's impossible following the AppStore-rules. You can change it to black only.
It's however possible with various jailbreak-tools, but then you can't publish your app to app store.
So, I'm guessing here you could be talking about a UINavigationBar or a UIToolBar, but that doesn't really matter because yes, you can change the colour of either.
In Interface Builder, select the UINavigationBar (or UIToolBar) and under properties look at "tint". This will be set to "default" initially. You can then pick any colour (even orange!) as the tint colour, and there you go!
You can do so by using the tintColor property of the navigation bar.
I have implemented and checked it. its working.
self.navigationController.navigationBar.tintColor=[UIColor orangeColor];
hAPPY cODING...