В Swift я пытаюсь получить случайное число с плавающей точкой между 0 и 1, но я не могу заставить работать преобразования типов.
func randomCGFloat() -> CGFloat {
return CGFloat(arc4random()) / UINT32_MAX
}
Я получаю 'CGFloat' не конвертируется в ошибку 'UInt8'
Запуск Xcode 6.