본문 바로가기

Development/IOS & Mac

[iOS] performselector may cause a leak because its selector is unknown


아래와 같은 코드에서 performselector may cause a leak because its selector is unknown 이라는 경고가 뜨면


SEL selector = ~~~~

[self performSelector:selector];


아래와 같이 바꾸면 경고가 없어진다.

[self performSelector:selector withObject:nil afterDelay:0];