第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

iOS 使用Masonry庫做動畫時報錯?

iOS 使用Masonry庫做動畫時報錯?

牧羊人nacy 2019-05-24 19:01:21
1.實現(xiàn)過程:在VCviewDidload方法中self.viewaddSubView:aLabel,viewWillLayoutSubviews中使用Masonry添加label約束;另外界面有一個button,當(dāng)當(dāng)點擊button時候做動畫.-(void)viewDidLoad{[superviewDidLoad];[self.viewaddSubview:self.nameLabel];}-(UILabel*)nameLabel{if(!_nameLabel){_nameLabel=[[UILabelalloc]initWithFrame:CGRectZero];_nameLabel.lineBreakMode=NSLineBreakByTruncatingTail;_nameLabel.text=@"王二小";_nameLabel.backgroundColor=[UIColorgreenColor];_nameLabel.textAlignment=NSTextAlignmentLeft;}return_nameLabel;}-(void)viewWillLayoutSubviews{[selfaddCContraints];}-(void)addCContraints{[self.nameLabelmas_makeConstraints:^(MASConstraintMaker*make){make.left.equalTo(self.view.mas_left).offset(10);make.top.equalTo(self.view.mas_top).offset(10);}];}//點擊button的響應(yīng)時間.-(void)animationAction{///設(shè)置長度.[self.nameLabelmas_updateConstraints:^(MASConstraintMaker*make){make.left.mas_equalTo(-30);}];[UIViewanimateWithDuration:0.3animations:^{[self.nameLabel.superviewlayoutIfNeeded];}];}**"約束沖突信息:"**2017-08-0922:24:47.196344NSString[13501:3837010][LayoutConstraints]Unabletosimultaneouslysatisfyconstraints.Probablyatleastoneoftheconstraintsinthefollowinglistisoneyoudon'twant.Trythis:(1)lookateachconstraintandtrytofigureoutwhichyoudon'texpect;(2)findthecodethataddedtheunwantedconstraintorconstraintsandfixit.("","")WillattempttorecoverbybreakingconstraintMakeasymbolicbreakpointatUIViewAlertForUnsatisfiableConstraintstocatchthisinthedebugger.ThemethodsintheUIConstraintBasedLayoutDebuggingcategoryonUIViewlistedinmayalsobehelpful.跟了下Masonry執(zhí)行過程也沒發(fā)現(xiàn)什么問題.有朋友遇到過這種問題么?感謝在先.
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 508 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號