美文网首页
方法需传参数为SEL时的注意

方法需传参数为SEL时的注意

作者: 訷訷 | 来源:发表于2016-04-18 22:19 被阅读46次

    调用系统方法需要传@selector()建议打开方法定义查看注释是否有说明@selector格式
    例如:

    [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
    UIImageWriteToSavedPhotosAlbum(self.imageView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
    

    相关文章

      网友评论

          本文标题:方法需传参数为SEL时的注意

          本文链接:https://www.haomeiwen.com/subject/bfmalttx.html