Decisiones finales de codigos

0

Así es la forma en la que pondré el texto del blog después de pensármelo mucho

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    //	return YES;
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

para que el uitextfield donde hemos llamado al teclado no quede bloqueado por la salida del mismo el codigo mas ingenioso que hay es el siguiente.

-(IBAction) slideFrameUp;
{
    [self slideFrame:YES];
}
 
-(IBAction) slideFrameDown;
{
    [self slideFrame:NO];
}
 
-(void) slideFrame:(BOOL) up
{
    const int movementDistance = 50; // lo que sea necesario, en mi caso yo use 80
    const float movementDuration = 0.3f; // lo que sea necesario
 
    int movement = (up ? -movementDistance : movementDistance);
 
    [UIView beginAnimations: @"anim" context: nil];
    [UIView setAnimationBeginsFromCurrentState: YES];
    [UIView setAnimationDuration: movementDuration];
    self.view.frame = CGRectOffset(self.view.frame, 0, movement);
    [UIView commitAnimations];
}
app_icon

Miguel Díaz Rubio

1

Miguel Díaz Rubio.

Compañero de la SEI y sorprendentemente( ya que hasta hace bien poco no lo dabia) programador en IOS, una lectura muy recomendable

app_icon

Prueba de carga objetive-c

1

Esto es una prueba de el syntaxHighlighter:

-(id) init
for (NSString * sUrl in listaThumbs) {

            UIButton *btn = [[UIButton alloc] init];
            btn.frame = CGRectMake(0+(180*count), 0, 180, 120);

            NSURL *theUrl=[NSURL URLWithString:sUrl];
            NSData * dataImage = [NSData dataWithContentsOfURL:theUrl];
            UIImage *img = [UIImage imageWithData:dataImage];
            [btn setImage:img forState:UIControlStateNormal];
            [btn setTag:count];
            [btn addTarget:self
                    action:@selector(launchYoutubeUrl:)
                    forControlEvents:UIControlEventTouchDown];
            scrollViewWidth += 180;
            [scrollVideos addSubview:btn];
            [scrollVideos setContentSize:(CGSizeMake(scrollViewWidth,120))];
            [btn release];

            count++;

        }
Ir arriba