一 常用常量(I) 關(guān)于按鈕1 UIControlState--->按鈕狀態(tài) A UIControlStateNormal 默認(rèn)狀態(tài) 常規(guī)狀態(tài)顯現(xiàn) B UIControlStateHighlighted 高亮狀態(tài)顯現(xiàn) C UIControlStateDisabled 禁用的狀態(tài)才會顯現(xiàn) D UIControlStateSelected 選中狀態(tài) E UIControlStateapplication 當(dāng)應(yīng)用程序標(biāo)志時(shí) F UIControlStateReserved 為內(nèi)部框架預(yù)留,可以不管他2 UIButtonType--->按鈕類型 A UIButtonTypeCustom 自定義類型 B UIButtonTypeRoundedRect 圓角矩形 C UIButtonTypeDetailDisclosure 藍(lán)色小箭頭按鈕,主要做詳細(xì)說明用 D UIButtonTypeInfoLight, 亮色感嘆號 E UIButtonTypeInfoDark, 暗色感嘆號 F UIButtonTypeContactAdd, 十字加號按鈕3 UIControlEvents 事件觸發(fā)狀態(tài) A UIControlEventTouchDown 單點(diǎn)觸摸按下事件:用戶點(diǎn)觸屏幕,或者又有新手指落下的時(shí)候。 B UIControlEventTouchDownRepeat 多點(diǎn)觸摸按下事件,點(diǎn)觸計(jì)數(shù)大于1:用戶按下第二、三、或第四根手指的時(shí)候。 C UIControlEventTouchDragInside 當(dāng)一次觸摸在控件窗口內(nèi)拖動時(shí) E UIControlEventTouchDragOutside 當(dāng)一次觸摸在控件窗口之外拖動時(shí)。 F UIControlEventTouchDragEnter 當(dāng)一次觸摸從控件窗口之外拖動到內(nèi)部時(shí)。 G UIControlEventTouchDragExit 當(dāng)一次觸摸從控件窗口內(nèi)部拖動到外部時(shí) H UIControlEventTouchUpInside 所有在控件之內(nèi)觸摸抬起事件。 J UIControlEventTouchUpOutside 所有在控件之外觸摸抬起事件(點(diǎn)觸必須開始與控件內(nèi)部才會發(fā)送通知)。 K UIControlEventTouchCancel 所有觸摸取消事件,即一次觸摸因?yàn)榉派狭颂嗍种付蝗∠蛘弑簧湘i或者電話呼叫打斷。 L UIControlEventTouchChanged 當(dāng)控件的值發(fā)生改變時(shí),發(fā)送通知。用于滑塊、分段控件、以及其他取值的控件。你可以配置滑塊控件何時(shí)發(fā)送通知,在滑塊被放下時(shí)發(fā)送,或者在被拖動時(shí)發(fā) M UIControlEventEditingDidBegin 當(dāng)文本控件中開始編輯時(shí)發(fā)送通知。 N UIControlEventEditingChanged 當(dāng)文本控件中的文本被改變時(shí)發(fā)送通知。 O UIControlEventEditingDidEnd 當(dāng)文本控件中編輯結(jié)束時(shí)發(fā)送通知。 P UIControlEventEditingDidOnExit 當(dāng)文本控件內(nèi)通過按下回車鍵(或等價(jià)行為)結(jié)束編輯時(shí),發(fā)送通知。 Q UIControlEventAlltouchEvents 通知所有觸摸事件。 R UIControlEventAllEditingEvents 通知所有關(guān)于文本編輯的事件。 T UIControlEventAllEvents 通知所有事件。
新聞熱點(diǎn)
疑難解答
圖片精選