The image cannot be passed during the View transition.

Asked 2 months ago, Updated 2 months ago, 2 views

The signal SIGABRT error appears in the code below.

view controller1

@IBOutlet weak var image1:UIImageView!
@IBOutlet weak var image2:UIImageView!

override func prepare(for segment:UIStoryboardSegue, sender:Any?) {
    let vc2 = segue.destination as!ViewController2
    vc2.image3 = self.image1.image

view controller2(vc2)

@IBOutlet weak var image21:UIImageView!
@IBOutlet weak var image22:UIImageView!

var image3:UIimage?
var image4:UIimage?

override func viewDidLoad(){


swift swift3

2022-09-30 11:10

1 Answers

There is no problem with the code you provided.The iOS project you created for verification can be passed over without crashing.

The "signal SIGABRT" error is the most frequent error, but it is often caused by a lack of editing on the Storyboard when "there is no particular problem on the code."Check thoroughly to make sure that the connection is correct and that there are no missing connections left.Changing the name of the View after you put up a connection may result in poor editing.

2022-09-30 11:10

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.