lamicka
lamicka

Reputation:

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.

Also I have one subquestion:

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!

Upvotes: 3

Views: 4537

Answers (2)

David Salzer
David Salzer

Reputation: 872

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!

Upvotes: 3

August
August

Reputation: 12187

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.

Upvotes: 2

Related Questions