美文网首页iOS相关iOS学习录
makeObjectsPerformSelector 方法的用法

makeObjectsPerformSelector 方法的用法

作者: Style_伟 | 来源:发表于2016-10-19 17:18 被阅读489次
    • 1mianSc移除所有subviews 这个很不错
    [self.mianSc.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
    
    • 2 makeObjectsPerformSelector:@select(aMethod)
      简介:让数组中的每个元素 都调用 aMethod

    • 3 makeObjectsPerformSelector:@select(aMethod)
           withObject:oneObject
      简介:让数组中的每个元素 都调用 aMethod 并把 withObject 后边的 oneObject 对象做为参数传给方法aMethod

       /*将检测到的该自动插入的交易插入[数据库]*/
       [array makeObjectsPerformSelector:@selector(setRecurringDelegate:)
                                      withObject:self];
       /*将检测到的该自动插入的交易插入数据库*/
       [array makeObjectsPerformSelector:@selector(insertRecursion)]; 
    

    相关文章

      网友评论

        本文标题:makeObjectsPerformSelector 方法的用法

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