xcode - Adding UIButton to UIImageView within UIScrollView on Swift -
i writing application event organization hosting using swift. have image floor layout , want add buttons select locations (such bathrooms, entrances, exits, emergency sections, etc) people can click them , information location pops up.
i have imageview floor layout within scrollview allow user zoom in , out of image. when try add buttons scrollview don't stay relative image when zooming in , out, nor size change. have tried adding constraints on make location stay same when zooming in , out.
it won't let me relocate button on storyboard subview of imageview. looking similar solutions says add button programmatically subview of imageview it'd hard put 100+ buttons in right location. suggestions how go this?
you have no other choice instead of adding code.. because code can add subview of image view , whereas storyboard wont add buttons subviews of imageview, add buttons subview of scroll view
Comments
Post a Comment