How to make a tab bar that shows colored icons , on iOS? - objective-c

I need to make a toolbar on the bottom of the screen with some buttons. I want in every button to have a small image and a small text under it. The closest i can find from "Xcode" is the "Tab Bar" where you can put icons and text but the problem is that when you add an image you can only see the shadow of the image and not its colors.. Can i change that? Or is another way to make a toolbar like the one i am describing?
EDIT
I need the buttons to change controllers and i just noticed that i cant create actions for the tabs but only outlets. So i guess the tab bar is not what i should use. Any ideas for a toolbar?

Yes Tab Bar is the Best approach for it and it is very easy to customize the tab bar if u are using IO5
This LINK will be helpful.
There is another approach (which was applicable uptil IOS4 for customization of Tab bar) was to Create Custom buttons with tab bar look alike Images. it will give u the same feel, but like i said it is very easy now to customize IOS Tab bars
Here is a couple of Links for u
LINK 1 With Story BOARD
LINK 2 Without Storyboard
One More thing Try searching Google before Posting a question here if have some problem then feel free to post along with the code or tutorial u tried.
Let me know if i Worked
Cheers
W

Related

How to make a safari style Yosemite add tab button

First of all, I am so sorry for my bad English.
Secondly I would like to ask you, how can I set a toolbar item ( custom view ) at the bottom right corner of the toolbar( like the add tab button in safari Yosemite ). I have already found the NSTitlebarAcessoryViewController Class and i have set with that my Custom Tab view. But I cannot find how to set my add tab button at the position I told you, when my tab view is hidden.
I must also tell you that I am a total newbie.
Thank you in advance for your time. :-)

UINavigationBar : customized button?

I want to make a navigation bar looking like BRED's application :
But I don't know how to remove the border and the bottom of the bar button.
Thank you for your advices
If iOS 5 or greater check out the UIAppearance API. Otherwise, there are a bunch of resources on SO to customize the nab bar, including this one. There is no way to just remove the border, you will have to create it from scratch.

iOS layout: alternative to tabs?

I'm working on a iPhone app which shows an mobile webform in a UIWebView. I'm using a default iOS layout with a navigation and tab bar.
The mobile webform is displayed in a UIWebView in the white area. Since the webform has a lot of input fields, we really need as must space for it as possible. Because of this, we are planing to remove the tabs in the bottom. Over time, there will be more tabs/sections, so it is not a solution to just add a button for each section in the left side of the navigation bar. On a iPad a popover could easily be used to handle this.
Is there a standard iOS layout mechanism to handle this change of sections/views without using tabs?
You could do something long the lines of Path or the new Facebook app and have the "table of contents" behind the Navbar and the navbar slides away (along with the child view) to reveal it. When done right (ie smoothly) I think the effect is really cool.
This would also work great as you add more and more options, since the table could just scroll.
Here is a framework that might be you started: http://www.cocoacontrols.com/platforms/ios/controls/iiviewdeckcontroller
I would consider replacing the navigation bar's title with a control that lets you switch between tabs. You can assign the bar's titleView property to a control or a button and it will generally do the right thing.
If you're limited to 2-3 tabs, you could simply use a UISegmentedControl.
If you want more, you could use a button which, when tapped, pops up a view that allows you to select the view you want. This could be a modal table view, or you could slide up a UIPickerView from the bottom of the screen, similar to the keyboard.
I use this technique in an app of my own, screenshots here. Tapping the button cycles between views (in this case, I'm changing the contents of the table cells); tap-and-hold slides up a picker.
Another possibility would be to arrange your different forms on pages in a scroll view with a page control at the bottom, à la Weather. The best option, though, if you’re going to have a particularly long list and want to keep your screen real estate, is probably the FB/Path-style sidebar table.
I ended up using a UIActionSheet but I think it in other situations would be more stylish to use a controller like the IIViewDeckController.

How can I make a scrollable TabBar...?

I'm working on an app that needs many TabBar Items (6 or 7). I don't think users like to click the "More" button on TabBars, so I'm wondering how to make my own TabBar that slides from left to right, so one can easily access all the buttons on the tabbar without pressing "More."
Thanks!
I agree with the other answer that it's a bad idea from a design standpoint.
Nevertheless, the technical answer is that you can simply embed a UITabBar in a UIScrollView. If you set the tab bar's width and the scroll view's contentSize appropriately, the tab bar will be scrollable. You will probably want to turn off bouncing and scroll indicators.
I didn't try it with a UITarBarController.
Opinions on whether this is a good idea or not aside
A simple carousel should be fairly simple to implement from scratch using a UIScrollView with UIButton subviews. which will provide all the scroll mechanics for you
As a sample idea.
A UISCrollView which spans the width of the device.
N buttons across the scroll content pane
Restrict scroller to horizontal scrolling.
Provide selected and unselected images for the buttons
Create glue code to ensure only one button is selected at a time (like Radio buttons)
But I do agree with the other posters that its a bad UI idea. Id be thinking UIToolbar for this.
Apart from considerations about UX and UI guidelines, a way you can implement such thing is implementing a tab bar from scratch. You can even find a tutorial here for iOS5.
Actually, implementing a tab bar and a tab bar controller is not difficult as it may appear at first sight, but given the effort involved, you could also ask you what value this kind of design add to your app and to the user experience.
In any case, if you decide to go for this path (a scrollable tab bar), I would suggest to make it such that the user cannot be misguided into thinking it's a standard tab bar.
That's against about every design guideline ever written for iOS.
(I know that Gift Plan for iOS has a scrollable tab bar, but it never hides items from the user.)
The HOW to do it has been accepted,
MOBILE DESIGN PATTERNS are not cast in concrete - it is about what is appropriate for YOUR app.
It used to be that web pages scrolled vertically and side-scrolling was frowned on.
But the tablet has been a game changer - people EXPECT to swipe side to side.
A comment on one case when scrolling tab view is actually highly appropriate ..
(a) Look at xFeed in App Store
This has 10+ topics like News Sports ... , easy to scroll to topic and click takes you to RSS feeds under it.
This is truly convenient for user, and in my opinion appropriate.
The alternative is to go back and forth between a menu of some kind and the target view - which could be a 2nd option, but from a quick browse experience this is good.
(b) USA Today is another example - even on its main website, has the < > arrows to scroll between topics or you can click on tabs at top. Admittedly the tabs themselves don't scroll, but you get the idea. The entire site, and the mobile experience for USA Today is strongly optimized around side swipeing between chapters.
(c) Presentations and content sites have come to be side scrolling as well.
(d) FINALLY on a Human Happiness viewpoint! People WANT TO TOUCH and PLAY with their mobile stuff. Not just tap!
So mobile touch is quite happy here. One more thing to swipe and slide :)
Here is a link of project with custom scrollable tab bar:
github - scrollable tab bar by BananaDev
It's free and provides a wide variety of customization options allowing you to fully change control.

Animating Tab Bar page switching

I'm quite confused with the whole animation stuff in iPhone SDK. I tried to study throught the SDK documentation, this website or tried googling it out without success.
I'm unable to get my scenario work.
I have single XIB file, with tab bar and a 4 tabs.
In a special event i want to switch from one page to another "in code", so I call eg: [tabController selectedIndex: 0].
I need this transition to be animated. Is there a way?
If user switches tabs manually, no animated transitions are needed
Also I have one subquestion:
In one of the tabs I have a UITableView with set of items. When user clicks any of these items, another set of items are beign shown (sort of hierarchy browser)
I tried to animate this transition using -deleteRowsAtIndexPaths:withRowAnimation: and -insertRowsAtIndexPaths:withRowAnimation:, but without luck.
Desired transition is shifting the old items set to the left side and the new items from the right side.
This is first time of my iPhone development, when I got lost even with all the forums and documentation. :)
Thanks in advance to anyone trying to help me!
As for your first question: Yes you can.
Try this link for some answer:
transition on tab bar sample code.
In short words: you should add a delegate object to handle the tab bar switching by setting the tabBarController.delegate = self.
Yet, what this forum post won't tell you is that you need to "import" some framework to do it.
First - right-click on the framework folder on the left hand list in Xcode and add an existing framework named: "QuartzCore.framework".
Than - add these lines to your tab bar holder (on .h file):
#import <QuartzCore/CAAnimation.h>
#import <QuartzCore/CAMediaTimingFunction.h>
As for your second question, try to replace the datasource (array or what ever) or create login function on the cell to replace its content.
Enjoy!
First Question: No, you can't animate tab switching. Please read Apple's Human Interface Guidelines on this. Tabs are meant to switch instantly. An animated transition would break the "tab" paradigm.
Second Question: When you tap on a row, the user does not expect other rows to disappear and new ones to appear. Instead, this sounds like a case for a UINavigationController. Please refer to Apple's sample code, specifically the UICatalog for sample code on how to implement this.