Created
November 20, 2012 23:32
-
-
Save naotokui/4122008 to your computer and use it in GitHub Desktop.
Revisions
-
naotokui renamed this gist
Nov 20, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
naotokui renamed this gist
Nov 20, 2012 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ // バックグラウンド処理のスタートを宣言 UIBackgroundTaskIdentifier bgTask = UIBackgroundTaskInvalid; bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ [[UIApplication sharedApplication] endBackgroundTask:bgTask]; }]; -
naotokui created this gist
Nov 20, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // バックグラウンド処理のスタートを宣言 UIBackgroundTaskIdentifier bgTask = UIBackgroundTaskInvalid; bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler: ^{ [[UIApplication sharedApplication] endBackgroundTask:bgTask]; }]; /* ここでやりたい処理をする */ // バックグラウンド処理の終了 if (bgTask != UIBackgroundTaskInvalid){ [[UIApplication sharedApplication] endBackgroundTask:bgTask]; bgTask = UIBackgroundTaskInvalid; }