iOS的故障设定增量和减量图片UIStepper
问题描述:
我能够设置背景图片罚款:iOS的故障设定增量和减量图片UIStepper
self.setBackgroundImage(image, for: .normal)
但是,如果我做这些:
self.setDecrementImage(image, for: .normal)
self.setIncrementImage(image, for: .normal)
增加侧改变“ +”成蓝色正方形像这样:
减量侧也实际上是一个蓝色的矩形,除了它是减号的确切尺寸外,它仍然看起来就像一个减号。我可以通过给它一个不同的大小来纠正这个问题。
有人处理过这个吗?增加/减少边的图像是否与背景相反?
从我的书精细工作可下载的例子,在这里:https://github.com/mattneub/Programming-iOS-Book-Examples/blob/master/bk2ch12p580stepper/ch25p853stepper/ViewController.swift – matt