Comments (14)
Ok, i found solution. If somebody need it just ask! ;)
from klcpopup.
I am getting same issue after adding Google Mobile Ads 7.0
Please help me out how to solve this issue.
Regards
Alok
from klcpopup.
Hi,
@anclefeudor
Can you Please provide the solution for the same.
Regards
Alok
from klcpopup.
i have same issue :(
@anclefeudor , @alokfuterox please help.
Thanks advance.
from klcpopup.
I think Google used same upper view for default popup, so we need to define custom root layer for popup.
As a quick fix i just create a new method:
KLCPopup.h
- (void)showWithRoot:(UIView*)view;
KLCPopup.m
- (void)showWithRoot:(UIView*)view {
NSDictionary* parameters = @{@"layout" : [NSValue valueWithKLCPopupLayout:KLCPopupLayoutCenter],
@"duration" : @"0.0",
@"root" : view};
[self showWithParameters:parameters];
}
and replace
if(!self.superview){
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
[window addSubview:self];
break;
}
}
}
with this
if(!self.superview){
UIView* rootView = [parameters valueForKey:@"root"];
if(rootView == nil){
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
[window addSubview:self];
break;
}
}
}else{
[rootView addSubview:self];
}
}
And of course you need to use this method for show popup.
Just create some empty view and use it as root for popup.
Actually it must be fixed - (void)showAtCenter:(CGPoint)center inView:(UIView*)view
method, but i'm lazy, sorry...
from klcpopup.
@anclefeudor thanks for your reply, I've done it 🎉
Again, Thank you so much!
from klcpopup.
@anclefeudor
Thank a lot.
Regards
Alok
from klcpopup.
Awesome workaround. Thanks a bunch!
from klcpopup.
Thank you for fast fix!
from klcpopup.
It is still not working for me. I tried it on iOS 7.1 and it's working fine. But on iOS 8.1 and 8.4, nothing is showing up.
from klcpopup.
Sorry, in 8.4.1 my fix is work. Check your code twice!
from klcpopup.
I made it work by making self.view of the viewController as rootview.
from klcpopup.
Thank you @anclefeudor
from klcpopup.
How about this fix?
@@ -541,7 +541,7 @@ - (void)showWithParameters:(NSDictionary*)parameters {
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
- if (window.windowLevel == UIWindowLevelNormal) {
+ if (window.windowLevel == UIWindowLevelNormal && !window.isHidden) {
[window addSubview:self];
break;
from klcpopup.
Related Issues (20)
- How to use contentView with storyboard? HOT 1
- How to avoid scrolling?
- It doesn't support landscape mode on iPad? HOT 2
- IBAction Don't fire from xib view HOT 2
- How to change layout after showing
- i am tried to open in klcpopup when tap the object in tableviewcell HOT 1
- `.GrowIn` showType animates from the wrong origin after the first time
- handle the keyboard
- Cannot dismiss when showing animation is in progress. HOT 1
- showAtCenter:inView: doesn't actually show the popup inside the view
- KLCPopup view display in full screen
- KLCPopUP instanse can not load collactionView
- Compilation Errors after adding KLCPopup folder to Swift 3 project HOT 3
- Subview doesnt pass the touch forward in case mask type is KLCPopupMaskTypeNone
- typedef NS_ENUM underclared identifier (HOW TO FIX?) HOT 1
- App Crash on KLCPopup show
- KLCPopup does not support device orientation
- How can I present UIActionsheet from presented KLCPopup?
- iphone 6 Plus iOS 11.3.1 issue HOT 1
- https://github.com/LoSenTrad/LSTPopView
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 klcpopup.