Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 902 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 902 Bytes

DTCubeView

##Cube style switch view

ScreenShot

Get to Start

###Set two view into cubeView class:

UIView *aView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
[view1 setBackgroundColor:[UIColor redColor]];
    
UIView *aView2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
[view2 setBackgroundColor:[UIColor greenColor]];

DTCubeView *cubeView = [DTCubeView cubeViewWithFrame:CGRectMake(0, 0, 320, 44) forView1:aView1 andView2:aView2];

[self.view addSubview:cubeView];

[aView1 release];
[aView2 release];

###Slide cubeView:

// Slide UP
[cubeView slideUP];

// Slide Down
[cubeView slideDown];

###Set new view into cubeView:

// At view1
[cubeView setView1:aNewView];

// At view2
[cubeView setView2:aNewView];