Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Also create xib file" button disabled

I have this problem with creating UIView's subclasses. Creating, for example, UIViewControllers or UITableViewCells is okay.

Why this happens?

UIView button disabled UIViewController is okay

I create view using cmd+N and Xcode Version 7.3.1:new file

like image 638
Zaporozhchenko Oleksandr Avatar asked Aug 23 '16 15:08

Zaporozhchenko Oleksandr


2 Answers

Create the View and the Cocoa Touch Class separately, but with the same name, then set the Class of the xib to the name of the file.

enter image description here

enter image description here

enter image description here

like image 131
RossP Avatar answered Oct 17 '22 17:10

RossP


You can add custom Xcode template that will fix this issue or add an existing template. Read more how to create and add it to Xcode here.

Template can be found here.

like image 29
Dima Cheverda Avatar answered Oct 17 '22 19:10

Dima Cheverda