Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

让每个子视图执行某个方法 #6

Open
xaoxuu opened this issue Apr 27, 2017 · 0 comments
Open

让每个子视图执行某个方法 #6

xaoxuu opened this issue Apr 27, 2017 · 0 comments

Comments

@xaoxuu
Copy link
Owner

xaoxuu commented Apr 27, 2017

目前可以根据子视图的类来只选择某些子视图,代码如下:

[self.topView ax_eachSubview:[UIImageView class] action:^(__kindof UIView * _Nonnull subview) {
        
}];

计划增加一种可以根据tag值或者selected状态来选定特定类型的子视图,如:

[self.view ax_eachSubview:[UIImageView class] tag:1 action:^(__kindof UIView * _Nonnull subview) {
        
}];
    
[self.view ax_eachSubview:[UIButton class] selected:YES action:^(__kindof UIView * _Nonnull subview) {
        
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant