Im completely new in swift, I want to create a list of buttons which I need three buttons in a row it works fine in large screen iPhones but in smaller ones it looks like image below, (half of one of the buttons would be hide) each button has height:100 and width 100
I tried to use auto resizing but no difference happened. and I changed my viewDidLoad
like this also but result is still same as before.
class ViewController: UIViewController {
@IBOutlet weak var button: UIButton!
@IBOutlet weak var btn1: UIButton!
@IBOutlet weak var btn2: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
button.imageView?.contentMode = .scaleAspectFit
btn1.imageView?.contentMode = .scaleAspectFit
btn2.imageView?.contentMode = .scaleAspectFit
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Appreciate any help,.