Author:
Josh Garnham
has contributed 11 article(s)
Josh is an indie Mac and iOS Developer with 2 years of experience behind him. You may know him as the developer of Spark for Mac as well as 4Score and 2Code for iOS. He is also a huge Apple lover, a Star Trek fan and active users on both Stack Overflow and Twitter
Rich Text Editing : The choices
Posted in Tutorials on: July 6th, 2012 by: Josh Garnham
In this, my latest article on rich text editing, I will detail the many choices available to developers when planning to create a rich text editor. From UIWebView to UITextView and Core Text, all the latest techniques are here to give you a first look into the (up until recently) mysterious world of rich text editing. UIWebView plus JavaScript hackery The first option and one I have covered before is using a UIWebView with some extensive JavaScript code in order ...
Read Full Article
Rich Text Editing : Sample Project
Posted in Tutorials on: December 27th, 2011 by: Josh Garnham
As promised I have gone through all the tutorials including the bonus code and some of the requests in the comments to put together a Xcode Project of the Rich Text Editing series. If you haven’t already, check out the iOS5 Rich Text Editing Series. The features of the project include: - Bold, Italics and Underlining - Highlighting (via UIMenuController) - Font Size adjustment - Font Color adjustment - Font adjustment - Undo and Redo - Image insertion - Draggable ...
Read Full Article
iOS 5 Rich Text Editing Series
Posted in Featured on: December 20th, 2011 by: Josh Garnham
Say hello to the awesome seven part series of iOS Rich Text Editing. Covering topics such as: Fonts, Inserting images, Highlighting and UIMenuController, Validation and more exciting features. This introduction is short and sweet because the posts speak for themselves, check them out and enjoy. Remember: sharing is caring…
Read Full Article
Rich Text Editing : Draggable Images (Part 7)
Posted in Tutorials on: December 20th, 2011 by: Josh Garnham
Previous in the series: - Rich Text Editor : Inserting Images (Part 6) Here it is, the final tutorial in the series where we’ll attempt the most advanced feature yet! In this tutorial we’ll be subclassing UIGestureRecognizer, dealing with and using blocks but most importantly expanding our knowledge of javascript. Javascript : The next step First things first we need to add some javascript to our ‘index.html’ file. Just after the opening html tag add the following code: <script language="text/javascript"> ...
Read Full Article
Rich Text Editing : Inserting Images (Part 6)
Posted in Tutorials on: November 17th, 2011 by: Josh Garnham
Check out the previous in the series: - Rich Text Editing : Undo and Redo (Part 5) Once you’ve done that, then let’s begin. In this our sixth and penultimate tutorial I will show you how to present a UIImagePickerController in which a user can select an image of their choice and then add the users selected image into the document. Let’s get right to it, in our ‘checkSelection’ method add the following code: UIBarButtonItem *insertPhoto = [[UIBarButtonItem alloc] initWithTitle:@"Photo+" ...
Read Full Article
Rich Text Editing : Undo and Redo (Part 5)
Posted in Tutorials on: November 9th, 2011 by: Josh Garnham
Check out the previous in the series: - Rich Text Editing : Fonts (Part 4) If you have done that, then lets begin. In this our fifth tutorial we’ll be taking a look at adding undo and redo to our rich text editor. This a rather trivial matter and so should be a quick thing to do. Okay, let’s get stuck in. As we’ve done in almost all our tutorials we need to add some bar button items into the ...
Read Full Article
Rich Text Editing : Fonts (Part 4)
Posted in Tutorials on: November 3rd, 2011 by: Josh Garnham
Previous in the series: - Rich Text Editing : Highlighting and UIMenuController (Part 3) If you have read the third part in this series, then lets begin. In this tutorial we’ll be looking at customising anything and everything related to the font. We’ll begin by adding an option for adjusting the font size and then move on to changing both the font its self and the font color. Before we add our bar button items and everything else we need ...
Read Full Article
Rich Text Editing : Highlighting and UIMenuController (Part 3)
Posted in Tutorials on: October 28th, 2011 by: Josh Garnham
Previous in the series: - Rich Text Editing : Validation (Part 2) If you have read the second part in this series, then lets begin. In this our third tutorial we’ll look at using execCommand to set the background color of selected text to give it the appearance of a highlight as can be seen in iBook’s. We’ll also look at using UIMenuController to display the highlight button in the menu which appears after selecting text. Let’s get straight into ...
Read Full Article