Imitating keyboard delete key with a button - cocoa-touch

I am using a UIWebView for text and emoticon/smiley display in my app. I can input and delete the text and emoticons using the keyboard, but I want to have a button in the UI which will do the same thing. How can I imitate the keyboard delete functionality with my own button?

My guess would be that you have to set up some sort of communication between the native app and the webview so that you can pass certain events to be handled accordingly. Check out the post here NSString in UIWebview that might shed some light on how you can solve your problem.

Related

How to hide a keypad for IOS in Titanium without using 'blur'

Can anyone please let me know how to hide the keypad without using 'blur' in titanium for IOS.
My scenario is I have a textfield, When I scan an item, that value will be shown on textfield. When textfield is focused, the scanner will be activated. In this scenario i need to focus the textfield, but should not show the keypad.
Can any one please share your ideas.
Thanks,
Swathi.
There is no possibility to hide keypad when textfield is focused on iOS. It is a system thing.
I think your approach is wrong. Why do you need textfield if you don't want to type text there?
Instead of it:
- create label (or label inside view) with proper background (looking like textfield),
- add 'click' event which will start scanning (i suppose you have that functionality for 'focus' event),
- if you need cursor blinking than create animation next to label.

Titanium: Disable keyboard to use a custom numberpad

I am trying to use a custom number pad with a textfield to take advantage of blur and focus. But, how to disable the keyboard permanently on ios. Everything I tried does not work.
"Textfield": {
keyboardVisible: false
}
Well, i don't think there is a way to disable keyboard on textfield, but if you can call your custom keyboard on a onClick event, maybe you can use a label instead of textfield and open your keyboard on click.
I know that isn't a optimal solution but maybe it is useful.
Another way to solve this problem is open directly a default pad number with attribute keyboardType : Ti.UI.KEYBOARD_DECIMAL_PAD and use Keyboard Toolbar.
I hope this is helpful.
This is currently not possible in Titanium, but it seems achievable on iOS:
https://stackoverflow.com/a/16467767/4626813
You might want to do a Feature Request Appcelerator JIRA. Check if it has already been requested before you create a new ticket. Refer to this question and also link back to the ticket here so that others can watch it with you.

Custom keyboard for a textfield without the standard keyboard

I am trying to write an app that uses a custom keyboard. How can I write code that prevents the iPhone keyboard from popping up. I have seen a custom keyboard that enters text in other iPhone applications, so I know that it is possible.
You're looking for the inputView property that's present on every view (inherited from UIResponder).

iPad UIButtons responding to external keyboard input

I'm writing an app based around a calculator-like UI. On an iPad, I'd like the number UIButtons on my calculator UI to respond to the numbers on the external keyboard. I have no text input anywhere in the app, and I'd never want an on-screen keyboard to appear. How do I get my UIButtons to respond to specific key presses as if they'd been touched?
I'd say create a hidden UITextField with the delegate set, make it become the first responder upon viewDidLoad. The keyboard won't appear when a bluetooth keyboard is connected as far as I know, then just check what characters are typed in the shouldChangecharactersInRange and activate the right buttons accordingly.
EDIT: a quick example I just made, https://github.com/benjaminq42/buttonTest , if you wish to have a highlight animation of some sorts you need to create a custom UIButton class. You can use 'setHighlighted' but that 'sticks'.

Finger scrollable UIWebView when the keyboard is up

In an application that I'm writing I have a UIWebview up top and some UITextFields at the bottom that I want the user to be able to type in depending on what's in the webview. But when they touch the Text Field and the keyboard pops up, the user loses the ability to manipulate the web page to see different parts.
Is there a way to keep the keyboard up and still be able to manipulate the UIWebView?
No I believe the Keyboard is modal so you can't access the form underneath it.
You can respond to the
- (void)keyboardWillShow:(NSNotification*)aNotification;
- (void)keyboardWillHidde:(NSNotification*)aNotification;
notifications and scroll the View up or down when the keyboard is shown...
Example here