【问题标题】:how to animate selected portion of image如何为图像的选定部分设置动画
【发布时间】:2009-12-11 19:42:31
【问题描述】:

我已经实现了游戏应用程序,其中我选择了图像的某些部分。现在我想在抖动效果上为选定的图像部分设置动画?这可能吗?如果可能,那么如何实现给我一些想法?

【问题讨论】:

  • 是的 Mansi 未来你应该先接受答案,然后你会得到进一步的答案,否则没有人会给你正确的答案...干杯 Mansi

标签: iphone


【解决方案1】:

尝试在该部分上方放置一个图像视图,在其下方捕获图像并为其设置动画?起点:

    CGRect contextRect  = CGRectMake(50, 50, 200, 200);// whatever you need
    UIGraphicsBeginImageContext(contextRect.size);  

    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

来自http://www.iphonedevsdk.com/forum/iphone-sdk-development/2353-possible-make-screenshot-programmatically-2.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多