I copied iOS 7 sdk to xcode 4.6 sdks directory. Now I can set Base SDK to either iOS 6 or iOS 7. I can successfully run iOS 6 apps on
I am running an iOS 6 app on iOS 7 device using Xcode 4.6. Base SDK is set to 6.1.
Her is some code from AppDelegate:
navigationController = [[UINavigationController alloc] initWithRootViewController:mainViewController];
navigationController.navigationBarHidden = YES;
window.rootViewController = navigationController;
Now I have a strange problem on iOS 7 device that status bar doesn't show anything and its transparent.
Previously I installed another app on iOS 7 device with Base SDK set as 6.1, It was working perfectly but in that application NavigationBar wasn't hidden.
What I get when I run the app(the one whose code is above) it shows as this:
and
I have tried everything to make status bar solid but its not working. Navigation bar shown in these images is an image view and default navigation bar is hidden. I wonder how its working in another app of mine in which navigation bar is not hidden.
Please Help
Related
I have an app I was building for iOS 6 that I recently upgraded to iOS 7. I have a UIScrollView with a Custom UIView. Inside that, I have 4 custom UIViews. For some reason, these views show up fine on iOS 6, but iOS 7 they will not show them. I've tried: self.edgesForExtendedLayout = UIRectEdgeNone;
As I said, it shows up fine in iOS 6. What could I be doing wrong?
I am using xcode 5. when i was run app from xcode 5 for ios 6.1 simulator then scroll view doesn' see. for ios 7.0 simulator .Before it was working. I am using interface builder
You can see in following image.....
In ios 7.0 simulator it is working
In ios 6.1 simulator It is Totally white
![It is totally White][2]
In my scroll view view controller in viewDidLoad method i have write below code
[scrollView removeFromSuperview];
[self.view addSubview:scrollView];
When I comment above code then scrollview is visible For ios 6.1 simulator
![enter image description here][3]
Seriously I dont know what is the actual reason? is that above reason or not. In xcode 4.6 it was working .Also my app is live on appstore . Please help me .
Thanks in advance
Seems that You have issue with memory management or with position/size of scrollView. Try to set breakpoint and check what heppends with Your object.
#Kalpesh its simply because removeFromSuperview doesn't work in iOS 7. So your scrollView was not removed (if you had touched the screen it would have crashed). But [scrollView removeFromSuperView]; removed the scrollView in iOS 6 .
My app is compiled against iOS 6 SDK (haven't gotten the time to upgrade to iOS 7 SDK). So I just noticed that the Default image is overlapped by the status bar. This seems to happen only in the "multi-tasking" view but not when resuming my app from background for some reason.
See this image:
I don't think many people will notice this at all.
However, as far as I know you could possibly disable the Statusbar when the app gets in backround.
To do this just use this method in the delegate:
- (void)applicationWillResignActive:(UIApplication *)application {
//code to disable statusbar
}
In the applicationDidBecomeActive method you could enable the statusbar again.
- (void)applicationDidBecomeActive:(UIApplication *)application {
//code to enable the statusbar
}
Furthermore you can take a look at this previous asked question: Status bar won't disappear
If you got any questions feel free to ask!
edgesForExtendedLayout does the trick for iOS 7. However, if you build the app across iOS 7 SDK and deploy it in iOS 6, the navigation bar appears translucent and the views go beneath it. So, to fix it for both iOS 7 as well as for iOS 6 do this:
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
if ([self respondsToSelector:#selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone; // iOS 7
I started making updates to my app today. When I launch it in iOS Simulator (running xCode 4.6) the status bar is not visible during app launch (this is how I want it set, and how my app is setup in xCode) but then it is also not visible when I get to my Tab Bar Controller view and all my UIViewControllers (I have a tab based nav app).
The problem this creates is that the UIViewControllers, when displayed on a 4-inch display in iOS Simulator, it creates a small white space above the bottom Tab navigation bar (the height of which matches a status bar). I tried reverting my app to a previous backup but still can't get this fixed.
Help is appreciated. Thanks!
Using latest version of xCode (4.6)
iOS SDK 6.1
Try putting this when you want the status bar to reappear:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
Hope this solves it.
OK write this line: [[UIApplication sharedApplication]setStatusBarHidden:NO];
in your appdelegate.m class under this method: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions & then check.
I created an app in Xcode 4.1 and now i upgraded it to 4.2 so i could use the iPhone 5 simulator.
I have an app that uses a tab bar to loads 3 views. They load correctly in iPhone 4 but in iPhone 5 simulator that doesn´t happen. I´m able to see my xib (with no content) that i load initially, but there are no tabs to choose from.
Apple made some changes in the projects in Xcode 4.2. Now they have storyboards which i don´t have because i created the app in Xcode 4.1. Anyone knows a work-around this?
The only code i think it may be usefull..
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[window addSubview:montraViewController.view];
[self.window makeKeyAndVisible];
return YES;
}
I was loading the view in viewDidAppear, that method was triggered when the view appeared in iOS 4 but in iOS 5 that didn´t happen. So i changed my "load controls" to the method viewDidLoad and they loaded correctly. Don´t take this has a bug, because it´s more probable to be bad programing.