Top "Cgfloat" questions

A CGFloat is the basic CoreGraphics type for all floating-point values in the Cocoa and Cocoa Touch UI frameworks.

Casting CGFloat to Float in Swift

I need to store a value as a Float, but the source data is a CGFloat: let myFloat : Float = myRect.…

casting swift cgfloat
Round up a CGFloat in Swift

How can I round up a CGFloat in Swift? I've tried ceil(CDouble(myCGFloat)) but that only works on iPad …

swift rounding cgfloat ceil
Swift random float between 0 and 1

In Swift, I'm trying to get a random float between 0 and 1 but I can't seem to get the type conversions …

swift random arc4random cgfloat
Is there a constant for the maximum CGFloat value?

I need to create a CGSize to compute text height of an arbitrary text with arbitrary length. UIKit has this …

objective-c ios foundation core-foundation cgfloat
How to check for NaN value in Objective-C (iOS)

Possible Duplicates: Objective-C - float checking for nan Determine if NSNumber is NaN I have a problem with NaN values …

ios objective-c xcode cgfloat
Swift binary operator '+' cannot be applied to two CGFloat operands

I am writing a function in Swift to detect which hexagon I am clicking on. But I ran into a …

swift types cgfloat
How can use CGFloat in Swift?

var posinonY:Float = Float(y) + Float(pipeDown.size.height) + Float(verticalPipeGap) pipeDown.position = CGPointMake(0.0, Float(posinonY)) I get this error: "…

swift cgfloat
How to round CGFloat

I made this method + (CGFloat) round: (CGFloat)f { int a = f; CGFloat b = a; return b; } It works as expected …

ios objective-c math cgfloat
Converting CGFloat to String in Swift

This is my current way of converting a CGFloat to String in Swift: let x:Float = Float(CGFloat) let y:…

string swift cgfloat
how to convert Int32 value to CGFloat in swift?

Here my code. I am passing two values into CGRectMake(..) and getting and error. let width = CMVideoFormatDescriptionGetDimensions(device.activeFormat.formatDescription …

swift ios8.1 cgfloat int32