Giter Site home page Giter Site logo

When i run the sample,it got errors from the keyboardManager ,i am not good at swift ,how should i tackle with it ? about richeditorview HOT 7 CLOSED

cjwirth avatar cjwirth commented on May 22, 2024
When i run the sample,it got errors from the keyboardManager ,i am not good at swift ,how should i tackle with it ?

from richeditorview.

Comments (7)

jesiegel1 avatar jesiegel1 commented on May 22, 2024 1

The selector syntax is different for Swift 2.2. For your version, you should use NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("KeyboardManager.keyboardWillShowOrHide:"), name: UIKeyboardWillShowNotification, object: nil)

from richeditorview.

jesiegel1 avatar jesiegel1 commented on May 22, 2024

what version of Xcode are you using?

from richeditorview.

KKKiller avatar KKKiller commented on May 22, 2024

7.2.1

from richeditorview.

cjwirth avatar cjwirth commented on May 22, 2024

The syntax for selectors was improved in Swift 2.2, and Xcode 7.3. Since Xcode 7.3 official was released, I upgraded the sample project to be run on 7.3 instead of 7.2.

If you still want to run it on 7.2, you can change it from #selector(KeyboardManager.keyboardWillShowOrHide(_:)) to Selector("keyboardWillShorOrHide:") and it should work. (I didn't try it, so the syntax might be wrong, but you need to use string-based selectors rather than the new ones)

from richeditorview.

KKKiller avatar KKKiller commented on May 22, 2024

it success when i run on 7.3,but it was not scroll when the word is under the keyboard,

from richeditorview.

jesiegel1 avatar jesiegel1 commented on May 22, 2024

because the fix for that bug hasn't been merged yet, it's a wip. please see pull req #34

from richeditorview.

cjwirth avatar cjwirth commented on May 22, 2024

it success when i run on 7.3

Awesome, closing this issue then 👍

but it was not scroll when the word is under the keyboard

I made a comment in pull request #34 so you can use the in-progress version of the project that should be fixed. It'd be great if you could use it and make sure it works before we merge it in!

from richeditorview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.