fix type float to CGFloat