ios - Auto layout: changing a view's center x alignment programatically -



ios - Auto layout: changing a view's center x alignment programatically -

i have image view x centered label above it.

after tapping button, want image view x centered label. tried connecting constraint outlet , replacing new nslayoutconstraint (since cannot modify sec item) calling layoutifneeded on parent view, doesn't seem change.

[self.tabsview layoutifneeded]; self.tabindicatorcenterxalignment = [nslayoutconstraint constraintwithitem:self.tabindicatoriv attribute:nslayoutattributecenterx relatedby:nslayoutrelationequal toitem:_tabsbtnarray[pagenumber] attribute:nslayoutattributecenterx multiplier:1.0 constant:0]; [uiview animatewithduration:0.5 animations: ^{ [self.tabsview layoutifneeded]; }];

ios xcode autolayout

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -