如何在iphone sdk中翻转按钮?

时间:2011-03-18 10:44:41

标签: iphone objective-c cocoa-touch ios4 iphone-sdk-3.0

我想知道如何在以下应用中翻转按钮:

http://itunes.apple.com/app/brain-cafe-geoquiz/id334815548?mt=8

我在app中引用此屏幕:

enter image description here

2 个答案:

答案 0 :(得分:1)

请参阅以下代码:

CGContextRef context = UIGraphicsGetCurrentContext();
context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:button cache:YES];
[UIView commitAnimations];

答案 1 :(得分:0)

您可以在CoreGraphics中模仿内部阴影...请参阅Inner Shadows