简体   繁体   English

如何确定两个UIButton是否不相同

[英]How to determine the two UIButton is not the same UIButton

Iwant to make sure ButtonA and ButtonB are the same one. 我要确保ButtonA和ButtonB是相同的。

I must to judge the "title", "backgroundColor","image for Normal or image for Selected" of two Button is Equal? 我必须判断两个按钮的“标题”,“ backgroundColor”,“普通图像或所选图像”是否相等?

Swift: 迅速:

if button1 !== button2 {
    // they are not the same button
}

Objective-C: 目标C:

if (button1 != button2) {
    // they are not the same button
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM