Comments (8)
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.
Thanks for your backlogs!
from touchvisualizer.
can you please explain why is swizzledDescription there in first place? what purpose does it serve?
from touchvisualizer.
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...
from touchvisualizer.
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.
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.
@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.
I have same problem in my app.
from touchvisualizer.
Related Issues (20)
- Swift 5.0 Support HOT 1
- Xcode 11.4 compile errors with TouchVisualizer cocoapod HOT 3
- In ReplayKit recording the touch is not shown
- Why do I have to reactivate my app for this to work? HOT 1
- How to disable TouchVisualizer HOT 1
- Swift 3 HOT 2
- Xcode8 and iOS10 HOT 5
- Displaying touches on windows other than the key window HOT 2
- Get touch position HOT 1
- There is no /pod on the code page for manual installs.
- The swizzle () method is not called when calling the start () method after launching HOT 3
- Swift 4/Xcode9 Support HOT 3
- Feature suggestion: Apple Pencil support HOT 1
- Display touches in a SFSafariViewController HOT 2
- App crashes HOT 3
- Pod version slightly outdated in `pod search` result HOT 2
- Swizzle not called on start after launch in 3.0.2
- Compile error on Bitrise HOT 1
- Not working when enabling inside AppDelegate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from touchvisualizer.