Home > Mobile >  Do a can change the image xcode11 view button do
Do a can change the image xcode11 view button do

Time:09-24

See a xcode10 do, the feeling is different from xcode11

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 ~
  •  Tags:  
  • iOS
  • Related