Search code examples
iosobjective-cios7xcode5

I can not connect view controller to code using windows keyboard


I started to learn IOS development. I am going through a video tutorial. The instructor is connecting the Hello World to the code by pressing control and using the mouse, as you can see in the screenshot :

enter image description here

I have windows 7 machine. I rented a mac VM from xcodeclub. When I tried to press control and connect the viewcontroller to the code by dragging mouse as done by the instructor, it do not connect. I am using windows keyboard. So how to do this ?

Is any other way to do this ? Or I have to use some other key + mouse drag ?


Solution

  • Fix. Try right clicking on the label and dragging from new referencing outlet.

    Otherwise, check to see if your view controller is the correct class. Click on your storyboard file (probably called main.storyboard or something similar) and select the graphical representation of your view controller. Then, on the right hand side click on the small icon that is the 'identity inspector'. Make sure under custom class it displays UIView. If it doesn't, change it to UIView and try again.

    If that doesn't work make sure you're dragging the blue line across the screen so that when you release it you are between the @interface and @end lines of code. Like this:

    @interface
    // drag it here...
    @end