Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Adding to project freezes user input, does not show dotzu floating button #13

Closed
jonchui opened this issue Mar 6, 2017 · 3 comments
Closed

Comments

@jonchui
Copy link

jonchui commented Mar 6, 2017

It's weird because we're using this in 2 different projects.

The first one is an older project that has been in development for 2 years. When i follow instructions to add to the AppDelgate via Dotzu.sharedManager.displayWindow(), it

  1. does not show dotzu manager
  2. seems to freeze all user input on the screen (UI interaction works, b/c i set an animation and that still works, just all user input is gone.

On a newer project, that i just created last week, calling Dotzu.sharedManager.displayWindow() works.

How can i debug what the issue is?
It looks like when i hit Xcode's Debug | Print View Hierarchy I see:

image
And when i print of description of UIWindow i get:

po 0x7fe6fc40d450 <UIWindow: 0x7fe6fc40d450; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x6180000527e0>; layer = <UIWindowLayer: 0x618000028640>>

After casting it:

(lldb) expr -l Swift -- print($nav) <UIWindow: 0x7fe6fc40d450; frame = (0 0; 414 736); gestureRecognizers = <NSArray: 0x6180000527e0>; layer = <UIWindowLayer: 0x618000028640>>

I debug, and everything seems right:

0.0
(lldb) expr -l Swift -- print($nav.screen)
<UIScreen: 0x7fe6fc700280; bounds = {{0, 0}, {414, 736}}; mode = <UIScreenMode: 0x61000003f720; size = 1242.000000 x 2208.000000>>
(lldb) expr -l Swift -- print($nav.makeKeyAndVisible)
(Function)
(lldb) expr -l Swift -- print($nav.rootViewController)
Optional(<OrdersViewLite.NavigationController: 0x7fe6fd00fa00>)```
@remirobert
Copy link
Owner

there is something very wrong. it's like your user experience is on the Dotzu UIWindow.

See a correct structure to work with Dotzu :
screen shot 2017-03-06 at 22 17 40

Maybe you are doing some stuff with the UIWindow, and you are selecting the Dotzu's one.

@jonchui
Copy link
Author

jonchui commented Mar 6, 2017

Ah, figured it out: Turns out the old project hadn't called "

self.window?.makeKeyAndVisible() in AppDelegate#didFinishLaunching

Hm... i guess if you don't call it, and no other window calls it, apple just assumes you're the only window and makes you key & visible

@jonchui jonchui closed this as completed Mar 6, 2017
@remirobert
Copy link
Owner

Thanks for letting me know.

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

No branches or pull requests

2 participants