Nik Kov Nik Kov - 6 months ago 41
iOS Question

How to disable Assigning to..from incompatible type warning?

I have a warning in Xcode Assigning to ... from incompatible type. It appears when i set delegate of tableView to UIViewController without UITableViewDelegate protocol.

This warnings are annoying and i want to disable it. However i can't find how to do this. Only this post showed something similar.

  • How to disable this warning?

  • What is the way to find out how to disable different types of warnings? In case there would be another warning, that i want to disable.


So there are some downvotes from a couple crybabies, but the answer for this question can be useful in some cases. Maybe not in this one but at similar situations.

I finally found the answer and it seems, that the only way now (end 2016) to implement protocol and than use

#pragma GCC diagnostic ignored "-Wprotocol"