iphone TabBarController, how to resize it to height? - iphone

any one know how to resize the TabBar? i want make it 80px height for use my custom background and buttons,and make it more beautiful.
thank you

Don't do it. Why waste extra pixels for a tab bar? Users would much rather have more room for the content. Scale your background and buttons appropriately to fit its current height.

You can't do this with Apple's tab bar. But you could make your own custom tab bar, which is what some other applications do.

Related

How to make tableview's content displayed under a transparent navigation bar?

How to make tableview's content displayed under a transparent navigation bar?
Like this:In "Photos" app, albums displayed under navigation bar.
Special thanks
If you use _rootNavigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; then set correct tableview frame thats it. If you are in xib dont forget to simulate the translucent navigation bar.
One way I have found to accomplish this is by shifting your tableview's superview up to have the origin at {0, 0}. However after researching more several people have said altering the superview (UIViewControllerWrapperView) is a bad idea. However I also have not found any information on why just changing the frame would create problems. I am shifting the superview right now and haven't found any problems related to it yet.
Might be you can set it like this:
[navigationBar setAlpha:0.5f];
For making the navigation bar transparent alone, you can check this post, How to make a Navigation bar transparent and fade out like in the photo app in the iPhone
Also check this How to set the transparency color for Toolbar and Navigation bar using MonoTouch?
I am not sure whether you can add the table view behind the navigation bar. You might have to add it as a subview of self.parentViewController.view.
Another way to do this is by hiding navigation bar and using a transparent tool bar in place of that. This can be added on top of the current view. The only problem is with the back button. You might have to use custom button for that.

Navigation bar and UIWebview

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.

Why do my UIImageviews get resized/dimmed when using UINavigation/UITabbar controller

I have an app with a primary view that has a UITabBarController with 5 tabs. Each tab is a UINavigationController.
In interface builder, I'm customizing the background of each page by dragging a UIImageView and setting it fullscreen. The image I'm setting to the view is 640x960. I am setting it to be Aspect Fill.
However, what I've noticed is that it is not where I would expect it to be. When navigating between by tabs, the image seems to be shifted down from where it should be.
Also, when pushing a new view to the navigation controller, the background of this new view isn't offset in the same way as the tabbar one, and it is also slightly dimmed.
How can I set my UIImageViews on each page to be aspect correct and fill the screen 1:1? Also, how does one disable the dimming when pushing a view to the navigation controller?
Thanks for any tips, and apologies if this is covered in another thread, I couldn't find an answer searching the site.
Assuming that you are using the IB to setup your views, you should select navbar/tabbar options to reflect what will be on the actual page. That should place your image correctly. I would also recommend that you make both a low res and hi res version of your background images -- 320x480 and 640x960. Of course, your size may need to be adjusted (reduced) for the navbar and/or tabbar which will leave less than 960 px of vertical height -- probably more like 920px if you are in portrait mode. Then you add #2x to the base name of the hi res version, this would account for older iPhone screens.
Once you have the image placed correctly, resizing should be unnecessary. You can have the image automatically resize width and height using the little arrows on the layout page -- that's a bit hard to describe. It can also be done in code -- if you still need that I can provide a sample.
Maybe you need to set all AutoresizingMask in order to resize the UIImageView properly on each view. And to main aspect ratio u should use either AspectFill or AspectFit on the contentMode.

UIImageView display in front of navigation bar?

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.

UIScrollView Indicator Bar

I was looking at the Apple docs for UIScrollView and saw that the constants for UIScrollView Indicator bars are "default", "black", and "white". I was thinking about using a scrollView without showing the indicator bar on the side of view. I have a very specific case and the bar is making it look awkward and actually seems to be distracting because of it.
If I have a black background and use a black bar I think this would hide it well. Is there a way to turn it off or move it off screen?
Has anyone done this without Apple rejecting it? Or is this a violation of the HIG in some way?
You can hide scrolling indicators if you want - see showsHorizontalScrollIndicator and showsVerticalScrollIndicator properties in UIScrollView. You can set them in IB as well.
UIScrollView has a couple of properties to disable the scroll indicators. Those are:
showsVerticalScrollIndicator
showsHorizontalScrollIndicator
Set them to NO, either in code or IB, to disable the indicators.