In fact, the screen area where the tab bar was before, now is not accessible. If I add something on to that area, it just got cropped.
I tried setFrame to 320x480 but it won't help
please help
The best I can tell, and I have done considerable research, is that you cannot go full screen when you have a tabBar without playing a lot of tricks with the view hierarchy. Assuming the view hierarchy is dangerous because Apple may change it in a future revision. In my case I wrote my own tabBar replacement.
Related
I've got a storyboard-driven application, and I'm trying to modify it to support the iPhone 5.
There is a navigation controller, and then my menuViewController. In viewDidLoad of the menu controller, I have verified that self.view.frame is {{0, 0}, {320, 568}}. The view controller's size is set to "Inferred" in the Simulated Metrics, and the main view has "Autoresize Subviews" checked.
But my subviews are not getting resized! (Note that I can manually resize them in code, that's not a problem, but I would really like this to "work" using mostly IB, since I have a lot of views, and that would be about a million times easier.)
I have a full-screen subview that doesn't get resized. It's mask has basically everything enabled.
I also have subviews that are supposed to float at either the bottom or the top, and the ones that float at the top work, but the ones that are supposed to float at the bottom don't.
What should I be checking here? It's probably something stupid that i'm missing, but I've been scratching my head for an hour, and am getting close to just changing all my frames in code. (Which would be ugly as well as inelegant.)
Thanks!
I found a hint here: How to resize App for Iphone 5?
Essentially one of the answers there suggests editing the xml of the storyboard directly. I went in and looked, and the top level view in my viewController had autoresizesSubviews="NO" I changed it to YES, and that fixed the problem for me.
As stated in my original post, I absolutely know for sure that checkbox was checked in the inspector pane. I have no idea why the xml didn't match the inspector.
Check the springs in the autoresize control for your view (not the view controller) within the metrics pane. Try and make them like in the picture below.
Notice that you will not be able to set the internal springs for a top-level view object (but that's fine: just ensure the 4 side ticks are all activated).
Hope this helps.
I am having some slight issue and trying to fix it but can't find the easiest answer towards it. I have a navigation bar, which is taking top pixels away, and hence the webview content last 44 px if I am not wrong goes under the bounce and hides the content. Hence the problem is that I have a submit button, and since it needs to be clicked, it goes under the bounce condition and doesn't let me select the button. Any quick solution to this problem will be appreciate.
Thanks
Make sure your UIWebView has the autoresizingMask set to be flexible in height and width. You can do that in interface builder or in code.
You can set the bottom content insets to 44. But it seems your view is not put correctly (web view size does not take navigation bar into account, web view is not resized properly, etc.) I would fix that instead of patching with the insets fix.
I'm really scratching my head over this one: When I make visible the Toolbar of the navcontroller in my view hierarchy, strange black bars appear at the top and bottom of the table view. http://grab.by/8pgz
The app is universal, and on the iPhone simulator (or device) this does not show up, although they use the same UITableViewController subclass.
I cannot even figure out what the extra bars are, which makes it even harder to come up with a solution.
They are, however, not navbar / toolbar. They are not section or table view header / footer. It does not merely seem to be a resizing of the table view either, since its background is not black.
The custom table view controller sits inside a UINavigationController, which in turn is inside a UISplitViewController. Pretty standard, as far as I understand.
Like said, they do not show up on the phone - nor do they appear in the popover in portrait orientation.
I'm really out of clues here. Any suggestions would be most welcome.
Cheers,
Gregor
Sweden
Update: Problem solved by moving the code for making toolbar visible to -(void)awakeFromNib method instead of -(void)viewDidLoad. Still don't know what went wrong, but now at least it works.
I believe there is a problem with the frame you're trying to use to initialize the tableView.
myTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, height, width);
Try changing the height width variables in code, to reflect your height & width on the iPad.
Is there any way to display an image infront of the navigation bar?
I know this is a little bit messy - but its just an asthetic thing. The imageview takes up more height than the view and therefore needs to overlap the navigation bar a little bit.
Is this possible at all? It must be. :)
Thank you
sure, just have the image on a view that is on top of the navigation controller view and you can put it wherever you like. It is however probably aesthetically unpleasing, and more likely than not frowned upon by the Apple Human Interface Guidelines.
If your content is big enough that you need the space where the nav bar is, but you still need the nav bar to be present, how about making it transparent? (See, for example, the built-in Photos app.)
But, in general, UIKit views don't clip their contents. So if your view draws outside of its bounds, that will layer on to of whatever views are below it.
Building an iPad app. I have a button on my main view that I want to launch a help window. The help window is fairly involved and has its own xib/controller. I resized the help window's XIB and saved it. I instantiated it and added it to the application controller's views as a modal. For some reason this window is still taking up the entire screen.
What I really want to do is have a "view" that's maybe 70% of the width and height that lays over the normal view as a modal. How is this accomplished normally? I want it to require that they hit a button to close it.
Thanks
You could also try placing your UIView into another UIView that actually takes up the entire screen, but has a backgroundColor = [UIColor clearColor].
Modal view controllers are really intended to take up the entire screen, as Apple's description states "Modal view controllers are a tool that you have at your disposal for displaying a new screen’s worth of content" (http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html).