Giter VIP home page Giter VIP logo

dqalertview's Issues

Alert showing in portrait mode when using landscape mode

Hey, nice library you got here~
But I am facing a small problem, while using ipad2 in landscape mode, the alert is showing in portrait mode

When I rotate ipad to portrait mode, alert stays same in portrait mode.

Any clue why this might be happening ?

iOS 8.x crash at - (void)dismiss if (self.blackOpaqueView) {

hi, I found that in iOS 8.x, when touch the blackOpaqueView to dismiss the alertView, it crashed.
I finally found that in - (void)dismiss method, the last else if remove self from superView, and then access the blackOpaqueView property by self.blackOpaqueView.That leads to BAD_ACCESS.
I fixed it by moving remove subviews code before self remove from superView.

code before: crash

  • (void)dismiss {
    ...
    else if (self.disappearAnimationType == DQAlertViewAnimationTypeNone)
    {
    [self removeFromSuperview];
    }

    if (self.blackOpaqueView) {
    [UIView animateWithDuration:timeDisappear animations:^{
    self.blackOpaqueView.alpha = 0;
    } completion:^(BOOL finished) {
    [self.blackOpaqueView removeFromSuperview];
    }];
    }
    }
    code after: ok

  • (void)dismiss {
    if (self.blackOpaqueView) {
    [UIView animateWithDuration:timeDisappear animations:^{
    self.blackOpaqueView.alpha = 0;
    } completion:^(BOOL finished) {
    [self.blackOpaqueView removeFromSuperview];
    }];
    }

...
else if (self.disappearAnimationType == DQAlertViewAnimationTypeNone)
{
[self removeFromSuperview];
}
}

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.