I\'m trying to create a custom UITableViewCell programmatically and one of the subviews of this cell is going to be a button with an image in it (a simple image of a magnify
Swift 4.X and 5.X
button.imageView!.contentMode = .scaleAspectFit button.contentVerticalAlignment = .fill button.contentHorizontalAlignment = .fill