문제

I realized that when launching assistance editor while working on a XIB file no longer opens the header file by default, instead it shows the implementation file. Is there a new workflow going on I am not aware of? While in the implementation file I can only seem to be able to add IBActions. What is the "new" way to create IBOutlets? Switching to header file each time??

도움이 되었습니까?

해결책

My 2 Cents:

When you create a new class using the Xcode templates, it usually provides a class extension in the implementation file for private properties. It makes a lot of sense to actually link the IBOutlets and IBActions there, because in most cases they are only ever used within the class itself.

The only exception to this that crosses my mind right now is UIView subclasses, and especially UITableViewCell. A lot of developers access the IBOutlets directly in cellForRowAtIndexPath:.

Apple engineers' message: Encapsulate your IBOutlets & IBActions whenever possible!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top