Guilloche 0.0.2

Guilloche 0.0.2

测试测试版
语言语言 Obj-CObjective C
许可 MIT
发布上次发布2014年12月

Zane Shannon维护。




Guilloche 0.0.2

Guilloche 在 UIViews 中创建Guilloch\u00e9 图案。它主要基于 Tom Beddard 的 AS3 源代码和 Guilloche Pattern Generator。我们使用它来为每副牌生成独特的背面。

** 在示例应用中,单次点击 GuillocheView 将切换全屏查看。 **

用法


#import 'GuillocheView.h'

GuillocheView *guillocheView = [[GuillocheView alloc] initWithFrame:self.view.frame]; // Creates a full view Guilloche pattern with default values
[self.view addSubview:guillocheView]; // add to the current view

属性

GuillocheView 支持以下属性

float scale;
float steps;
float multiplier;
float majorRipple;
float minorRipple;
float radius;
float opacity;
float lineThickness;
NSArray *lineColors;

当其任何属性更改时,视图将实时更新。

guillocheView.scale = 3.0; // guillocheView re-renders automatically

调整大小

类不会自动执行调整大小,但这样做非常简单

// init
GuillocheView *guillocheView = [[GuillocheView alloc] initWithFrame:self.view.frame];
[self.view addSubview:guillocheView];
// update size to full width, 100px wide
guillocheView.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 100.0);
// re-render
[guillocheView setNeedsDisplay];

屏幕截图

Example App Default Full Screen Alternative Example Alternative Example 2

贡献

请在这里发送拉取请求。