开发者

SubView Does not come to front after rotation

I have a subView which t开发者_StackOverflow中文版akes rotation and then i have to move it to front of a view.

Let me moreclear ...

I have a subView Button say Button1.

and i have rotate it using following methods

[myButton.layer setTransform:CATransform3DMakeRotation(M_PI,0, 1, 0)];

and then

[myButton.layer setTransform:CATransform3DMakeRotation(2*M_PI, 0, 1, 0)];

Now when i clicked to it, it has to add a UIImageView as a subview to the main View, and then move to the top(i mean the button needs to be in front of the ImageView). for that i have used following method

[self.view bringSubviewToFront:myButton];

But this is not working for me...

the button remains always backside to that image view i also tried to send that imageView to back but that also not working...

I hope you understand the question......


I am not sure if it is conceptually related to this question, try to make the second rotation from 2*M_PI to 0.

[myButton.layer setTransform:CATransform3DMakeRotation(0, 0, 1, 0)];

and leave rest of the code as it is

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜