objective c - I can't figure out the meaning of this statement: -


+(appdelegate*)instance{return [uiapplication sharedapplication].delegate; 

it's in middle of appdelegate using template. if has time, please explain line or usefulness of it.

thank patrick

it utility method:

when in need of instance of application's delegate casted correct class call:

[appdelegate instance] 

instead of:

appdelegate* instance = (appdelegate*)[uiapplication sharedapplication].delegate; 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -