我的代码是这样的:
self.childView= [[UIView alloc]initWithFrame:screen];
    [self.view addSubview: self.childView];
    self.childView.backgroundColor = [UIColor redColor];
    
    UIButton *button = [[UIButton alloc]init];
    [self.childView addSubview: button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.edges.mas_equalTo(self.childView).with.insets(UIEdgeInsetsMake(100, 200, 100, 100));
    }];使用masonry来给视图自动添加约束,思路-->父视图上面添加一个子视图,该子视图上面把所有要显示的视图都添加在它上面但运行报错:
Exception:-[UIButton mas_makeConstraints:]: unrecognized selector sent to instance 0x7feef061f520大神求帮助