向下钻取时将UITableView过渡更改为相反从左到右

问题描述

|| 我已经阅读了Apple的View Transitions教程(在这里) 执行过渡的代码是:
-(void)performTransition 


{ 


// First create a CATransition object to describe the transition 


CATransition *transition = [CATransition animation]; 


// Animate over 3/4 of a second 


transition.duration = 0.75; 


// using the ease in/out timing function 


transition.timingFunction = [camediatimingFunction functionWithName:kcamediatimingFunctionEaseInEaSEOut]; 





// Now to set the type of transition. Since we need to choose at random,we\'ll setup a couple of arrays to help us. 


Nsstring *types[4] = {kCATransitionMoveIn,kCATransitionPush,kCATransitionReveal,kCATransitionFade}; 


Nsstring *subtypes[4] = {kCATransitionFromLeft,kCATransitionFromright,kCATransitionFromTop,kCATransitionFromBottom}; 


int rnd = random() % 4; 


transition.type = types[rnd]; 


if(rnd < 3) // if we didn\'t pick the fade transition,then we need to set a subtype too 


{ 


    transition.subtype = subtypes[random() % 4]; 


} 





// Finally,to avoid overlapping transitions we assign ourselves as the delegate for the animation and wait for the 


// -animationDidStop:finished: message. When it comes in,we will flag that we are no longer transitioning. 


transitioning = YES; 


transition.delegate = self; 





// Next add it to the containerView\'s layer. This will perform the transition based on how we change its contents. 


[containerView.layer addAnimation:transition forKey:nil]; 





// Here we hide view1,and show view2,which will cause Core Animation to animate view1 away and view2 in. 


view1.hidden = YES; 


view2.hidden = NO; 





// And so that we will continue to swap between our two images,we swap the instance variables referencing them. 


UIImageView *tmp = view2; 


view2 = view1; 


view1 = tmp; 


} 
我的问题是:在向下钻取时,如何使用此代码将表视图的转换从左向右更改?如何更改didSelectRowAtIndexPath方法以完成此操作? ps。这个问题不是这个问题的重复。     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)