I am using a UIViewController as a View for SwiftUI and I want update it, I personally came to this down code for update, but as i see this code I feel that I am repeating codes