彼得潘的App異想世界
著作: Swift程式設計入門,App程式設計入門 iPhone . iPad ~ 作家,專欄作家,工程師, 講師,顧問,家教, App評審,企業包班,創業家
顯示具有
iOS multitasking
標籤的文章。
顯示所有文章
顯示具有
iOS multitasking
標籤的文章。
顯示所有文章
2011年4月8日 星期五
UIKit and thread
when dealing with UIKit class, we must be in the main thread
If we are not in the main thread,
and we want to modify label's text,
we must do following
->
[textLabel
performSelectorOnMainThread
:
@selector
(setText:)
withObject
:
@"hello"
waitUntilDone
:
YES
];
operation is iOS SDK
Add operations into operation queue and queue will manage operation for us
operation type:
1. Block operation
2. Invocation operation
3. Plane operation
operation 執行的順序和加入operation queue的順序無關
2011年3月25日 星期五
multitasking on iOS
判斷是否support多工
UIDevice
*device = [
UIDevice
currentDevice
];
if
([device
isMultitaskingSupported
])
{
}
較舊的文章
首頁
訂閱:
文章 (Atom)