iOS????????????
???????????? ???????[ 2014/11/18 11:19:32 ] ????????IOS ??????? ??????
?????о??б????iOS?????е?????????????СС???????????iOS????????????????(???????????????)?????????????????????????????TextView????????????????????TextView?е???????storyboard????????????????????storyboard???????????????????????????????????????????????????????÷?????????button???÷?????????????????????????????????????????????????????????????TapGestureRecognizer????????????SwipeGestureRecognizer???? ?????????LongPressGestureRecognizer???? ????????PanGestureRecognizer???? ????????PinchGestureRecognizer????????????RotationGestureRecognizer??;
?????????Щ??????touche????????????????????????????????????????????????????????????????TouchesMoved??д????????
?????????storyboard??????????????????????storyboard?y??????
????1.??storyboard??????????????????Button???????????????????????????????????????????????????????????????У???????£?
????2.????????????????????????????Button?????????????????????????????????????????????????£?
????????????????????????
??????storyboard??????????????????????????????????????????Dreamwear?????????????????storyboard????????????Dreamwear????????????????????ó????????????????????????????storyboard?????????????????????????????????ò?????????????????Ч???????о???storyboard???????????Controller????????????С?????????????????ó????????Щ???????????θ??????????????????????????????
????1.????????TapGestureRecognizer???????
?????????????TapGestureRecongnizer????????£?
????1 //???tap????
????2 UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:)];
????3 //???????????????????
????4 tapGesture.numberOfTapsRequired = 1; //???????
????5 tapGesture.numberOfTouchesRequired = 1; //????????
????6 [self.view addGestureRecognizer:tapGesture];
??????????????????????????????
????1 //???????????????
????2 -(void)tapGesture:(id)sender
????3 {
????4 //??????????????
????5 }
????2.?????????LongPressGestureRecognizer??
?????????????
????1 //??????????
????2 UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressGesture:)];
????3 //???ó??????
????4 longPressGesture.minimumPressDuration = 0.5; //(2??)
????5 [self.view addGestureRecognizer:longPressGesture];
??????????????????????????????????????????У???
????1 //???????????????
????2 -(void)longPressGesture:(id)sender
????3 {
????4 UILongPressGestureRecognizer *longPress = sender;
????5 if (longPress.state == UIGestureRecognizerStateBegan)
????6 {
????7 UIAlertView *alter = [[UIAlertView alloc] initWithTitle:@"???" message:@"????????" delegate:nil cancelButtonTitle:@"???" otherButtonTitles: nil];
????8 [alter show];
????9 }
????10 }
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11