ios - Swap views but maintain constraints in Interface Builder -
in interface builder, have uiview complex set of constraints attached it. best way of exchanging uiview uiimageview without having recreate constraints?
deleting uiview deletes constraints too.
nb: setting uiview's class uiimageview won't work because doesn't give me changeable attributes associated image view.
infuriatingly, there no smart answer this. ib has no ability let switch control types. oh, xcode, let down.
however there hacky way of doing it, described blog: http://codenetwaves.blogspot.com.br/2012/09/change-view-to-scrollview-in-xcode.html
the steps are:
right-click storyboard, select open --> source code
the storyboard xml file. find view want change. replace
<view ...> ... </view><imageview ...> ... </imageview>. don't change else.right-click storyboard again, , open in interface builder. views have been converted
uiimageviews , can access normaluiimageviewattributes.
Comments
Post a Comment