FWAsyncTransaction
@interface FWAsyncTransaction : NSObject
FWTransaction let you perform a selector once before current runloop sleep.
-
Creates and returns a transaction with a specified target and selector.
Declaration
Objective-C
+ (nonnull FWAsyncTransaction *)transactionWithTarget:(nonnull id)target selector:(nonnull SEL)selector;
Parameters
target
A specified target, the target is retained until runloop end.
selector
A selector for target.
Return Value
A new transaction, or nil if an error occurs.
-
Commit the trancaction to main runloop.
Note
It will perform the selector on the target once before main runloop’s current loop sleep. If the same transaction (same target and same selector) has already commit to runloop in this loop, this method do nothing.Declaration
Objective-C
- (void)commit;