I am guessing that this isn't possible. I spent about 2 hours laying out my views in autolayout. When I started coding, I realized that half of the views I laid out should actually be UIButton
s. Is there anyway to just select a UIView
and somehow change it to a UIButton
? I tried typing in UIButton
to the class field. But it didn't change all the attributes like as if I had dropped a UIButton
on the storyboard.
You can open the Storyboard as source (right click on the Storyboard file and select Open As
Source Code
). Then use Find
Menu's Find and Replace...
to make changes. For example, change <view>
to <button>
. Save
the file. After any desired text editing, right click on the Storyboard file again and Open As
Interface Builder - Storyboard
to restore the normal Storyboard view.
This is particularly useful when you want to change one color to another, or a to change a font name throughout a Storyboard. Just be careful, Storyboards can be rather fragile as text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With