Date
Dec. 26th, 2024
 
2024年 11月 26日

Post: iOS 小知识: 忽略编译器警告

iOS 小知识: 忽略编译器警告

Published 12:10 Oct 14, 2014.

Created by @ezra. Categorized in #Programming, and tagged as #iOS.

Source format: Markdown

Table of Content

介绍一些 iOS 小知识。

忽略警告

  • 废弃
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

// 调用废弃方法...

#pragma clang diagnostic pop
  • 未使用的值
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"

int unused = 0;

#pragma clang diagnostic pop
  • performSelector Leak
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"

[self performSelector:aSelector];

#pragma clang diagnostic pop
Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
开发、设计与写作皆为所长。
热爱苹果、钟情色彩。
随时恭候 垂询