I'm trying to update a part of a function for swift 3:
let newLabelOffset = CGFloat(direction.rawValue) * originalFrame.size.height/2
newLabel.transform = CGAffineTransformConCat(
CGAffineTransformMakeScale(1,0)
CGAffineTransformMakeTranslation(0,newLabelOffset)
)
I've heard that the new way of using CGAffineTransformConCat
is concatenating(_:)
but not entirely sure how to set it up based on the 2 above transforms.
Init transforms,
let trans1 = CGAffineTransform(scaleX: 0, y: 0)
let trans2 = CGAffineTransform(translationX: 0,y: 1)
Concatenate,
trans1.concatenating(trans2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With