简体   繁体   English

在iOS中使用-(单向无效)

[英]use of - (oneway void) in iOS

Can anyone send me a sample code to write asynchronus method using "oneway" (oneway void) for iOS. 谁能给我发送示例代码来使用iOS的“单向”(oneway void)编写异步方法。 So that it will not block the calling thread until the method returns. 这样在方法返回之前它不会阻塞调用线程。

You can use the Following link for your requirement. 您可以根据需要使用以下链接。

http://iphone-dev-tips.alterplay.com/2009/10/asynchronous-uiimage.html http://iphone-dev-tips.alterplay.com/2009/10/asynchronous-uiimage.html

Have a look at the -performSelectorInBackground:withObject: method on NSObject . 看看NSObject上的-performSelectorInBackground:withObject:方法。 I also recommend Apples Threading Programming Guide for some best practices when using asynchronous methods. 我还建议使用Apples 线程编程指南,以获得使用异步方法时的一些最佳实践。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS4是否支持单向? - Is oneway supported in iOS4? ^(void)完成令牌使用什么 - What to use for ^(void)completion token -(void)scrollViewDidScroll:(UIScrollView *)scrollView在iOS 8中太慢 - - (void)scrollViewDidScroll:(UIScrollView *)scrollView too slow in iOS 8 如何在iOS中从-id返回void语句? - How to return a void statement from -id in iOS? Paypal MPL IOS不调用-(void)paymentSuccessWithKey - Paypal MPL IOS not calling - (void)paymentSuccessWithKey 如何使用-(void)requestFailed:(ASIHTTPRequest *)request - How to use -(void)requestFailed:(ASIHTTPRequest *)request (void)drawRect:(CGRect)rect iOS 5.1 OpenGL ES 2.0中的错误 - Errors in (void)drawRect:(CGRect)rect iOS 5.1 OpenGL ES 2.0 UITextField - (void)drawPlaceholderInRect:(CGRect)rect在iOS 7中返回不同的CGRect高度 - UITextField - (void)drawPlaceholderInRect:(CGRect)rect returns different CGRect height in iOS 7 ios8调用-(void)onKeyboardShow:(NSNotification *)notification两次 - ios8 calls - (void) onKeyboardShow:(NSNotification *)notification two times iOS 7和iOS 8在-(void)viewDidAppear:(BOOL)上的不同行为在部分卷曲VC上进行了动画处理 - Different behaviour in iOS 7 and iOS 8 on -(void)viewDidAppear:(BOOL)animated on Partial Curl VC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM