tags:

views:

169

answers:

3

if you look at this ipad application ( http://www.blackboard.com/Mobile/Mobile-Learn.aspx ), there is a slide tab named, "Dashboard." When you click on it, a new view slides out side ways. I'm aware that there is a split view that is new in iphone 3.2, but, I could not find anything on a slide tab or a side tab as implemented in this ipad application. How is this done?

+2  A: 

The easiest way would probably be to create a custom UIView and design the left edge to look like the tab you wanted, and then set the view's location so that only the left tab part is visible. When that tab is clicked you use CoreAnamation block around setting the view's new location to the center of the screen.

There isn't a Apple widget that does all of this by default, but it wouldn't be that hard to roll your own.

jamone
+1  A: 

In addition to what @jamone answered (+1) I suggest having a conditional statement on the tab's touch event that is like this in pseudo code:

if (tabView.frame.origin.x == 968) //tab only position
//animate tab view in code here
else if (tabView.frame.origin.x == 300) //entire view position
//animate tab view out code

That way you can have the same method handle animating in and out and it will initiate an animation only if your view is in it's complete out or in positions.

Cirrostratus
A: 

cud u please proivide some working code

linga
sorry, i don't have any working code. You might want to ask jamone
Joo Park
Hi do i have to customize full view or just the button
linga
Hi Jamone AND JOO PARKplease provide if you ppl have some sample code sliding view
linga
I don't have any code to do this, and I'm not around my Mac to make/try any but I don't see how it should be very hard. Make a view that has the tab look you want on the edge. Then when that tab is clicked you set the entire view's location to center or the edge of the screen.
jamone