Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:31:09+00:00 2026-06-13T23:31:09+00:00

got this code: [self setQRCodeScannerMode:false]; [self.activityIndicator startAnimating]; TBXMLSuccessBlock successBlock = ^(TBXML *tbxmlDocument) { if

  • 0

got this code:

[self setQRCodeScannerMode:false];
[self.activityIndicator startAnimating];
TBXMLSuccessBlock successBlock = ^(TBXML *tbxmlDocument) {
    if ([[TBXML elementName:tbxmlDocument.rootXMLElement] isEqualToString:@"xxxxxx"]){
        [self setQRCodeScannerMode:true];
    } else {
        [self setQRCodeScannerMode:true];
    }
};

The thing is that when I set my scan mode to true inside the method [setQRCodeScannerMode] I’m stopping the activity indicator.
But surprise!!! the activity indicator is still working and messing with my view after some seconds.

What can I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:31:11+00:00Added an answer on June 13, 2026 at 11:31 pm

    You need to stop the activity indicator in your completion block:

    [self setQRCodeScannerMode:false];
    [self.activityIndicator startAnimating];
    TBXMLSuccessBlock successBlock = ^(TBXML *tbxmlDocument) {
        if ([[TBXML elementName:tbxmlDocument.rootXMLElement] isEqualToString:@"xxxxxx"]){
            [self setQRCodeScannerMode:true];
        } else {
            [self setQRCodeScannerMode:true];
        }
    
        [self.activityIndicator stopAnimating];
    };
    

    This assumes the completion block is called on the main thread. If there is no guarantee that the completion block is called on the main thread you can do this:

    [self setQRCodeScannerMode:false];
    [self.activityIndicator startAnimating];
    TBXMLSuccessBlock successBlock = ^(TBXML *tbxmlDocument) {
        if ([[TBXML elementName:tbxmlDocument.rootXMLElement] isEqualToString:@"xxxxxx"]){
            [self setQRCodeScannerMode:true];
        } else {
            [self setQRCodeScannerMode:true];
        }
    
        if ([NSThread isMainThread]) {
            [self.activityIndicator stopAnimating];
        } else {
            dispatch_async(dispatch_get_main_queue(), ^{
                [self.activityIndicator stopAnimating];
            });
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this code: def __parse(self): for line in self.lines: r = Record(line) self.records[len(self.records):]
I've got this nifty little piece of code here that self-propogates ad infinitum every
I've got this code I'm using to insert data into Highcharts def self.amount_on(date) where(date(created_at)
I've got this in my CALayer drawing code - (void) drawInContext:(CGContextRef)ctx { self.frame =
I got this code: - (void)saveImageWithData:(NSData*)jpeg andDictionary:(NSDictionary*)dicRef andName:(NSString*)name { self.capturedImageName = name; self.dict =
Got this code in my controllers (void)viewDidLoad method self.purchasesPerClassification = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@Moo,nil] forKeys:[NSArray
I've got this code update_questions: function() { alert(UPDATING!!); }, poll: function() { var self
I got this code: var config = {}; config.knock = { self:null, init :
I've got this piece of code: jabberid = xmpp.protocol.JID(jid = jid) self.client = xmpp.Client(server
I've got this: if ([[currentPlayer rankicon] isEqualToString:@0]) { self.casteImage.image = [casteImages objectAtIndex:0]; } Which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.