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;
Related
I am working on an app that, when you first launch it, has a login screen that connects to a server. If you enter a valid username and password, this login screen goes away and you are taken to the main screen for this app.
The main screen gives you options of what to do, and it is assumed that you will not go back to the login screen again probably. Maybe 1% of people might log out of the app and go back to the login screen I guess.
Since I am not using a Navigation Controller to go from the login view to the main view, I have to use a modal segue, but it doesn't feel right to do so, as far as my knowledge of the theory behind modal segues. Am I crazy? Should I maybe just somehow use a Navigation Controller anyway?
I just feel this is not proper style, to use a modal segue to basically cover up the login screen, when it really isn't needed anymore.
You should have a home screen (main view controller) that displays the login screen modally on app start. Once login is complete you can dismiss the login screen and your app is running as usual.
It's extremely bad practice to leave a view controller running when it's unlikely to be used again.
Something going wrong badly due to Message Compose Screen.
I am working on a TabBar based application. In some screens I am showing ToolBar instead of tabBar by setting hidesBottomBarWhenPushed = YES; and its working fine everytime. But In 1 screen I am sending SMS by opening Message Compose Screen within the iphone App. So problem occurs if I open Message Compose Screen and i clicked Cancel button of Message Screen.
So, whenever going back to that module where I was showing ToolBar. So on click of button no ToolBar. Totally blank, no toolbar and no tabbar (tabbar is quite obvious i have already set hidesBottomBarWhenPushed).. But why toolbar now showing due to Compose screen ?
There is no link with compose screen to this screen. Far different implementation and different controllers.
I have check by debugging, Toolbar frame is also fine.
Please help
Issue fixed... had problem with adding it to keyframe window
I think it is because the MFMessageComposeViewController has got a navigation bar. Your application should be a navigation based application for that. Otherwise your toolbar's frame position will be affected. I had this kind of problem once. So i changed the application into navigation based but hid the navigation controller.
Hope this might help you,
Happy coding!
Anyone know why would I sometimes lose Navigation items when clicking to return to previous screen in UINavigationController app?
Background:
have a iPhone app using a UINavigationController and UITableViews
98% of the time things are fine, and if I'm on the detailed screen and click the "back" button things are find. The app takes you back to the main screen (pop's a view off the stack)
a small percentage of the time, and on the iPhone device itself, I click to go back, see some animation start, but I end up (a) on the same page, and (b) no navigation buttons or toolbar buttons appearing
from this state you can't do anything obviously and have to kill the app and re-start
Any ideas? How to fault find? (noting it's only occasionally when testing on an actual device I notice, and it may take hours/days before it does occur)
thanks
Add an alert in didReceiveMemoryWarning function of the viewController. The OS calls viewDidUnload on some memory warning (which don't usually happen in simulator).
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?
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.