Git Product home page Git Product logo

alert's Introduction

吴海德 Whde

个人信息吴海德

  • 1989–11-29
  • 广西·贺州【现居深圳民治】
  • 158 1404 5532(广东·深圳 移动)
  • [email protected]
  • 本科 - 毕业于 南昌航空大学

alert's People

Contributors

whde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

alert's Issues

设置self.window.rootViewController 后对话框不显示

设置self.window.rootViewController 后对话框不显示
下面是修复方案

- (void)show {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self needsDisplay];
       UIWindow *window = ((UIWindow *)[[UIApplication sharedApplication] windows][0]);
        [window addSubview:self];
        [window endEditing:YES];
        [self performPresentationAnimation];
    });
}

修改为

- (void)show {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self needsDisplay];
       UIWindow *window = ((UIWindow *)[UIApplication sharedApplication].keyWindow);
        [window addSubview:self];
        [window endEditing:YES];
        [self performPresentationAnimation];
    });
}

对cancel按钮事情处理的意见

if (hasCancelBtn == YES ){
[button addTarget:self action:@selector(cancalClick:) forControlEvents:UIControlEventTouchUpInside];
}else{
[button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
}
处理的事情,只要有cancel的按钮,所有的按钮都执行的是cancelclick事件,导致了,点击了不是cancel的按钮都会执行cancel事件

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.