美文网首页
swift seloctor 用法

swift seloctor 用法

作者: 小天9959 | 来源:发表于2016-04-13 12:39 被阅读0次

    private func addNotificationObserver() {

    NSNotificationCenter.defaultCenter().addObserver(self, selector:#selector(Class.keyboardWillShow(_:)), name:UIKeyboardWillShowNotification, object:nil)

    NSNotificationCenter.defaultCenter().addObserver(self, selector:#selector(Class.keyboardWillHidden(_:)), name:UIKeyboardWillHideNotification, object:nil)

    }

    @objc private funckeyboardWillShow(notify:NSNotification) {

    print("show+++")

    }

    @objcprivatefunckeyboardWillHidden(notify:NSNotification) {

    print("hidden+++")

    }

    相关文章

      网友评论

          本文标题:swift seloctor 用法

          本文链接:https://www.haomeiwen.com/subject/cqdikttx.html