Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternatives to UIApplication subclassing and method swizzling #19

Open
nostradani opened this issue Jan 29, 2016 · 3 comments
Open

Alternatives to UIApplication subclassing and method swizzling #19

nostradani opened this issue Jan 29, 2016 · 3 comments

Comments

@nostradani
Copy link

Hi,

We stumbled across your lib and integrated it into one of our apps. Unfortunately we had to deal with a few bugs (e.g. Touchpose not being displayed correctly on the keyboard in some cases), as well as some crashes, since we wanted to toggle this feature on and off while the app is running.

Within this whole process we did ended up with a complete rewrite in Swift since we introduced major changes.
Basically our version now has the following features:

  • The whole component is not a subclass of UIApplication anymore. This enables other UIApplication subclasses to be used.
  • No method swizzling needed anymore.
  • Use of its own window. This keeps the apps view hierarchy untouched and makes it overall more independent and less invasive.

So we thought, the project might benefit from our changes. However since this basically a complete rewrite (also completely done in Swift), this might be a reason not to use it.

So would it make sense to provide a pull request with this rewrite?

@johndpope
Copy link

johndpope commented May 15, 2016

it makes sense to me - please share this code.

N.B. for latest xcode - the readme needs some updating for swift.
Otherwise you may get use of unresolved identifier 'QTouchposeApplication'

import Touchpose // simple enough fix.

UIApplicationMain(Process.argc, Process.unsafeArgv, NSStringFromClass(QTouchposeApplication.self), NSStringFromClass(AppDelegate.self))

@johndpope
Copy link

screen shot 2016-05-15 at 5 04 38 pm

@toddreed
Copy link
Owner

@nostradani: First, sorry for totally ignoring your inquiry for so long. I must have missed the notification from GitHub and since I haven't done any work with the Touchposé project in a long while, I never noticed it.

Is your Swift clone of Touchposé open source? I'd be interested at looking at it to see how it's implemented and whether it's worth incorporating the techniques into Touchposé.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants