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

Method of getting topView fails when using with DCIntrospect - popover doesn't appear #26

Open
jai opened this issue Apr 11, 2013 · 6 comments

Comments

@jai
Copy link

jai commented Apr 11, 2013

The line below (to get the topView) returns the DCIntrospect window instead of the application's window. I realize that DCIntrospect is kind of a unique-purpose tool and the conflict won't arise in production because DCIntrospect should never be used in production, but just wanted to give people a heads up in case they had issues with the Popover not showing. No error is thrown, just found it by tracing through the code.

  // get the top view
// http://stackoverflow.com/questions/3843411/getting-reference-to-the-top-most-view-window-in-ios-application/8045804#8045804
 topView = [[[[UIApplication sharedApplication] keyWindow] subviews] lastObject];
@ocrickard
Copy link
Contributor

Hey, yeah, this is actually the second or third time this has come up. We have struggled to find different ways to fix it, and the only good one that I came up with was adding a totally new window. I have a different branch on my local machine that has that code, though according to one of our peers here (sorry, it would take me awhile to find who) said it has problems with rotation. I'll try to push the branch to github today so you can take a look.

@ocrickard
Copy link
Contributor

Looks like I already pushed it: https://github.com/runway20/PopoverView/tree/New-Window

Let me know if this works for you. If it does, maybe I can spend some time in the next couple weeks configuring the rotation support properly.

@jai
Copy link
Author

jai commented Apr 11, 2013

Sure will check it out. Thanks for the great work by the way! I also semi-hacked a version of the PopoverView into a full-width popover. It 'kinda' supports rotation (dismisses when rotated but you can re-show it in landscape and it will resize to fit screen). It's really dirty but you can check it out in our beta app, in the photo gallery page (the comments popup): http://i.zodiobeta.com - currently a lot of the resizing happens outside the PopoverView class so I can't push it up yet, still trying to clean it up.

@ocrickard
Copy link
Contributor

Nice, I'll check that out! I certainly didn't write the component with rotation in mind (the app I've spent the last year on is iPhone portrait only), so it's a real challenge to get it working right.

@jai
Copy link
Author

jai commented Apr 11, 2013

Yeah I just need to find a way to make it dynamically redraw instead of forcibly resizing it from the outside. Also supporting keyboard appearing/disappearing at the same time isn't fun. Any comments on the app are appreciated, and thanks again!

@ocrickard
Copy link
Contributor

Interesting. I'll leave comments through your feedback system so it's not here on GitHub. If you get a clean branch ready, we can talk about merging changes.

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

No branches or pull requests

2 participants