Top "Cgfloat" questions

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

Swift Double is Not Convertible to CGFloat

I'm trying to draw a simple circle when I get to the following line I get the error "Double is …

casting swift cgfloat
Binary operator '+' cannot be applied to two CGFloat operands?

Coding in Swift and get the above error... Is the message masking something else OR can you really not add …

cocoa swift cgfloat
How do I make an array of CGFloats in objective c?

So I'm working on a simple iPhone game and am trying to make a local high score table. I want …

iphone objective-c arrays cgfloat
Use of undeclared type 'UIImage' in Swift

On using this function in swift and i am getting compiler error. Function is: class func imageWithImage (imageToResize : UIImage, scaledToSize …

ios uiimage swift cgfloat swift-playground
Convert CGFloat to NSNumber in Swift

I have an extension in Swift that holds some properties which are CGFloat's. The problem is that I don't know …

ios swift casting nsnumber cgfloat
How to set a CGFloat to a UILabel's text property

I have a UILabel called optionsDisplayerBrushSizeLabel who's text property I want to set to a CGFloat: brushSizeVal. I understand that …

iphone text properties nsstring cgfloat
NSNumber from CGFloat

Is there a safe way to "convert" a CGFloat to a NSNumber ? NSNumber has the numberWithFloat: and numberWithDouble: methods but …

objective-c floating-point nsnumber cgfloat
Does const go before or after CGFloat?

Does it even matter? Const before or const after? I'm guessing that whether I put const before or after CGFloat …

objective-c c floating-point constants cgfloat
Confusion due to Swift lacking implicit conversion of CGFloat

Trying to do arithmetic in a function that returns `CGFloat, I get an error: Couldn't find overload for '/' …

swift types type-conversion cgfloat
How to round of CGFloat value

Possible Duplicate: NSNumberFormatter for rounding up float values Currently, I calculate the scaling factor by using : CGFloat scale = CGContextGetCTM(context).…

iphone objective-c rounding cgcontext cgfloat