Never mind I found out that the issue lies on how my savedImageView2 is initialize inside my saveCanvas function. All I had to do was to store the copy of mainImageView inside if the UIImageView(image: mainImageView.image?.copy() as? UIImage) object just like that instead of doing it separately.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: