3

I have a Collection View scene with associated Cocoa class (working right), and this View contains two Generic Collection Reusable Views. I created Cocoa classes of UICollectionReusableView and set them here.

enter image description here

But when I start assistant editor, it is still opening class for whole view (of UICollectionView) , of course I selected my Generic collection reusable view.

Even when the other class is set properly. I don't have a choice. Here is a picture.

enter image description here

I am unable to open my GenericCollectionReusableView.swift with assistant editor.

Please any suggestions?

After the moment when it was working for me, I added a new Table View Controller, and created a class for a cell. And again same problem, Option-click or other ways not working, even the assistant editor lets me choose proper file, but unable to drop over there, see on the image. I don't understand how to use it. There are no questions about it, so I must do something badly, but it seems so easy.

enter image description here

Mlok
  • 155
  • 9

1 Answers1

2

Try some ways below:

  1. Click onto right side, Shift+Command+O, paste the class name you expect to open. Ex: GenericCollectionReusableView
  2. As image below, you can click onto anywhere in red rectangle, this will show popup for you direct to your expected file. enter image description here
Trai Nguyen
  • 809
  • 1
  • 8
  • 22
  • Thanks so much, this sounds very logic, maybe I am doing something wrong. After I find my file in quick open and press enter, it will open new file but not on storyboard or assistant, if I not press the enter and click into red rectangle zone, still I have just 2 options, header file or class I don't want. Should I do something after opening quick open, please? – Mlok Nov 17 '19 at 07:31
  • 3
    @Mlok quick tips, Option + click on the file in Project navigator that you wanna to open assistant editor – Trai Nguyen Nov 17 '19 at 07:46
  • 1
    it will open a file in new separate section not in assistant editor :( So I am unable to control drag over here :( I am doing something wrong, I am not good on using clickable interfaces :) – Mlok Nov 17 '19 at 08:04
  • I got it, Option click on reverse :) first I have to open swift file, than option click on Storyboard! Many thanks to You! – Mlok Nov 17 '19 at 08:58
  • I am missing some kind of understanding. I have another same situation Option click does not work (not open in assistant editor, just two windows unable to Control-drag), trying everything without success, it is in UITableView with custom cell class. – Mlok Nov 20 '19 at 13:24
  • Update: Now I can choose from popup in red border proper class, but I am unable to drop Ctrl-drag here :( I can see the line after mouse, but unable to drop it. I am without idea how to work with it. – Mlok Nov 20 '19 at 13:26
  • @Mlok When you click the red rectangle it'll have 2 files: 1 is the file you expected and 1 file is Interface (which file have text Interface text in bracket after the file name - this file cannot drop outlet) . Just click the icon in left side (icon have 4 square), reselect the correct file you expected and you can ctrl+drag to this file – Trai Nguyen Nov 21 '19 at 03:42
  • Thanks, I will try next time, I "fixed" it deleting view controller and configuring every piece before I make any changes to settings in inspector view. That worked ... But when I make some change, it stops to work. – Mlok Nov 21 '19 at 09:02
  • @thenakulchawla long time ago, I don't use Control Drag =)). If needed, I write all IBOutlet code in swift file, after that I move to Storyboard, drag each outlet for each UI. With me this will be easier and will not meet the problem as like this topic ^_^ – Trai Nguyen Mar 25 '20 at 04:30