How would I take advantage of Interface Builder with CNContactViewController in iOS utilizing Xcode and Swift?


I used to be capable of uncover that CNContactViewController is ready to be subclassed. I wish to use Interface Builder in order that I may present an ordinary again button with the usual partial arrow or lower than signal wanting image that signifies the view controller can return to the earlier view controller by tapping on that.

I believe the best way to make it look most traditional is to make use of Interface Builder.

I’ve issues determining how you can instantiate the subclass. How would the subclass be initialized as a part of a View Controller object on a storyboard?

I get the next error the place I name tremendous.init(for:) in my subclass. What’s a “designated initializer if init(for:) is just not thought of a delegated initializer?

init(with contact: CNContact) {
    tremendous.init(for: contact) // error right here saying: "Should name a delegated initializer of the superclass 'CNContactViewController'"
}

After I do not name any of tremendous’s initializer, I get an error like so:

init() {
    
} // error right here saying: "'tremendous.init' is not known as on all paths earlier than getting back from initializer"

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles