Convert int to CGFloat
i was searching in how to do the same in swift and i find the question in first result (high ranked) so i will post the answer if had found in case someone was lucky like me :)
let myCGFloat = CGFloat(myFloat)
In the past casting a CGFloat value using the () syntax has worked fine for me. CGFloat is just defined as "typedef float CGFloat;" so you go about casting it the same way you would a float:
CGFloat f = (CGFloat)intVal;
or, if your value is a constant:
CGFloat f = 1.10;