I saw this alternative to using CGRectMake() to initialize the CGRect variable:
CGRect frame = (CGRect) {0,0,10,10};
My question is: how does CGRect frame = (CGRect){0,0,10,10}; ? What is going on behind the scenes? It looks like the c-style array ( {x,y,w,h} ) is initialized, which is then passed as a CGRect structure - is this correct? If so, how can I create an array of style c as a structure?
NB I am not asking if it is advisable to use the above alternative to CGRectMake() , I just want to understand why / how it works.
source share