Giter Club home page Giter Club logo

Comments (5)

farhan-syed avatar farhan-syed commented on May 30, 2024

i have to stop the app in xcode then rerun it to get the app unfrozen

from lgalertview.

duongsavvycom avatar duongsavvycom commented on May 30, 2024

Same error ! My app is freeze sometime by using LGAlertView !
Please fix this

from lgalertview.

duongsavvycom avatar duongsavvycom commented on May 30, 2024

I tried this and it seems ok !

dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
//Background Thread
dispatch_async(dispatch_get_main_queue(), ^(void){
//Run UI Updates
});
});

from lgalertview.

farhan-syed avatar farhan-syed commented on May 30, 2024

thanks ill try it out!

Farhan Syed
Founder of BrandSpace

On Sun, Jun 26, 2016 at 9:25 PM, savvycodehelper [email protected]
wrote:

I tried this and it seems ok !

dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT,
0), ^(void){
//Background Thread
dispatch_async(dispatch_get_main_queue(), ^(void){
//Run UI Updates
});
});


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#11 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AJI095L39ckjRm19Pkf_sQ7hdyjbaSplks5qP1DUgaJpZM4HaTvP
.

from lgalertview.

Friend-LGA avatar Friend-LGA commented on May 30, 2024

You need to use main thread to update UI.

If you use callbacks like actionHandler you need to create weak reference to self and use it instead self

__weak typeof(self) wself = self;

[[LGAlertView alloc] initWithTitle:@"Title"
                           message:@"Message"
                             style:LGAlertViewStyleAlert
                      buttonTitles:nil
                 cancelButtonTitle:@"Cancel"
            destructiveButtonTitle:nil
                     actionHandler:^(LGAlertView *alertView, NSString *title, NSUInteger index) {
                         __strong typeof(wself) sself = wself;

                         [sself someMethod];
                         sself.someProperty = someValue;
                     }
                     cancelHandler:nil
                destructiveHandler:nil];

Looks like bugs in your code.

from lgalertview.

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.