New view based project in XCode
Go to main.xib and view.xib respectively
In each case set status bar to none in attributes section for view
Not sure why it still shows both on simulator and on platform?
Have looked for something in code, but don't see what else is calling this?
Anybody know how to turn the status bar off?
Thanks // :)
Figured it out...
Using Snow Leopard and the XCode 3.2, you simply edit the Apps Info.plist.
Right click the open Info.plist and add a row.
Select "Status Bar Style" from the drop down list. In the column to the right type in UIStatusBarHidden.
To affect this more dynamically this can be used instead:
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; should hide the status bar.
// :)
The status bar off in interface builder does not make it go away, use UIApplications - (void)setStatusBarHidden:(BOOL)hidden animated:(BOOL)animated here http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/setStatusBarHidden:animated:
Related
I've seen a few posts on here regarding this issue, and I've tried all the fixes, but I still can't seem to get this to work.
I have an iOS7 app which uses a Storyboard. The First view is a TableViewController. When I run the app, the status bar with the battery level and signal level seems to be showing over the top of the tableview.
I want the status bar to show, with the tableview directly underneath. Can anyone tell me how to do this?
Screenshot of the problem
Thanks y'all!
this is status bar issue.
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)
{
self.edgesForExtendedLayout=NO;
}
or
In your Appdelegate
if (SYSTEM_VERSION_LESS_THAN(#"7.0")) {
self.window=[[[UIApplication sharedApplication]delegate] window];
self.window.frame = CGRectMake(0,-20,self.window.frame.size.width,self.window.frame.size.height+20);
}
ios-7-uitableview-shows-under-status-bar
In a button click I am navigating the view to another xib which works fine in real iphone device, ipad iphone both emulators but not in real ipad. Here is my code :
-(IBAction)cardAnimation{
ViewController_ipad *view = [[ViewController_ipad alloc]initWithNibName:#"ViewController_ipad" bundle:nil];
[self.navigationController pushViewController:view animated:YES];
}
but one thing to be noticed that I have done NSLog in my destination class's viewdidload method and surprisingly that thing is being logged though that view is not being loaded at all by the above code. What can be the problem?
I think you have a MainWindow~ipad.xib file that is referenced through your AppDelegate and you also tried to alloc the Window in your didFinishLaunchingWithOptions: method in your AppDelegate file. For which there might be some problem occurred. Whenever you are trying to push your navigation controller, it is actually pushing, but not showing the next controller may be because of the Window over that controller.
It might solve your problem:
Go to your Project settings (not through File->Project Settings) by clicking on your Project at the left panel/navigator -> select your TARGET and go to Summary Tab -> scroll down to iPad deployment Info -> there you'll find the Main Interface option -> remove the name "MainWindow_iPad" and left it empty and save it. Run the application in your iPad and it will work fine.
Best of luck. :-)
N.B: Don't forget to clean your build and remove the application from your device before you go for the new build.
The iPhone simulator is case-insensitive for file names. The devices are case- sensitive. Check to make sure that your nib name isn't actually Viewcontroller_ipad or ViewController_iPad or another variation. This behavior once got me trying to use an image file in my app - it would work in the Simulator, not on device.
Try a fresh install (deleting the app), and if you are building from xcode hold Option and go to Product - > Clean Build Folder
Also are you naming your nibs with ~iphone and ~ipad?
I faced the same problem, i had problem with my iPad (iOS 5.1.1).
When i was pressing button but that was not responding.
That is because of i added UIGestureRecognizer on self.view.
I solved this problem by adding gestureRecognizer on my button. (its just trick not an proper solution, Just implement it if you did not find any other way.)
How do you get rid of the info bar displaying the battery, time, carrier, etc when running my app? Is it something I have to do using Objective-C, or is there an option within Interface Builder?
Go to your project info and add the key value:
Status bar initialy hidden. Set this on YES.
Or add this code to your app delegate:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
There is a way to turn it off in both Interface Builder and in code. It's usually referred to as the "status bar" in Apple's documentation.
Does anyone have an idea how Apple implemented the UITabBarController in the iOS Remote App (for controlling iTunes)?
Specifically, how the Remote will show a blacked out Tab Bar until the user selects an iTunes library (in a modal view), after which the tabs show "Songs," "Artists," etc.
Where would they have placed the logic to check that an iTunes library is selected and how do they blackout the tabs until it is?
Thanks
You basically can set the UITabBarItem's enabled property to false.
Like:
[tabBarItem setEnabled: NO]; // to disable
I have an app that I created as a Tab Bar Application, and there are 3 tabs (Home, Search, My Account). The Home view loads with some info and a search button. The search button then takes the user to the Search View, but since the user didn't select the tab the selected tab is still the Home tab. How do I change the selected tab from the Home to the Search once the Search viewDidLoad?
Thanks for the help, You guys helped me in the right direction I ended up using the App delegate to access the UITabBarController. This is what it looked like.
Motel_6AppDelegate *appDelegate = (Motel_6AppDelegate*) [[UIApplication sharedApplication] delegate];
[appDelegate.rootController setSelectedIndex:1];
Read the documentation. From within the search controller, you can call:
self.tabBarController.selectedViewController = self;
UITabBarController also has a selectedIndex property if that's more convenient for you. viewDidLoad is probably the wrong place to put this code in, though, as it might not be called every time the search controller is displayed. You should rather select the tab directly from inside the action that is called when the user taps the search button on the home screen.
Use tabBarController.selectedIndex = intIndex; // inyour case 1
use this code inside applicationDidLaunch
This snippet works for me within storyboards on iOS7 and Xcode 5.
- (IBAction)cancelButtonPressed:(id)sender
{
[self.tabBarController setSelectedIndex:1];
}