Hi, im newbie developing with objc.
Im working on a piece of code that installs a plugin to my application. It downloads a .zip package, uncompress it and copy some data to my sqlite database.
I have a UIAlertView that shows a UIProgressView while the app is downloading and uncompressing, when it finish I add to the UIAlertView a button with the addButtonWithTitle method.
I dont know why my button appears on the top-left corner of my UIAlertView.
This is a piece of my code:
ventana = [[UIAlertView alloc] initWithTitle:[[NSString alloc] initWithFormat: @"Instalando %@", codigo]
message:@"Por favor, no apague el dispositivo ni cierre la aplicación." delegate:nil cancelButtonTitle:nil otherButtonTitles: nil];
actividad = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
actividad.frame = CGRectMake(20, 110, 20, 20);
progreso = [[UIProgressView alloc] initWithFrame:CGRectMake(50, 115, 215, 9)];
[ventana addSubview:actividad];
[actividad startAnimating];
[ventana addSubview:progreso];
[ventana show];
-- some stuff (downloading, uncompressing, updating my UIProgressView...) --
[progreso removeFromSuperview];
[actividad removeFromSuperview];
[ventana addButtonWithTitle:@"Aceptar"];
ventana.message = @"Instalación finalizada";
I have a image but I can't post it here cos im a new user... :(
Anyone knows why my button appears at the top-left corner of my UIAlertView (ventana) Thanks!