How to get the name of the backgroundImage from a button?

后端 未结 2 1164
后悔当初
后悔当初 2020-12-21 06:56

i´ve created different buttons and initalized them with an array with photos as backgroundImage.

UIButton* myButton = [UIButton buttonWithType:UIButtonTypeRo         


        
2条回答
  •  旧时难觅i
    2020-12-21 07:07

    Since UIImage does not store the name of the image it contains, you can't. You have to store the name elsewhere by yourself in relationship to the Button or image.

    regards

提交回复
热议问题