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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -