User Experience on order of UIAlert

April 22, 2009 § Leave a comment

If you use CLLocationManager for your app or Web Analytic tool such as Flurry to track location, you would include CLLocationManager code to your – (void)viewDidLoad { } method.

If you call your UIAlert before CLLocationManager, your UIAlert will appear twice instead of once, giving users 3 UIAlert. This is confusing to users. Bad impression.

The problem is that CLLocationManager is competing with your UIAlert in loading your app.

To ensure better user experience, be sure you put your UIAlert after CLLocationManager.

// Allocate and initialize a CLLocationManager instance
self.locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
locationManager.distanceFilter = kCLDistanceFilterNone;
[locationManager startUpdatingLocation];

// Alert users on iTouch with no speaker
UIAlertView *alertView;
alertView = [[[UIAlertView alloc] initWithTitle:@”Welcome” message:@”Make sure headphones are plugged in if you use an older iPod Touch.” delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil] autorelease];
[alertView show];


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading User Experience on order of UIAlert at Web Builders.


%d bloggers like this: