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:

  1. right-click storyboard, select open --> source code

  2. the storyboard xml file. find view want change. replace <view ...> ... </view> <imageview ...> ... </imageview>. don't change else.

  3. right-click storyboard again, , open in interface builder. views have been converted uiimageviews , can access normal uiimageview attributes.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -