CodePudding user response:
Problem description not clear,CodePudding user response:
If is the picture on the button to change,Your custom class, inheritance uibutton,
Add a class attribute, UIimageview,
Then use your button to add the picture into,
The button addsubview imageview
Then you set this imageview
CodePudding user response:
var statusPrinter: UIButton?
StatusPrinter=UIButton (frame: CGRect (x: 340, y: Int (statusBarHeight), width: myStatusBarHeight, height: myStatusBarHeight))
StatusPrinter! SetImage (UIImage (named: "PrinterOFF"), for: the normal)
Self. View. AddSubview (statusPrinter!
StatusPrinter? AddTarget (self, action: # selector (jumpToBlueTooth), for: the touchUpInside)
CodePudding user response:
In tangle Xcode10 and 11 ~