ios - 使用Masonry 报NSInternalInconsistencyException错误
伊谢尔伦
伊谢尔伦 2017-04-17 16:55:35
0
3
712
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

Antworte allen(3)
小葫芦
make.top.mas_equalTo(weakSelf.view).width.offset(200);

not width, but with

左手右手慢动作

mas_equalTo 和 equalTo的区别需要注意下

  [self.view addSubview:btn];
  [self.view addSubview:btn1];
    __weak __typeof(&*self)weakSelf = self;
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(100, 50));
        make.left.equal(weakSelf.view).offset(200);
        make.top.equal(weakSelf.view).offset(200);
    }];
    [btn1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(100, 100));
        make.left.equal(weakSelf.view).with.offset(50);
        make.top.equal(weakSelf.view).width.offset(200);
    }];
阿神

我居然也把with写成了width,直接跪了。

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage