IOS device slide events
As long as you touch the screen, slide, and exit from the screen, the system will generate events of the UIEvent object type-of course, including UITouch events-touchesBegan: withEvent: Call method-touchesMoved when the user touches the screen: withEvent: This method is called when the user touches and moves the screen-touchesEnded: withEvent: This method is called when the touch leaves the screen
-TouchesCancelled: withEvent: This method is called when the touch is canceled.
Example:
Cpp Code
- // Slide start event
- -(Void) touchesBegan :( NSSet *) touches withEvent :( UIEvent *) event
- {
- UITouch * touch = [touches anyObject];
- CGPoint pointone = [touch locationInView: self. view]; // obtain the initial contact point.
- Self. startPoint = pointone;
- }
- // Sliding move event
- -(Void) touchesMoved :( NSSet *) touches withEvent :( UIEvent *) event
- {
- UITouch * touch = [touches anyObject];
- // ImgViewTop is the last View to be touched after sliding
- CGPoint pointtwo = [touch locationInView: imgViewTop]; // obtain the last point that contacts the screen after sliding.
- If (fabs (pointtwo. x-startPoint.x)> 100)
- {// Determine the distance between two points
- BMove = YES;
- }
- }
- // Event handling by sliding end
- -(Void) touchesEnded :( NSSet *) touches withEvent :( UIEvent *) event
- {
- UITouch * touch = [touches anyObject];
- CGPoint pointtwo = [touch locationInView: self. view]; // obtain the last point that contacts the screen after sliding.
- If (fabs (pointtwo. x-startPoint.x)> 50) & (bMove ))
- {
- // Determine the positional relationship between points and move left
- If (pointtwo. x-startPoint.x> 0)
- {// Left slide Service Processing
- If (clicks> 0 ){
- Clicks --;
- If ([wyKPI. sortZbs count]> 1 ){
- [BtnRight setEnabled: YES];
- If (clicks = 0)
- {
- [BtnLeft setEnabled: NO];
- [BtnRight setEnabled: YES];
- }
- [LabTitle setText: [wyKPI. sortZbs objectAtIndex :( NSUInteger) clicks];
- [LabTitle setFont: [UIFont systemFontOfSize: 14.0f];
- [TabWyKPI reloadData];
- }
- }
- }
- // Determine the positional relationship of a vertex and slide right
- Else
- {// Right-sliding Service Processing
- If (clicks <[wyKPI. sortZbs count]-1 ){
- Clicks ++;
- If ([wyKPI. sortZbs count]> 1 ){
- [BtnLeft setEnabled: YES];
- If (clicks = [wyKPI. sortZbs count]-1)
- {
- [BtnLeft setEnabled: YES];
- [BtnRight setEnabled: NO];
- }
- [LabTitle setText: [wyKPI. sortZbs objectAtIndex: clicks];
- [LabTitle setFont: [UIFont systemFontOfSize: 14.0f];
- [TabWyKPI reloadData];
- }
- }
- }
- }
- }
// Slide start event-(void) touchesBegan :( NSSet *) touches withEvent :( UIEvent *) event {UITouch * touch = [touches anyObject]; CGPoint pointone = [touch locationInView: self. view]; // obtain the initial contact point self. startPoint = pointone;} // The sliding movement event-(void) touchesMoved :( NSSet *) touches withEvent :( UIEvent *) event {UITouch * touch = [touches anyObject]; // imgViewTop is the final View CGPoint pointtwo = [touch locationInView: imgViewTop] After sliding; // obtain the final point of contact to the screen after sliding if (fabs (pointtwo. x-startPoint.x)> 100) {// determine the distance between two points bMove = YES;} // sliding End Processing Event-(void) touchesEnded :( NSSet *) touches withEvent :( UIEvent *) event {UITouch * touch = [touches anyObject]; CGPoint pointtwo = [touch locationInView: self. view]; // obtain the point if (fabs (pointtwo. x-startPoint.x)> 50) & (bMove) {// judge the positional relationship of the Point left sliding if (pointtwo. x-startPoint.x> 0) {// left slide business processing if (clicks> 0) {clicks --; if ([wyKPI. sortZbs count]> 1) {[btnRight setEnabled: YES]; if (clicks = 0) {[btnLeft setEnabled: NO]; [btnRight setEnabled: YES];} [labTitle setText: [wyKPI. sortZbs objectAtIndex :( NSUInteger) clicks]; [labTitle setFont: [UIFont systemFontOfSize: 14.0f]; [tabWyKPI reloadData];} // determine the positional relationship between points and right sliding else {// right sliding service processing if (clicks <[wyKPI. sortZbs count]-1) {clicks ++; if ([wyKPI. sortZbs count]> 1) {[btnLeft setEnabled: YES]; if (clicks = [wyKPI. sortZbs count]-1) {[btnLeft setEnabled: YES]; [btnRight setEnabled: NO];} [labTitle setText: [wyKPI. sortZbs objectAtIndex: clicks]; [labTitle setFont: [UIFont systemFontOfSize: 14.0f]; [tabWyKPI reloadData] ;}}}
Ios704: Unlock your iOS device. Otherwise, you cannot continue the jailbreak process. How can this problem be solved? Slide and unlock, please.
Have you set the password? If the password is set, remove it.
How to restart ios devices
Press the home Key for 3 seconds and slide the slider. After the black screen, press the home Key for 3 seconds.