Make Segue programmatically in Swift
问题 I have two VCs: VC1 and VC2. In VC1, I have a finish button which I programmatically made and a result array I want to pass to VC2. I know how to make Segue in Storyboard, but I cannot do that at this moment since the finish button is programmatically made. If I want to pass result array using segue, is there a way to make the segue programmatically? If this is not possible, should I just present VC2 using presentViewController and set a delegate to pass the result array ? 回答1: You can do it