Transformation not applied?
Closed this issue · 4 comments
cremfert commented
Hey,
first of all thanks for this great toolkit!
I tried to use AGGeometryKit in Playground, but no transformation seems to be applied, if I look at the result. What I'm doing wrong? Thanks in advance!
Here is my code:
import UIKit
import XCPlayground
import AGGeometryKit
var rect = CGRectMake(0, 0, 200, 200)
var rect2 = CGRectMake(0, 0, 100, 100)
var topView: UIView = UIView(frame: rect);
var test: UIView;
test = UIView(frame: rect2);
test.backgroundColor = UIColor.blueColor()
test.layer.anchorPoint = CGPoint(x: 0,y: 0);
var quad: AGKQuad;
quad = test.layer.quadrilateral;
quad.tr.x += 200; // shift bottom right x-value with 20 pixels
quad.br.y += 20; // shift bottom right y-value with 50 pixels
test.layer.quadrilateral = quad;
topView.addSubview(test);
topView.bringSubviewToFront(test)
hfossli commented
I'll have a look in a couple of days. I'm currently on holidays.
hfossli commented
Sorry for the delay. I've been sick lately and haven't had the energy to do much.
Did you get it working?
cremfert commented
Yes and no. It works in my app, but not in the playground. But I think, this is not a real issue, so we could close this here.
hfossli commented
Allright, thanks for the feedback!