简体   繁体   中英

Delegate methods wont autocomplete

quick question:

If i'm using interface builder and i set the my VC to be textFields delegate (using the IB), the delegate methods work but wont autocomplete unless i"m conforming to the protocol in the header file. Is it suppose to be like that or am i missing something ? is there a way to conform to that protocol through the IB without explicit adding it?

Yes, it is supposed to be like that. Autocompletion would be insane if every possibility in the universe were a candidate for completion! So only known possibilities for this context are suggested. Formally adopting the protocol tells Xcode to include its methods as possibilities for this class. (And does other good things as well.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM