background preloader

WYSIWYG - iOS dev

Facebook Twitter

Dynamically retrieve the position (X,Y) of an HTML element. Tracking the caret position in a contenteditable div. - Some code from tarnfeld. Css property overflow: visible, hidden, scroll and auto – CSS Jquery Ajax Javascript Css tutorials Free css templates and css menu. Detecting taps and events on UIWebView – The right way - The Spoken Word. Recently, I was working on a project which required detection of tap and events on the UIWebView.

Detecting taps and events on UIWebView – The right way - The Spoken Word

We wanted to find out the HTML element on which the user taps in the UIWebView and then depending on the element tapped some action was to be performed. After some Googling, I found out the most of the users lay a transparent UIView on top of the UIWebView, re-implement the touch methods of UIResponder class (Ex: -touchesBegan:withEvent:) and then pass the events to the UIWebView.

This method is explained in detail here . There are multiple problems with the method. Copy/Selection stops working on UIWebView We need to create a sub-class of UIWebView while Apple says we should not sub-class it. 7 tips for using UIWebView. For an IPhone app I have been building, I decided to use the UIWebView to render SVG files, instead of doing the vector rendering myself.

7 tips for using UIWebView

I needed to have a way to read-in files generated from a vector authoring tool (Illustrator etc.) and after initially looking for an open-source SVG parsing/rendering engine of some sort, I decided on hosting the UIWebView itself instead and use the SVG rendering capability of WebKit. Another option could have been to read in PDF files as PDF is the default meta-file format for Quartz, but I needed programmatic access to each path drawn in the file and it was not apparent to me how I can do that once the PDF is rendered.

(Any ideas on that is still welcome of course) Anyways the point of this post is not really about different options for persisting and reading vector graphic files. I am rather planning to talk a bit about some of the tricky things I found out while trying to use the UIWebView programatically. This one is quite straightforward. Handle touch events in UIWebView - Carpe diem (Felix's blog) This is an annoying problem that related to my recent project.

Handle touch events in UIWebView - Carpe diem (Felix's blog)

The goal is simple: handle single touch event in UIWebView and let it handle other touch events as defaults. However this is really hard to achive… Edit: 6/20.

Javascript - WYSIWYG - iOS dev

Native - WYSIWYG - iOS dev. Color Picker - iOS dev. Ios5 - Automatic scrolling when contentEditable/designMode in a UIWebView. Manage scrolling after keyboard open. Ios - Prevent grey overlay on touchstart in mobile Safari/Webview. Objective c - NSNotification order of observer notifications. UIWebViews, UIKeyboards, and UIToolbars. Oh My. You know the toolbar that appears above the keyboard when you tap on a form field in a UIWebView?

UIWebViews, UIKeyboards, and UIToolbars. Oh My.

Its called an inputAccessoryView. You can customize the inputAccessoryView for a UITextField or a UITextInput objects but not for a UIWebView. For whatever reason Apple decided to not support a custom inputAccessoryView for a UIWebView and has instead added their own view with buttons for navigating between form fields and dismissing the keyboard. Sometimes you might prefer to use a toolbar of your own design rather than the default one Apple supplies. While this is possible it is not without certain risks. Adding a Keyboard of Your Own Costa Walcott has a great write up on how you can add your own keyboard over at www.iosdevnotes.com. In a nutshell, Costa’s article shows how you can add your own custom UIToolBar to your view, animate it to match the animation of the UIKeyboard, and finally position it above the keyboard.

Wait Just a Sec… Removing Apple’s Default Toolbar: Option #1 Cheers. Hiding the inputAccessoryView of a UIWebView. Hiding the inputAccessoryView of a UIWebView. Iphone - How to make a transparent UIWebVIew. Full featured example. HTML Text Editor for iOS. Integrate the CKEditor as html editor into iOS application - lwf97055143的专栏.

In short, it is very easy to integrate the CKEditor into the iOS application and make it work for you.

Integrate the CKEditor as html editor into iOS application - lwf97055143的专栏

In this document, I will introduce: how to embed CKEditor into your iOS application, how to customize the toolbar icons of the CKEditor, how to set html content to CKEditor and how to get its html content, how to resize CKEditor frame in fly and how to disable the default inputAccessoryView of UIWebView which annoys the user with the default toolbar with "Previous" and "Next" buttons. Here is my screenshot on the CKEditor on my iOS application Here are my steps on how to do it. 1. 2.

In my project Libraries group, I create a new group "CKEditor" and then right click on this group and select "Add Files to 'myproject' ", in the file browser dialog, I choose the ckeditor_3.6.4 folder to involve all the files into my project. Here are my steps to do: In the Project Navigator, click the Project to show the TARGETS item in the right side view. 3. CKEDITOR.config.toolbar_Abstract = height:'300px',