簡體   English   中英

問題類型UIButton

[英]Problem Type UIButton

我有兩個UIButton按鈕。 我已經初始化了xib類型的按鈕,在我想更改按鈕類型的程序后添加了聯系:

configImage1=[UIButton buttonWithType:UIButtonTypeDetailDisclosure] ; //doesn't Work !
configImage2=[UIButton buttonWithType:UIButtonTypeDetailDisclosure]; //doesn't Work !

創建按鈕后,您將無法更改其類型。

UIButton具有以下屬性,但它是只讀的,因此一旦創建按鈕就無法更改按鈕類型,

@property(nonatomic, readonly) UIButtonType buttonType

如果您想更改按鈕類型,請嘗試再次創建一個新的UIButton

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM