installThread = [ [ NSThread alloc ] initWithTarget:self
selector:@selector(installThreadFun:)
object:nil
];
[ installThread start ];
while ( installThread != nil && [ installThread isFinished ] == NO )
{
[ NSThread sleepForTimeInterval:0.1 ];
}
[ installThread cancel ];
[ installThread release ];
- (void) installThreadFun:(id)arg
{
UIProgressHUD *processBar = nil;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
processBar = [ [ UIProgressHUD alloc ] initWithFrame:CGRectMake(85, 150, 150, 120) ];
processBar.tag = 2;
processBar.backgroundColor = [ UIColor redColor ];
[ processBar setText:_(@"Installing...") ];
[ processBar showInView:self.view ];
[ processBar release ];
[pool release];
return;
}