Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 interface builder does not show custom class

I have an error in my Xcode 6.3 interface builder. When i create a new custom class and want to add it to interface builder custom class field. It is not available. I do use Swift as languag.

What I tried:

  • delete derived data
  • reinstall Xcode
  • cleand project
  • created new project
  • Class name is same as file name
  • Superclass and interface builder class are the same

Nothing worked out ;-( Any idea what it could be ?

enter image description here

enter image description here

enter image description here

like image 985
Lailo Avatar asked Apr 17 '15 17:04

Lailo


1 Answers

I had the same issue and thought it as a bug. But it was my misunderstanding.

What actually happens is:

Custom Class drop down list shows only those custom classes which are subclasses of currently selected object's class.

For example, if we have imageview object in xib and after selecting it, when we see custom class drop down list, it'll show only custom classes inherited from (subclass of) UIImageView.

What I was doing wrong was looking for those custom classses which are subclasses of UIView.

In your case, it might be, not 100% sure, happening due to your TimerCVC is a subclass of UICollectionViewController instead of UIViewController.

like image 135
Nitesh Borad Avatar answered Oct 28 '22 02:10

Nitesh Borad