ios - Deleting the text in UITextFiled when long press on a button -


While calling me for a long time, the iPhone phone app should do the same as dialpad delete or clean button functionality. I have tried to add the button a long press alert and wrote this code, but this text is completely deleting. How can I get rid of the text with clearing or animation effect removed?

  If (longPressGesture.state == UIGestureRecognizerStateBegan) {// delete button, then you can delete the number, then ([self.phoneNumberString length]> gt; {self.phoneNumberString = [self .phoneNumberString substringToIndex: [self.phoneNumberString Length] -1]; Self.phoneNumberField.text = self.phoneNumberString; Technically, it is animated, it just happens so fast that you can not see it more realistic To get the animated effect, you need to wrap your delete in a timer. The press is still active, only by removing every 1/2 second (or whatever intervals works for you). 


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -