performselector专题

performSelector延时调用

- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay; performSelector单线程调用,当函数执行完成后调用aSelector方法,afterDelay参数为延时多少秒 -(IBAction)confirm:(id)sender{

避免因为respondsToSelector:, performSelector:上线被拒

避免因为respondsToSelector:, performSelector:上线被拒 记得前段时间iOS开发者很多都收到了使用JSPatch被拒的邮件, Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to chang

实现performSelector 传递多个参数

- (id)performSelector:(SEL)selector withObjects:(NSArray *)objects   {       // 方法签名(方法的描述)       NSMethodSignature *signature = [[self class] instanceMethodSignatureForSelector:selector];       if (

performSelector:withObject:withObject:]: message sent to deallocated

被这个错误困扰和很长时间,有点莫名其妙,一开始老是从这个消息上检查,以为时事件绑定或者是代码问题,问题其实出现在deallocated上,因为controller被设置为autorelease,view被addsubview到某个container上,所以触发事件的时候,发送message到已经dealloc的controller上,导致上述错误。   其实以前已经发现过这个问题,就是作为全局变