lunes, 8 de agosto de 2011

Barra de loading agregada a un UIView

    //x,y,w,h
   
    UIView *progView = [[UIView alloc] initWithFrame:CGRectMake(110, 110, 95, 30)];
    progView.backgroundColor = [UIColor grayColor];
    progView.tag = 1;    // tag this view for later so we can remove it from recycled table cells
    progView.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin);
    //progView.layer.cornerRadius = 5;
   
   
    UILabel *activityLabel = [[UILabel alloc] init];
    activityLabel.text = NSLocalizedString(@"Loading...", @"string1");
    activityLabel.backgroundColor = [UIColor grayColor];
    activityLabel.textColor = [UIColor whiteColor];
    activityLabel.font = [UIFont systemFontOfSize:14];
    [progView addSubview:activityLabel];
    activityLabel.frame = CGRectMake(5, 2, 70, 25);
   
    UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
    [activityIndicator startAnimating];
    [progView addSubview:activityIndicator];
    activityIndicator.frame = CGRectMake(70, 5, 20, 20);
   
   
    [self.view addSubview:progView];
    


No hay comentarios:

Publicar un comentario

468x60