Develop

[ios] 앱 딜리게이트 얻어오기. (AppDelegate)

by hooni posted May 10, 2014
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print

의외로 자주 쓰게 되는..

앱 딜리게이트 얻어오는 초간단 코드.

AppDelegate *delegate =
    (AppDelegate *)[[UIApplication sharedApplication] delegate];

// 위와 같은 코드
//AppDelegate *delegate =
//    (AppDelegate *)[UIApplication sharedApplication].delegate;