slobodans
slobodans

Reputation: 859

UIViewController in storyboard reference class from other target

I have project with 2 targets: CoreD and MultiT.
Each target contains: Main.storyboard and ViewController.swift
Each of these files has target membership only in its own target.

enter image description here

When i open Main storyboard in CoreD target, to create outlets and actions, ViewController class in identity inspector is class from other target(MultiT), not from target to which storyboard belongs.

enter image description here

My XCode version is 9.4.1

Is there way to fix this, other than changing names of view controllers?

Upvotes: 1

Views: 563

Answers (1)

Shehata Gamal
Shehata Gamal

Reputation: 100503

Select the vc from

Manual ->TargetName->ViewController.swift

Then hook the outlets & actions , you'll be able to connect them if the vc is inside the target of the storyboard and assigned correctly as the class name despite it's not showing as automatic as xcode sometimes glitches in it

Upvotes: 1

Related Questions