Coder Social home page Coder Social logo

Popup doesn't show at all about klcpopup HOT 11 OPEN

jmascia avatar jmascia commented on July 21, 2024
Popup doesn't show at all

from klcpopup.

Comments (11)

chatdanai avatar chatdanai commented on July 21, 2024 18

in KLCPopup.m
replace line 538 from
if (window.windowLevel == UIWindowLevelNormal) {

to

if (window.windowLevel == UIWindowLevelNormal && window.hidden == NO) {

may be help

from klcpopup.

TolgaB avatar TolgaB commented on July 21, 2024

It works. Can you post you're code.

from klcpopup.

xarlotie avatar xarlotie commented on July 21, 2024

I just used your sample code and inserted it in my codes.

- (void) switchChanged:(id)sender {
    UISwitch * switchControl = sender;
    NSLog( @"SWITCH The switch is %@", switchControl.on ? @"ON" : @"OFF" );

    if(switchControl.on) {
        NSLog(@"SWITCH Show it!");
        [self.popup show];
    }
}

- (KLCPopup *) popup{
    if (_popup == nil){
        UIView* contentView = [[UIView alloc] init];
        contentView.translatesAutoresizingMaskIntoConstraints = NO;
        contentView.backgroundColor = [UIColor whiteColor];
        contentView.layer.cornerRadius = 12.0;

        UILabel* dismissLabel = [[UILabel alloc] init];
        dismissLabel.translatesAutoresizingMaskIntoConstraints = NO;
        dismissLabel.backgroundColor = [UIColor clearColor];
        dismissLabel.textColor = [UIColor whiteColor];
        dismissLabel.font = [UIFont boldSystemFontOfSize:72.0];
        dismissLabel.text = @"Hi.";

        [contentView addSubview:dismissLabel];

        _popup = [KLCPopup popupWithContentView:contentView];
    }

    return _popup;
}

from klcpopup.

TolgaB avatar TolgaB commented on July 21, 2024

Try doing it this way,

KLCPopup* popup = [KLCPopup popupWithContentView:contentView];
popup.dimmedMaskAlpha = .85;
[popup show];

from klcpopup.

xarlotie avatar xarlotie commented on July 21, 2024

I already copied the whole ViewController code in your example and calls that controller within my app but the popup still does not appear. I also tried other popup libraries but they all don't show up. What could be the problem?

from klcpopup.

xarlotie avatar xarlotie commented on July 21, 2024

I found the real culprit. I tried it on iOS 7.1 and it worked. It is not working on iOS 8 (as tested on iOS 8.1 and 8.4).

What do you think is the problem here? Thanks!

from klcpopup.

xarlotie avatar xarlotie commented on July 21, 2024

I tried to run the sample project included in this repo on an ios 8.4 simulator and it worked. But i still can't figure out why it doesn't work when included within my application. Any help will be so much appreciated. Thanks!

from klcpopup.

umutafacan avatar umutafacan commented on July 21, 2024

@chatdanai Thanks a lot.
It should be updated like that.

from klcpopup.

AnthoPakPak avatar AnthoPakPak commented on July 21, 2024

@chatdanai Thanks !!! Suddenly KLC didn't showed up anymore, whereas it has been working for months very well. The only thing I've done is adding Firebase and Google frameworks, weird... If someone has an explanation for this 👍
Your solution worked for me !!!

from klcpopup.

amtung avatar amtung commented on July 21, 2024

@chatdanai your solution worked! I'm just curious, the pod has been working fine for months and suddenly stop working. Do you have an explanation for this?

from klcpopup.

chatdanai avatar chatdanai commented on July 21, 2024

@amtung I haven't dug into the detail. I thought when ios updated, window, view structure may be change.

from klcpopup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.