Making the tab bar scrollable in iphone? - iphone

I have an Iphone application in which I had 10 tab items in the tab bar.
I don't want to add the more button behaviour of the tab bar here.
Instead of that I need to make my tab bar as scrollable.
Can anybody had the idea or links to illustrate this?
Can anybody guide me in the right direction?

But You can not use the UITabbar. You need to create custom UITabbar that behave the same.
Here are links of some projects will help you more.
Infinte Tab Bar
Scrollable Tab Bar

Have you tried looking here?
How to make a horizontal scrollable UITabBar in iOS?
Although, and this is the reason im not writing a comment, i would not use a scrollview, as described in the accepted answer. Instead, i would go for a uipickerview, and rotate it 90 degrees using CGAffineTransformRotate. Let me know if this works.

1) define UIScrollview *scrollview
2) drag and drop scroll view
3) connect instance and delegate in xib
4) set frame of scrollview more so it is scrollable and more than view size
5) add uitabbar as subview to scrollview
[uitabar instance addsubview:scrollview];

Related

swift programming - storyboard how to add more buttons on a viewcontroller

Hi I'm new to iphone programming and I'm having problem with scrolling on the storyboard. Let's say I need to add 30 buttons on a viewcontroller inside a scrollview, but the screen size only fits 15, how do I scroll down and add more buttons.
screen shot 1
Another problem I have is that when I run the iphone app on the simulator, it can only scroll down too the button 13 even though there are 15 buttons on my view controller.
screen shot 2
Thanks for your help.
you can scroll the scrollView on the storyboard. Scroll down and then add buttons.
You need to set a size appropriate for Scroll ContentSize. Take a note at that.
Please do provide more info from. Its gonna make the resolution process easy.
Take a look at this link for solid ScrollView intro:
http://www.raywenderlich.com/76436/use-uiscrollview-scroll-zoom-content-swift
In the storyboard... Just make the view bigger. In your case, you want to change the height:
For the problem of not being able to scroll across all your images. You need to make sure the scroll view is pinned to all four sides of the parent view and that the height and width are all set-up for the content inside the scroll view. (make sure there are no warnings associated with the scroll view in the storyboard.)

How to add an image view sharing between navigation bar and view?

I had to add an image so that half of it is in the navigation bar and remaining is in the view.I know there is always a probability of adding two images,but i want to know is there any way to add an image view(only one)between the two?Now i know i can do this way ,
[self.navigationController.navigationBar addSubview:imageView];
and also self.view addSubview:imageView,but i need a single image view to be shared between the two
ie the first half is in navigation bar and the remaning is in the view.can anybody help me on this?
No, this is not possible AFAIK. A view (including a UIImageView) can only have one superview. SO it's either a child of the UINavigationBar or one of the other view, but not both.
with ios 7 you can use translucent navigations bars so that you can set the imageview in your view and it shines through the navbar :-)

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.

How to set a custom UIToolBar always in the front and top of the application?

I've been stuck with this for a while now. Im trying to put a custom toolbar always in the front of my iPad application (in the front of other views), however im not sure how to tell the UIApplicationDelegate to establish it as the parent view.
I tried using a navigation controller but i need it stuck always in the top and i couldn't get rid of the transition animation when changing views.
Any help will be appreciated. Thanks!
You have to set that custom toolbar in main window or add that toolbar programmatically as a subview in your window,
and after that in all your child view controller set view size,
For example if your toolbar has height of 50px that the X position of your all child view must be start with 50px.
This approach is works for me,
Hope it will help you also.

White space after moving uitabbar to the top

I use UINavigationcontroller inside UITabBarController and I have moved the UITabBar to the top .The UITabBar has moved successfully but the problem is, there is about 50px of white space where the tab bar used to be .
Anyone has a solution to this problem????
loop through the subviews of the tabbarcontroller.view until you find the container for the tabbar's inner views, then set the frame of that view to 50px higher than it currently is.
Alternatively, a better solution is not to try and use a tabbarcontroller this way. Just use a standalone UITabBar and implement your own view swapping logic when the tabs are tapped.
Uncheck extended edges in rectangle.