Archive for the “User Interface” category

Truncate String Adding Ellipsis At Front, Middle Or End

by John Muchow on December 16, 2012

Truncate strings and add ellipsis at front, middle or end.

iOS 6 NSAttributedString: Set Text Underline, Paragraph Styles and Glyph Form – Part 2

by John Muchow on December 12, 2012

iOS 6 attributed strings (NSAttributedString) allow comprehensive text styling: foreground and background colors, strikethrough, underline among others.

iOS 6 NSAttributedString, Set Text Font, Foreground And Background Colors, StrikeThrough And Shadow – Part 1

by John Muchow on December 5, 2012

Using NSAttributedString and NSMutableAttributedString. in iOS 6 to set text font, foreground and background colors, strikethrough, kerning, among other attributes.

UIActivityViewController Sharing Content on iOS 6 – Part 1 – Share With Facebook, Twitter, Messages, Mail, Weibo…

by John Muchow on November 15, 2012

With iOS 6 Apple introduced UIActivityViewController, a view controller to share content with various services (internal to the OS and otherwise). Services range from sending an SMS or email, to copying content to the pasteboard (all iOS internal services) to (…)

Read the rest of this entry »

iOS 6 : Set UIStepper Increment And Decrement Images

by John Muchow on October 8, 2012

iOS 6 updates the UIStepper control to include optional increment and decrement images.

iOS 6 : UIRefreshControl For TableView Updates

by John Muchow on October 1, 2012

Apple introduced UIRefreshControl in iOS 6 to support auto refreshing in UITableViewControllers.

UIAlertView Text, Secure Text and Login Password Input

by John Muchow on May 29, 2012

In iOS 5, UIAlertView was updated to include support for text input, secure text input and login/password input. Say goodbye to the creative code (read hacks) many of us have tried, to add similar functionality. The screenshots below show examples (…)

Read the rest of this entry »

Twitter Specific Keyboard – UIKeyboardTypeTwitter

by John Muchow on April 13, 2012

In a series of previous posts I wrote about the integrated Twitter support that was introduced in iOS 5. If you are creating a custom control such as a UITextField or UITextView, there is a keyboard type specifically designed for (…)

Read the rest of this entry »

iOS 5 : Customize UINavigationBar and UIBarButtonItem with the Appearance API

by John Muchow on January 2, 2012

In a previous post, UIImage and resizableImageWithCapInsets, I explained how to use the method resizableImageWithCapInsets in a UIImage object to set cap insets, which specify areas of an image that are not to be changed when resizing or scaling an (…)

Read the rest of this entry »

iOS 5 : UIImage and resizableImageWithCapInsets

by John Muchow on December 20, 2011

I recently began writing a short example to learn more about the iOS 5 Appearance API and customizing UINavigationBar objects. The goal was to add a custom background, title and text to the navbar. Once I had this working, to (…)

Read the rest of this entry »

iOS 5 : UIStepper Control

by John Muchow on November 2, 2011

There is a new pre-built control in iOS 5 for incrementing or decrementing a value, UIStepper. The control has two buttons aligned horizontally, one labeled with a plus (+) the other a minus (-). One nice feature is a continuous (…)

Read the rest of this entry »

Simple Menus and Messages with UIActionSheet

by John Muchow on October 10, 2011

If you need to create a quick menu or present a user with a short message, you may want to consider a UIActionSheet as an option. This control will slide up from the bottom of the screen, and offers a (…)

Read the rest of this entry »

Load and Access Custom Fonts

by John Muchow on July 18, 2011

It’s surprisingly easy to add custom fonts to your iOS apps. Begin by adding the font(s) to your project, (drag/drag into the resources folder in the Project Window).

Using Font Macros for Consistency

by John Muchow on July 6, 2011

In most applications, keeping with one or two fonts is a good design choice. To this end, I often include a few simple macros to keep fonts consistent, easily change font size as well as emphasis (bold). Below are a (…)

Read the rest of this entry »

Deselect Table Row with Animation

by John Muchow on June 13, 2011

Here is a quick little trick to automatically deselect a table row once tapped by a user. With the approach below you can also adjust the length of the delay (in seconds) before the deselection occurs. When working with a (…)

Read the rest of this entry »