可能重复:
目标 C 中的插入符号
Objective-C 中的 ^ 符号是什么意思?
代码:
GreeRequestServicePopup* requestPopup = [GreeRequestServicePopup popup];
requestPopup.parameters = parameters;
requestPopup.willLaunchBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_will_launch_block" object:nil];
};
requestPopup.didLaunchBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_did_launch_block" object:nil];
};
requestPopup.willDismissBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_will_dismiss_block" object:nil];
};
requestPopup.didDismissBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_did_dismiss_block" object:nil];
};
requestPopup.cancelBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_cancel_block" object:nil];
};
requestPopup.completeBlock = ^(id aSender) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"request_service_popup_complete_block" object:nil];
};
[self.navigationController showGreePopup:requestPopup];
}
提前致谢!