“BgTask “ ? how long execute?

Answer Posted / babu

if you want to perform some long running in background you will do it with the help beginBackgroundTaskWithExpirationHandler:

Example:

bgTask = [app beginBackgroundTaskWithExpirationHandler:^{

[app endBackgroundTask:bgTask];

bgTask = UIBackgroundTaskInvalid;

}];

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is view controller xcode?

455


Explain me how to parse xml?

463


Explain how an autorelease pool works at the runtime level in iOS

551


Explain the difference between 'protocol' and 'delegate'?

410


How to deal with sqlite database?

494






What happens when we invoke a method on a nil pointer?

441


Explain formal protocols?

466


What are the location services?

487


What is mvc in ios?

488


Which language is used in ios?

427


What is the difference between copy and retain?

421


What is difference between 'protocol' and 'delegate'?

455


Explain what is ios?

460


What are the different delete rules that a relationship can have?

405


What is a view controller in ios?

420