Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-29-2008, 11:54 AM   #13 (permalink)
uprise78
Registered Member
 
Join Date: Apr 2008
Posts: 159
Default

hijinks,

Your code looks good too. The only think I would suggest is modifying the uploadImage method to be like this:
Code:
- (IBAction)uploadImage {
    [NSThread detachNewThreadSelector:@selector(doUploadOfImage) toTarget:self withObject:nil];
}

- (void)doUploadOfImage
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

    ... ALL OF THE ORIGINAL CODE THAT WAS IN - (IBAction)uploadImage ...

    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    [pool release];
}
This will keep the UI from freezing if the upload is slow and it will get the little spinner going.

Nicely done!
uprise78 is offline   Reply With Quote
 

» Advertisements
» Online Users: 622
17 members and 605 guests
ADY, AragornSG, Dattee, denied, Duncan C, iDifferent, john love, kapps11, klrichner, mapiko, peppinoss, Punkjumper, Robiwan, sle39lvr, smithdale87, Speed, timle8n1
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,745
Threads: 89,201
Posts: 380,564
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Ashleyk27
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:45 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.