English 中文(简体)
C4 动画遮罩
原标题:Animated Masks in C4
  • 时间:2012-05-24 18:39:58
  •  标签:
  • ios5
  • c4

我知道在C4中可以制造 像这样的层面罩:

object.layer.mask = anotherObject.layer;

是否有使用动画面具的已知方法?

最佳回答

是的 你可以用几种不同的方式动画面具

首先,如果你使用基本形状作为物体, 其层会变成面具, 你可以像正常人一样动画它们, 这变成了动画面具。

C4 中的任何可见物体(即形状、电影、图像等)都可以这样做。

例如:

object.layer.mask = aShape.layer;

aShape.animationDuration = 1.0f;
aShape.origin = CGPointMake(x, y);

以上也可以用图像完成。 当使用图像时, 图像的任何清晰部分都会在您的 原始 对象中显示透明 。

此外,还有一种无记录、可想象的图像方法,这是试验性的,仅在最新模板中提供。

使用它看起来像:

NSArray *imageNamesArray = [NSArray arrayWithObjects:@"imageName01.png",...,nil];

C4Image *animatedImage = [C4Image animatedImageWithNames:imageNamesArray];

object.layer.mask = animatedImage.mask;

基本上, 此方法创建了一个 < em> animated gif 风格图像... 但是, 由于此方法是全新的 / 实验, 无法控制图像之间转换的速度 。

问题回答

暂无回答




相关问题
New Notification Center

Is there a way to show a notification in the notification center without having push notifications enabled? For example if an email fails to send is there a way i can create a string and display it in ...

submit an ios app using ios5 OS and ios5 sdk

I m wondering if I can install IOS 5 and the IOS 5 SDK and still be able to develop and submit apps to Apple? Or once I install IOS 5 I m forced to install the IOS5 SDK (from what I understand I can t ...

What s new for web developers in iOS 5 Safari?

From the Apple WWDC we have learned that iOS Safari 5 has tabs, and the new Reader and Reading List functionality. None of which is particularly informative for web developers. What are the new ...

iOS - AudioSession Cateogry for AudioUnit Application

I am working on streaming audio player application for iOS. currently i am experimenting with AudioQueue and AudioUnit for playback. Both works fine in the normal condition. But I am facing an issue ...

Couldn t register with the bootstrap Server

I just changed some code in my program and got this error: Couldn t register com.yourcompany.XXX with the bootstrap server. Error: unknown error code. This generally means that another ...

Unable to manage orientation with multiple view controllers

I m trying to build an iPhone application that has two subviews in the main window. Each view has its own UIViewController subclass associated with it. Also, within each controller s implementation, I ...

热门标签