Uicontroleventtouchdown
Uicontroleventtouchdown: Single Touch Press event: The user touches the screen, or when a new finger falls.
Uicontroleventtouchdownrepeat
Uicontroleventtouchdownrepeat: Multi-touch press event, touch count greater than 1: when the user presses the second to third or fourth finger.
Uicontroleventtouchdraginside
Uicontroleventtouchdraginside: When a touch is dragged within the control window. Uicontroleventtouchdragoutside
Uicontroleventtouchdragoutside: When a touch is dragged outside the control window. Uicontroleventtouchdragente
Uicontroleventtouchdragenter: When a touch is dragged from outside the control window to the inside.
Uicontroleventtouchdragexit
Uicontroleventtouchdragexit: When a touch is dragged from inside the control window to the outside.
UIControlEventTouchUpInside
UIControlEventTouchUpInside: All touch lift events within the control. Uicontroleventtouchupoutside
Uicontroleventtouchupoutside: All touch lift events outside the control (the touch must start with the inside of the control to send a notification). Uicontroleventtouchcancel
Uicontroleventtouchcancel: All touch cancellation events, that is, one touch is canceled because it has too many fingers, or is locked or interrupted by a phone call. Uicontroleventtouchchanged
Uicontroleventtouchchanged: A notification is sent when the value of the control has changed. Used for sliders, segmented controls, and other controls that take values. You can configure when a slider control sends notifications when the slider is dropped, or when it is dragged. Uicontroleventeditingdidbegin
Uicontroleventeditingdidbegin: Sends a notification when the text control starts editing. Uicontroleventeditingchanged
Uicontroleventeditingchanged: Sends a notification when text in a text control is changed. Uicontroleventeditingdidend
Uicontroleventeditingdidend: Sends a notification when the edit ends in a text control. Uicontroleventeditingdidonexit
Uicontroleventeditingdidonexit: Sends a notification when the edit is finished by pressing the ENTER key (or equivalent behavior) within the text control. Uicontroleventalltouchevents
Uicontroleventalltouchevents: Notifies all touch events. Uicontroleventalleditingevents
Uicontroleventalleditingevents: Notifies all events about text editing. Uicontroleventallevents
Uicontroleventallevents: Notifies all events. Status of Button
UIButton *BT = [UIButton buttonwithtype:uibuttontypecontactadd];//uibuttontypecustom, Uibuttontyperoundedrect; //
[BT settitle:@ "MyButton" forstate:uicontrolstatenormal]; Normal state
[BT settitle:@ "Button1" forstate:uicontrolstatehighlighted]; When touching
[BT settitle:@ "Disbutton" forstate:uicontrolstatedisabled]; is invalid
[BT Settitlecolor:[uicolor Redcolor] forstate:uicontrolstatenormal]; Font color in normal state
Bt.titleLabel.font = [Uifont boldsystemfontofsize:24]; Button font
Bt.titleLabel.shadowOffset = Cgsizemake (1, 1);
Bt.titleLabel.shadowColor = [Uicolor Redcolor];
[BT setimage:[uiimage imagenamed:@ "Normal.png"] forstate:uicontrolstatenormal];
Picture in normal state, only valid under Uibuttontypecustom,uibuttontyperoundedrect
[BT setbackgroundimage:[uiimage imagenamed:@ "Background.png"] forstate:uicontrolstatenormal]; Setting the background map
Uiedgeinsets insets; Set the internal picture spacing of the button
Insets.top = Insets.bottom = Insets.right = Insets.left = 10;
Bt.contentedgeinsets = insets;
Bt.titleedgeinsets = insets; Title Spacing
[BT Addtarget:self
Action: @selector (click:)
Forcontrolevents:uicontroleventtouchupinside]; Add Incident Response