Date
Sep. 9th, 2024
 
2024年 8月 7日

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.
反曲点科技创始人和首席执行官。
程序猿、设计师、奇怪的博主。
苹果死忠、热爱色彩斑斓的世界。
如有意向请随时 与我联系