GithubHelp home page GithubHelp logo

Comments (8)

zarghol avatar zarghol commented on August 12, 2024 1

have the same problem in iOS 10 when I try to perform a segue (custom transition).
I fixed it but since I wait for merge the pull request for iOS 10, I can't send it unitary.
here it is : zarghol@dbaafdf

from touchvisualizer.

morizotter avatar morizotter commented on August 12, 2024

Thanks for your backlogs!

from touchvisualizer.

krunalsheth avatar krunalsheth commented on August 12, 2024

can you please explain why is swizzledDescription there in first place? what purpose does it serve?

from touchvisualizer.

morizotter avatar morizotter commented on August 12, 2024

When application becomes active, UIWindow's swizzle() method would be called. At that time, TouchVisualizer switches sendEvent with the custom sendEvent. But if this swizzle() method were called multiple times, it would switch methods again. To prevent this behavior, I created swizzlingMessage and changed description.

When swizzle() are called, checks if description contains this message first. And do nothing if description contains this swizzlingMessage . This is a hack. But there have to be a better way...

@krunalsheth

from touchvisualizer.

krunalsheth avatar krunalsheth commented on August 12, 2024

okay i see that in code now. I am new to "method swizzling" . so this may be a naive question. can you please explain why the "swizzle" needs to happen only when application becomes active? can't you do the same when Visualizer.start is called? with the current implementation, TouchVisualizer doesn't work if someone calls Visualizer.start long after application is started (imagine you have a "presentation mode" switch in the app and you want to show TouchVisualizer only when someone turns the switch) @morizotter

from touchvisualizer.

morizotter avatar morizotter commented on August 12, 2024

can you please explain why the "swizzle" needs to happen only when application becomes active?

I think it is because when user write Visualizer.start() in application: didFinishLaunchingWithOptions: it was too late because UIWindow maybe create after Visuzlizer.star(). At first stage of this library, Visualizer.start() is supposed to write in application:didFinish....

from touchvisualizer.

krunalsheth avatar krunalsheth commented on August 12, 2024

@morizotter are you saying Visualizer.start() need to be called only during application:didFinish? if so, i think documentation needs to be updated.

my original question was, can the code to swizzle be called inside Visualizer.start ? would that not work?

from touchvisualizer.

lm2343635 avatar lm2343635 commented on August 12, 2024

I have same problem in my app.

from touchvisualizer.

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.