0

Somethings I have a navigation controller and a view controller in my Main.Storyboard, but for some reason I can't create and link IBActions by holding down CTRL and clicking on a button on my view controller, then dragging it to my ViewController.swift. I could do this earlier!? What happened? Thanks

2
  • Is view controller set to your ViewController class on Main.Storyboard? Commented Jun 9, 2015 at 2:21
  • As far as I know, yes. How do I check that? I'm fairly new still Commented Jun 9, 2015 at 2:23

3 Answers 3

2

Solved! I'm using a program that allows my mouse and keyboard to work between my Mac and PC without taking it out of the USB ports (works over LAN). For some reason the program is not recognizing a CTRL press which was causing the problem. After switch the keyboard to the mac itself, everything works!

Sign up to request clarification or add additional context in comments.

1 Comment

Same problem, are using sharemouse?
1

this happened to me before : click on the view controller and then go to utilities -> identity inspector , and check the "Class"

The class has to be the same as the file you're trying to ctrl drag into

here is the picture: https://www.dropbox.com/s/5451kzit16espjo/Screen%20Shot%202015-07-08%20at%2010.50.45%20AM.png?dl=0

Comments

-1
  1. Open your xib file or storyBoard
  2. Click on File’s Owner
  3. Click on Identity Inspector and check class has same name as the file you’re trying to ctrl drag

This guy have awesome solution. Just need to correct your class name

ios – can’t drag and drop item by ctrl+drag xcode

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.