Veritas Machine |
|
You can write pure lua code or code with Objective-C syntax.
It has implemented most Objective-C syntax, such as @autoreleasepool, @{}, @[], @YES. It also has extended the Objective-C.
The machine can run on iOS device. Here is a sample example:
local animation = function(view, background) [view setAlpha: 0] [UIView animateWithDuration: 0.5 animations: (^{ [view setAlpha: 1] [background setFrame: CGRectMake(0, 0, 100, 100)] })] end local theView = [[UIView alloc] initWithFrame: CGRectMake(0, 0, 100, 200)] local backgroundView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @"background"]] [theView addSubview: backgroundView] [backgroundView release] animation(theView, backgroundView)