After CGPointMake
let me down I found out that we can initalise a static const CGPoint
like this instead:
static const CGPoint p = { 0.f, 0.f };
It works but what is the curly bracket notation actually doing?
After CGPointMake
let me down I found out that we can initalise a static const CGPoint
like this instead:
static const CGPoint p = { 0.f, 0.f };
It works but what is the curly bracket notation actually doing?
CGPoint is a struct:
struct CGPoint {
CGFloat x;
CGFloat y;
};
It's a valid method to initialize a struct in C. See Struct initialization of the C/C++ programming language?.
© 2022 - 2024 — McMap. All rights reserved.
CGPointMake
function call? – Secretarygeneral