Search code examples
iosobjective-cxcodeuiviewiboutlet

How to add new outlet types to Xcode user interface?


I'm trying to use the PWAutoLayout project which adds a new type of Outlet to Xcode's user interface. When I open the PWAutoLayout sample project the new outlet named PWHidingMasterView is shown on the Xcode UI for UIViews and derived classes.

However, when I add the PWAutoLayout source files to my project, the outlet doesn't appear for the UIViews in my storyboard. They were added to my target, and I tried importing the headers: no difference.

What I am missing? How can one declare new outlet types for display in Xcode UI?


Solution

  • I found the difference: my project is inside a Workspace and the new outlet won't show there. If I open the project directly, the PWHidingMasterView outlet is there.

    I reported this bug to Apple. I suggest you do the same if it affects you.