Home > Net >  How can my image take all the button's size in Swift
How can my image take all the button's size in Swift

Time:11-06

StoryBoard

I just need to know how can an image can take all the button's size. All my button's background image are so small

CodePudding user response:

try this

ImageButton.imageView?.contentMode = .scaleAspectFill

or

ImageButton.imageView?.contentMode = .scaleToFill
  • Related