Thursday, April 25, 2024
HomeiOS Developmentios - How can I entry information in mainviewcontroller from extension?

ios – How can I entry information in mainviewcontroller from extension?


enter picture description right here

I am writing customized keyboard app.And that i wish to assign the title worth within the UIviewcontroller to the title of the button on the keyboard. Nonetheless, I do not know how you can get the title worth from the extension.

Assist pls

protocol p: AnyObject {
    func p(s: String)
}
public class ViewController: UIViewController {
    
    weak var delegate : p?

    public var keyboardTitle = "sdnflamkdfa"
    
    
    public override func viewDidLoad() {
        tremendous.viewDidLoad()
        delegate?.p(s: keyboardTitle)
        // Do any further setup after loading the view.
    }


}

class KeyboardViewController: UIInputViewController, p {
    
    func p(s: String) {
            print(s)

    }
    
    
    override func updateViewConstraints() {
        tremendous.updateViewConstraints()
    }
    
   
    override func viewDidLoad() {}



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments