I want to create uiTextField overlay on uiWebview and it is on the same position on the uiwebview input field.
i.e.: when user clicks on the textfield available on webview then new UITextfield is created and displayed over html textfield. when Editing is done uitextfield disappears then value is placed inside the textfield inside webview.
My application is in Phonegap architecture. please provide any suggestion or examples.
Thanks...
take one view, set background to clearColor & put textField inside it, show dynamically when you clicks your webView TextField. because of clearColor it feels like it is on webView
Related
How to create marquee like UITextField in Swift. I want to use it in a iOS controller where the user can click on the textfield and select a location, the text is longer enough that I need to implement the marquee Textfield, The text should scroll from right to left.
Am working in message based iPhone application. In my application looking like iMessage native iOS app. I made Bubbles with used UIImageView and UILabel. I made UILabel as clickable and showing Copy option. It is working fine when the message input UITextView is not in active.
1. I can show the "Copy" option when we clicking UILabel and the UITextView is not becomeFirstResponder.
2. When the user clicking the MessageTextView (UITextView) from the bottom of the screen the UITextView becoming first responder and keyboard is showing now. In this scenario if the user clicking the messabe bubble (UILabel) the UIMenuItem showing "Paste" on the bubble instead of "Copy".
3. If i click "Paste" from the bubble UIMenuItem already copied text will be pasting in UITextView. So the control fully in UITextView UIMenuController not activated in UILabel. So i cleared the text from UIPateBoard when the user clicking the Bubble (UILabel).
4. Now the UIMenuController not showing up even [self becomeFirstResponder]; not becoming in UILabel class.
The reason is when the UITextView is in becomeFirstResponder the control fully in that. not coming to UILabel. Could you please help me on this.
How to show UIMenuItem "Copy" when the user clicking UILabel if the keyboard is in visible the control is in UITextView? Could you please help me on this. I spent two days in this issue. Thanks in advance.
May be I am wrong.CONSIDER THIS ANSWER AS A COMMENT.
I tried to achieve like what you are trying to do. Thats not working too. I figured out I cannot make access the two views at the same time. Especially when I have any view becomeFirstResponder and you cannot access menu items of other view.
But if you try like this,you may succeed in your code.
1) In the touchesBegan: method, find the user touching inside your UILabel.
2) If that happens, then show a custom view with buttons like copy,paste and select like that.
Does anyone know how to create a UITextField similar to the 'Google' search field in the iPhone Safari App? The bar when clicked, animates to fill up the entire NavigationBar & add a cancel button?
Thanks,
I am loading an HTML file in my UIWebView and displaying it in my app. Now I want to all the user to edit this html in the UIWebView real time (i.e. when he is viewing it in the UIWebView). To put it in a different way; Does UIWebView allow editing it's HTML content like a UITextField or UITextView does?
No. It doesn't allow HTML editing.
The closest solution I think of is getting the HTML content and put it in a UITextView but that wouldn't be very user-friendly.
How about split the screen into two view. Web view and text view. Edit text in the text view. When user tap a 'done' button apply the changed text to the web view. Or you can use timer to continuously update web view with the current content of text view.
I'm displaying a UISearchBar at the top of a UIWebView for entering information that I use to display content in the UIWebView. Is there a way to attach the UISearchBar (or perhaps a UITextField?) to the UIWebView "header" so that when the user scrolls down on the webview the UISearchBar also scrolls out of view and the full window is able to display text?
If this is not possible, how else could I accomplish this while still using the UIWebView for it's inherent text formatting capabilities?
You may try containing the UIWebView and UISearchBar within a UIScrollView. That is, create a controller that has the main view as a UIScrollView and then add in the UISearchBar and UIWebView as subviews. If you want custom behavior when you're scrolling you may have to override the event callbacks for scrolling. I haven't tried this but in theory you could have it so that when you get a scroll down and the UISearchBar is in view, you hide it up to a certain # of pixels until the UISearchBar is hidden. Afterwards you forward the scroll request to the UIWebView so it can deal with things. Basically have a middleman that delegates the scroll events as necessary.