ios - Issues with animating view with bottom constraint -


i have been trying animate bottom constraint of view within parent view without success. event triggers view animation keyboardwillshow event , want view lay on top of keyboard. here code within keyboard observer.

-(void)keyboardwillshow:(nsnotification *)notification {     [self.view.constraints enumerateobjectsusingblock:^(nslayoutconstraint *constraint, nsuinteger index, bool *stop){          if((constraint.secondattribute == nslayoutattributebottom) && (constraint.seconditem == self.messagecontainerview))         {              nslog(@"will change value");             constraint.constant = keyboardframe.size.height;          }       }];      [uiview animatewithduration:0.2 animations:^{           [self.view layoutifneeded];      }]; 

within storyboard file these properties of vertical space -bottom constraint

  • firstitem : bottom layout guide.top
  • relation : equal
  • seconditem : viewthatwillanimate.bottom

i satisfying condition not see view animate or move.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -