I have an app where i have set the status bar to be hidden, in the plist.
At first all looks fine, but then in one place in my app i use presentModalViewController to show another view. (this view is to show the twitter login screen)
When i get out of the view (twitter login screen) and i get back in my app all my views move up.
After reading a lot i know its because all the views think that the status bar is hidden and we should move up 20 pixels, but i have already accounted for the status bar being hidden and i dont want the views to move up.
Is there any way i can fix this?
Related
I want to create an app where there is a login screen, and when user logs in open up home page with tab bar controller.
I have created a single view application and have created login screen, home screen and a tab bar on it.
In tab bar delegate, I am adding screens to tab bar by [self.view addSubView firstView.view]
My problem is if I open up 4th tab, and switch to 2nd tab and I have to go back to home screen, so I press home btw on nav bar, it shows view 4 which is already on stack of uiviews.
How do I switch between all tab bar views and add navigation to them ? Which ideal method is to be used?
I've created app that is doing what you need (I guess). You can find it in app store for iphone using name Torchoo. It is free and there is test account so you can see how it works and if its really what you need. If yes, ping me here I will show you the sources and how I did it.
In couple of words, you need normal tabbar controller that has number of navigation controllers and each of them has number of view controllers. And login screen is just a modal view that shows/hides when you need it. Most of things may be done in storyboard.
I don't get it actually but i think you want to attach all the view by navigation controller.
But it's useless. if you want to use navigation bar then it ll navigate in another view but tabbar will give you different views on every tab.
so, first see the use of both of them then ask....
I have an app that is similar to the photos app in that when a picture is displayed, it takes up the full 320x480 of the screen. Also like the photos app, when the user taps the screen, the status bar / nav bar fade out to provide extra space. Everything works fine, except I noticed one weird glitch. If I push the home button to exit the app (when the status bar / nav bar invisible), and then I push the apps logo to reenter the app, when the app reopens, the application frame gets screwed up, and the view that holds my picture gets pushed down 20 pixels (seemingly to make way for the status bar). Like I've said, it all works fine when I'm switching between views in my app, but when I push the home button to exit out, it messes up. Anyone ever have this problem before?
Perhaps you have to re-set your interface code in this App delegate method:
(void)applicationDidBecomeActive:(UIApplication )application {
/
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
In viewDidAppear method try the following :
self.navigationController.navigationBarHidden = TRUE;
I'm wondering if it is possible to start my app with all my tabs in the "up" state and show a "landing" view to the user. Kind of like a welcome/quick start. When they select one of the tabs, it switches views as normal.
Will you point me in the right direction?
Kind of like this:
If you're using a UITabBar/UITabBarController, I think you must have the selectedIndex set to some legal value. I don't think this is possible, nor can I find an app on my iPhone or iPod that mimics the behaviour you're looking for.
(The App Store app is as close as it gets, where it looks like it has an empty tab bar before it loads data from the Internet, but it could very well be that they are just re-using the Default.png and superimposing an activity indicator during loading.)
Note that if you tried to submit your app to Apple, they could easily reject it for using non-standard UI.
The way I would probably do this is to create a new ViewController that's just for this screen, but make sure it's last in the viewControllers array managed by the UITabBarController. That way, when you show the tab bar on the screen, you get the 4 tabs and the more button, but the currently selected view controller is not in the bar, meaning that all of the other tabs are unselected.
Once the user has satisfied the condition for showing the screen, you can discretely remove the view controller from the tab bar, and the user will never be the wiser.
I'm in the process of making an app that has a UITabBar at the bottom of it. I want to make an "Enter screen." Basically, when the app starts up, right now the enter screen appears, but the tab bar still shows at the bottom. So if the user presses a tab on the tabbar..and then goes back to the first screen, the enter button is still there. Anybody know a good way around this? I was gonna try to have it so that if the user selected another tab, the enter screen would just go away. Either that or just to have a full screen view over everything and then when enter is pressed, have it close to full screen view. Although, I don't really know how to go about doing either of those. Any ideas?
Chris
You can use the method -viewWillAppear on your UIViewController subclass to hide your enter screen. It is called every time a tab is selected, on the new tab, just before it is displayed.
If I understand correctly... you just want a title screen when your app starts up that never shows again during that session?
If so, just create a file that is a 320x480 image of what you want the screen to look like... save it as a PNG, and name it Default.png.
This image will be shown while your app is loading, and then will disappear when your app is ready to go. No tab bar will show, and you won't need to mess with disposing of any extra ViewControllers.
I'm developing an iPhone app that switches from a table view to a landscape fullscreen view (similar to the YouTube app). When it does so, I want to hide the status bar, then display it again when switching back to the table view. I'm using setStatusBarHidden but that just seems to hide the status bar wihout enlarging the screen area; there's still a blank bar where the status bar was. If set the hidden status bar property in Info.plist then I get the enlarged screen area but when the status bar displays it overlays the view.
How do I hide the status bar in such a way that the full screen is available to my view when it's hidden and only the screen under the status bar when it's displayed?
TIA.
Craig
PS: I copy/edit this question from app discussion. do not find good solution
http://discussions.apple.com/thread.jspa?threadID=1580662&start=15&tstart=0
Your view controller should have wantsFullScreenLayout set to YES, as well as hiding the status bar: See UIViewController reference.
If there is anyone looking for a solution where the above solution does not work (and there is still an annoying blue 20px gap at the top), try putting this in the viewWillAppear on the implementation file of the view controller that you would like the status bar to be hidden.
self.navigationController.navigationBar.frame = CGRectOffset(self.navigationController.navigationBar.frame, 0.0, -20.0);
That literally took me 12 hours or so to fix, and that was the solution, so now i'm spreading the word in case anyone else has this annoying issue.