IOS commandid-°»

Source: Internet
Author: User

IOS commandid-°»

Öç° Ó Ð ×öò» Ö ö¶ ¨ λ µä~~ä~£;{à Ë {{{{^^^' {{µäço ¡£ *********************************************************************

~Â À mañañáñá ° ~~%********%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% please refer to the following link for more information:


2» ~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%, ~â ñé éöguíí ~£********************************************** crash micro? = "_ blank" class = "keylink"> vcD48cD48YnIgLz48L3A + PHA + expires/expires + PHA + expires + 9PDvfjI67rzzKi6887Sw8e/expires + expires/expires + PHA + vt/expires + expires "brush: java; "> @ property (nonatomic, unsafe_unretained) UIBackgroundTaskIdentifier bgTask;
AppDelegate. m

- (void)backgroundHandler{    NSLog(@"### -->backgroundinghandler");        UIApplication* app = [UIApplication sharedApplication];        bgTask = [app beginBackgroundTaskWithExpirationHandler:^{                [app endBackgroundTask:bgTask];        bgTask = UIBackgroundTaskInvalid;            }];        // Start the long-running task    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{                // ÄúÏë×öµÄÊÂÇé,        // ±ÈÈçÎÒÕâÀïÊÇ·¢Ë͹㲥, ÖØÐ¼¤»î¶¨Î»        // È¡µÃiosϵͳΨһµÄÈ«¾ÖµÄ¹ã²¥Õ¾ ֪ͨÖÐÐÄ        NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];        //ÉèÖù㲥ÄÚÈÝ        NSDictionary *dict = [[NSDictionary alloc]init];        //½«ÄÚÈÝ·â×°µ½¹ã²¥ÖÐ ¸øiosϵͳ·¢Ë͹㲥        // LocationThemeƵµÀ        [nc postNotificationName:@"LocationTheme" object:self userInfo:dict];    });    }

- (void)applicationDidEnterBackground:(UIApplication *)application{    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.        BOOL backgroundAccepted = [[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^{ [self backgroundHandler]; }];        if (backgroundAccepted)            {        NSLog(@"backgrounding accepted");    }    [self backgroundHandler];}



? Çööø Ð Â ¼ ¤» î ¨»

//³õʼ»¯BMKLocationService    myLocService = [[BMKLocationService alloc]init];    myLocService.delegate = self;    //Æô¶¯LocationService    [myLocService startUserLocationService];

NSNotificationCenter *nc2 = [NSNotificationCenter defaultCenter];        // ³ÉΪÌýÖÚÒ»µÓй㲥¾ÍÀ´µ÷ÓÃself recvBcast:º¯Êý    [nc2 addObserver:self selector:@selector(activeLocation:) name:@"LocationTheme" object:nil];

- (void) activeLocation:(NSNotification *)notify{    [myLocService stopUserLocationService];    //³õʼ»¯BMKLocationService    myLocService = [[BMKLocationService alloc]init];    myLocService.delegate = self;    //Æô¶¯LocationService    [myLocService startUserLocationService];}


Μ±é» £;é {% **************************************** comment 'µä±é ~~â ~~£

Ö» Ç çá~~~» öö½ â Ö ö° ~· ¨ ø mañane £.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.