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
rootView some times problem in this place of logic. #57
Comments
I just got bit by I looked at the closed issues here and I see #46 and #47 are related, and explain why the But I'm curious as to why this In my case, I am using a debugging tool called DCIntrospect-ARC. It inserts a view, I can work around my own special case there (and depending how all this goes, I can submit the workaround in a pull request). But I'd rather see if there's a more solid solution to be had on this issue. Thanx @nicolaschengdev for both the class itself (so far it seems like the best popover replacement out there these days), and for your consideration on this matter. |
I see on github there have been issues with this -rootView method, similiar to what I encountered. There’s an open issue on this, and I added my voice to it, regarding my particular case: nicolaschengdev#57
Hi, a more solid solution is to add popover on top of subviews. In the same window of the view which is passed as argument in the following method :
I am currently working in order to implement this solution. And to support orientation and keyboard with this solution. |
Cool. I will look at this in the coming days and let you know how it goes. Thank you! |
Finally got a chance to try this out. So far so good! Seems like a better solution all around. Thanx. |
Modified code that deals with repositioning popover on orientation change
Probably it will be great not only check for if(!view.isHidden) because when I use hud it's the first element :) Maybe it will be better to check for [view isKindOfClass:UIViewController] ?
(UIView *)rootView
{
UIWindow *result = [[UIApplication sharedApplication] keyWindow];
if (result.subviews.count > 0)
{
for (UIView *view in result.subviews)
{
if(!view.isHidden)
{
return view;
}
}
// result = [result.subviews lastObject];
}
return result;
}
The text was updated successfully, but these errors were encountered: