Search
Recommended for You

Entries tagged with “iphone development”

On Vibration

Making an iPhone vibrate requires nothing more than a simple call to Audio Services. Deciding on when your application should buzz is a different matter. The code for producing that short buzz effect is this:

... read more

– Erica Sadun

Opt-In Complexity

It's an interesting trait that the Mac and iPhone stacks work this way, opting in to complexity and keeping the higher-level APIs sparser and simpler, and you have to wonder whether it's a conscious design decision or a happy accident.... read more

– Chris Adamson

At some point, my apmode utility got dropped from Erica Utilities and a number of people, particularly my pal Pytey, asked if I could find some time to bring it back to life. Last night, I decided to see if I could put this together using 2.x technology after having put this off for far too long.

... read more

– Erica Sadun

A colleague recently had his application rejected from App Store because he used what I can only call a noun-verb approach. He allowed items in the table to be selected, and highlighted upon selection, and then provided buttons that used that choice to perform an action. His application was rejected, with the rejection citing the following from the iPhone Human Interface Guidelines:

... read more

– Erica Sadun

I sometimes use a little trick to ensure that a UITextInputField only accepts a certain subset of characters. Say for example, you want to ensure that a user enters only letters and spaces. A UITextField delegate can catch each character as its typed and decide whether to add items to the active text field. Here's how.

... read more

– Erica Sadun

Last week, I introduced several handy utilities that let you convert standard Core Graphics structures to and from strings. This week, I thought I'd continue to explore utility functions, moving on to ways you can work with points and rectangles for on-screen calculations. Like the string utilities, these are functions, not methods, and are as such called using standard C rather than Objective C.

... read more

– Erica Sadun

Two core graphics structures, the CGRect and the CGPoint, play a large role in iPhone development. They are used to position items on-screen and to set their size. Every time you use a UIView, you can work with its frame, its center, and its bounds--all of which use these two structures to handle geometry. Here's a quick review of the structures in question.

... read more

– Erica Sadun

In the beginning, or at least the iPhone's beginning, there was Celestial. It offered a fabulous QuickTime-esque approach to handling media of all kinds. Of course, this was back in the days of the first jailbreaks and there was no official SDK. When the SDK finally did roll around, its Audio Queue approach to handling audio playback and recording proved to be an extreme disappointment.

... read more

– Erica Sadun

While wading through the new 2.2 Frameworks, I suddenly noticed that MapKit, once a Private Framework was missing in action. MapKit, which was available until SDK 2.1, offered all kinds of utterly yummy features including Trip Players, Traffic tiles, Route Views and more. So what happened to MapKit?... read more

– Erica Sadun

Last week, I wrote about exploring subviews both of the user-added and Apple-created varieties. Many GUI components contain view classes that are hidden from the developer but are composed of perfectly standard components.... read more

– Erica Sadun

It's often helpful to take a look at your UIView hierarchy; and when I say "look", I mean all the way down. You can just as easily look at the component subviews that comprise on-screen objects like buttons, switches, and sliders, as you can at the UIImageViews and UIButtons that you add directly to your screen. UIButtons, for example, are composed of three image views and a label. Some UITextFields are built on a private UITextFieldRoundedRectBackgroundView, with a number of UIImageViews that are added below that class.

... read more

– Erica Sadun

One of the things I hate about the Media Player framework is that although it offers easy-to-use audio playback, it does so horizontally. Users have to flip their phones onto the side and access the playback controls in landscape. It's not all that hard to force Media Player into portrait mode and today I'll show you how.

... read more

– Erica Sadun

I've spent some time recently trying to hunt down items for use in your Info.plist files. The natural place to look for these is the SpringBoard executable in the iPhone's Core Services folder. I ran this file through a strings filter, looking to see if I could find groupings of items that might work.

... read more

– Erica Sadun

A view that handles multiple touch points must announce itself. Add the isMultipleToucheEnabled handler and have it return YES. Doing so allows your touch methods (touchesBegan, touchesMoved, touchesEnded) to work with several touchpoints at once.... read more

– Erica Sadun

I'm not big on the whole Image Picker Camera interface. I hate how slow it is and how it prevents you from scraping the screen. So here's my work around. In the following code, I scan down the UIImagePicker presentation to find my way to the actual preview window.... read more

– Erica Sadun

Timely UI Updates

Laggy UI updates are a frequently occurring problem on the iPhone. With operationally intense work, your GUI may not always keep sync with your requests, particularly when you try to update status information to let the user know how things are going.

... read more

– Erica Sadun

Although the NDA is on the way out, not all is restored to sparkly brightness in the world of the iPhone SDK. Developers must still deal with day-to-day limitations built into Apple's development environment.

... read more

– Erica Sadun

This morning, I had one of my d'oh moments: finally figuring out exactly how to do inter-app copy and paste without breaking SDK rules. It basically goes like this, in a similar fashion to the Core Location service I wrote about a few months ago:

... read more

– Erica Sadun

Over the last two weeks, I've shown you how to create a socket to listen for web requests and how to produce an artificial index.html file that advertises the files you're willing to serve from your iPhone. Today, I'll wrap things up by adding error pages and the actual file server.

... read more

– Erica Sadun

Goodbye NDA

Goodbye NDA and welcome to the age of open collaboration. Yay.... read more

– Erica Sadun