I have two views, A and B, both inheriting from C.
In storyboard, I define a UIViewController
as type C.
Another view, lets say D, has two segues to C.
I want to be able to cast the destination according to the relevant segue:
if segue.identifier = "ToA"
{
// Load view A
}
if segue.identifier = "ToB"
{
// Load view B
}
I have tried it and casting fails. Is it possible?
I found another thread here on SO that says it is not, yet there was a reply there saying it is possible. How can I make this casting work?
Or should I just fuse A and B together? I really don't want to do that.