Change float to CGFloat.