Skip to content
项目

icanzilb/UIEffectDesignerView

在 GitHub 查看

关于

基于 QuartzCore 的 iOS 和 OS X 原生粒子系统特效视图

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

UIEffectDesignerView

A native Particle Systems effect view for iOS and OSX powered by QuartzCore.

This is a companion Objective-C class to the UIEffectDesigner app.

UIEffectDesigner

You can download the UIEffectDesigner app from here and design visually your effects:

image

When you are happy with the effect click File/Save... and save the effect as [name_of_your_choice].ped.

Usage

To include a particle system effect in your iOS or OSX app is very easy.

Follow these 4 easy steps:

  • Add the .ped file to your Xcode project.

  • Add the QuartzCore.framework to your project.

  • Add to your project the UIEffectDesignerView folder from the UIEffectDesignerView repository (aka this repo you are looking at)

  • Show the effect on the screen:

For iOS add in your ViewController code:

#import "UIEffectDesignerView.h"
...
UIEffectDesignerView* effectView = [UIEffectDesignerView effectWithFile:@"[name_of_your_choice].ped"];
[self.view addSubview:effectView];

For OSX add to your AppDelegate code:

#import "UIEffectDesignerView.h"
...
UIEffectDesignerView* effectView = [UIEffectDesignerView effectWithFile:@"[name_of_your_choice].ped"];
[self.window.contentView addSubview: effectView];

That's it. You can work normally with the view - for example adjust its center property on iOS or change the frame, animate the effect around the screen, etc.

For a full walk-through on creating particle systems and displaying them in a UIKit game for the iPhone check out this 2 part tutorial series:

Samples

On the UIEffectDesigner page you can also download sample effects:

image

image

image

Go to UIEffectDesigner page with sample effect files for download.

探索相关项目

加载中…