//集合或数组里面的每一个元素都去执行 aSelector
- (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
//使用方法
[self.smallScrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
//集合或数组里面的每一个元素都去执行 aSelector 。且把 withObject 后边的 argument 对象做为参数传给方法 aSelector。
- (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
//使用方法
//argument作为对象参数传递给aSelector,然后循环之行
[self.array makeObjectsPerformSelector:@selector(setHidden:) withObject:@YES];
网友评论