Xcode doesn't let you drag-drop to add new property to a view from interface builder

Originator:eduardoscoz
Number:rdar://20792703 Date Originated:May 2 2016
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
 
Summary:
When you create a xib file manually, and a class file manually, Xcode doesn't let you create properties by drag-dropping from IB into the class header in the side-by-side assistant.

You can still drag-drop into the .m file, which creates an instance variable, but not a property.

After you define the first property manually, Xcode lets you define new ones by drag and dropping.

Steps to Reproduce:
1. create new Xcode project, "iOS Simple View Application" template.
2. right click project, "Add new file"->"iOS User Interface", select the "View" template, to crate a new xib. Name it "View".
3. right click project, "Add new file"->"iOS Source"->"Cocoa Touch Class". Name the class "View", and make it a subclass of "UIView".
4. open xib file, and change the "custom class->class" of the view selected to "View".
5. add a simple UIButton to the view
6. change xcode to the side-by-side view, the "Assistant editor".

7. right click on button, try to create a new referencing outlet to the View.h file. Xcode won't let you.

8. right click on button, try to create a new referencing outlet to the View.m file. Xcode will try to create an instance variable.

9. Now on the View.h file, define a simple property like:

@property (weak, nonatomic) IBOutlet UIView *test;

10. repeat step 7, Xcode will let you do it.

Expected Results:
Xcode should let you create properties on header files on the first try.

Actual Results:
You can't create the properties by drag and dropping until you first define a property manually.

Version:
Version 6.3.1 (6D1002)

Notes:
Project attached was created following the same steps above. Here, opening that project will still reproduce the issue.

Configuration:
Nothing special, brand new project.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!