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 -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -