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

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

c# - Why won't my code write to SQL? -

c# - Avoiding duplicate methods for Task and Task<T> -