martes, 26 de octubre de 2010

Convierte de Entero a String. --- String a Entero

//Convierte un Entero a String.

              String                                            Entero
NSString* numeroString=[NSString stringWithFormat:@"%d",currentPageNumber];

/* Asignación de Valor*/
numPagina.text = numeroString;


Convert NSString to int


NSString *aNumberString = @"123";
int i = [aNumberString intValue];

lunes, 25 de octubre de 2010

Object - C { Documentacion }

http://wwwdi.ujaen.es/asignaturas/progav/iphone.pdf

http://gorkasg.files.wordpress.com/2010/04/objective-c.pdf



/*  -------- ******************* ----------- */
http://dymas.ii.uam.es/~flh/macprog/LenguajeObjective-C.pdf


Este tutorial está diseñado para que programadores procedentes de otros entornos de programación descubran las ventajas que tiene utilizar un lenguaje orientado a objetos tan simple, potente y versátil como Objective-C.
Al acabar este tutorial el lector debería de haber aprendido todos los detalles del lenguaje Objective-C necesarios para empezar a estudiar Cocoa, la librería de programación orientada a objetos de Mac OS X, la cual, aunque es accesible tanto desde Java como desde Objective-C, es con este último con el que se consigue aprovechar todo su potencial.

viernes, 22 de octubre de 2010

Paginas

Orientacion de Pantalla

            http://www.cocos2d-iphone.org/forum/topic/6413

Manual Español de Cocoa
           http://www.cocoalab.com/?q=becomeanxcoder-español


Ejemplos.
http://www.edumobile.org/iphone/category/iphone-programming-tutorials/
    

Orientacion de Pantalla.

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {

if((self.interfaceOrientation == UIDeviceOrientationLandscapeLeft) ||     (self.interfaceOrientation == UIDeviceOrientationLandscapeRight)){
[currentPage.view setFrame:CGRectMake(0, 0, 1024, 780)];
} else if((self.interfaceOrientation == UIDeviceOrientationPortrait) || (self.interfaceOrientation == UIDeviceOrientationPortraitUpsideDown)){
[currentPage.view setFrame:CGRectMake(0, 0, 780, 1024)];
}
}

martes, 19 de octubre de 2010

IPAD appliaction development

http://books.google.com/books?id=ZrMCvF0AbpAC&lpg=PA223&ots=7gXXey5lph&dq=UIModalPresentationCurrentContext&hl=es&pg=PA241#v=onepage&q=UIModalPresentationCurrentContext&f=false









lunes, 18 de octubre de 2010

Sustituir imagen

.m

if(botonActivo != nil){
botonActivo.frame = CGRectMake(botonActivo.frame.origin.x+30, botonActivo.frame.origin.y, botonActivo.frame.size.width-60
  botonActivo.frame.size.height-60);
botonActivo.highlighted = NO;
botonActivo.enabled = YES;
botonActivo.contentEdgeInsets = UIEdgeInsetsMake(-44.00, 3, 0, 0);
botonActivo.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[botonActivo setBackgroundImage:[UIImage imageNamed:@"pato.png"] forState:UIControlStateNormal];
[[botonActivo titleLabel] setFont:[UIFont fontWithName:@"Baskerville" size:48]];
}
botonClicked.frame = CGRectMake(botonClicked.frame.origin.x-10, botonClicked.frame.origin.y
botonClicked.frame.size.width+5, botonClicked.frame.size.height+5);
botonClicked.showsTouchWhenHighlighted = YES;
[botonClicked setBackgroundImage:[UIImage imageNamed:@"pato_sobre.png"] forState:UIControlStateNormal];
botonClicked.enabled = NO;
botonClicked.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
botonClicked.contentEdgeInsets = UIEdgeInsetsMake(-70.00, 4, 0, 0);
[[botonClicked titleLabel] setFont:[UIFont fontWithName:@"Baskerville" size:75]];
botonClicked.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[botonActivo setBackgroundImage:[UIImage imageNamed:@"pato.png"] forState:UIControlStateNormal];
botonActivo = botonClicked;

Insertar Sonidos en una clase.

.h
@interface silabas_b2ViewController : UIViewController <AVAudioPlayerDelegate> {


.m

NSString *path =[NSString stringWithFormat:@"%@%@",
[[NSBundle mainBundle] resourcePath], @"/pa.wav"];
SystemSoundID sounID;
NSURL *filePath=[NSURL fileURLWithPath:path isDirectory:NO];
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &sounID);
AudioServicesPlaySystemSound(sounID);

domingo, 17 de octubre de 2010

Configurar Imagenes Default.

IPAD  Orientaciones de  imagen

Para hacer frente a diferentes opciones de orientación, una nueva convención de nomenclatura se ha creado para las imágenes de lanzamiento IPAD. El tamaño de la pantalla del IPAD es de 768 × 1024, previo aviso en las dimensiones que siguen a la altura tiene en cuenta una barra de estado de 20 píxeles.



FilenameDimensions
Default-Portrait.png *768w x 1004h
Default-PortraitUpsideDown.png768w x 1004h
Default-Landscape.png **1024w x 748h
Default-LandscapeLeft.png1024w x 748h
Default-LandscapeRight.png1024w x 748h
Default.pngNot recommended




http://iphonedevelopertips.com/ipad/ipad-managing-multiple-launch-images.html

viernes, 15 de octubre de 2010

Ventana Emergente . XCODE


.m

-(void)checkcollision {


UIAlertView *someError = [[UIAlertView alloc] initWithTitle: @"PA" message: @"LETRA P." delegate: self cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[someError show];
[someError release];

}


468x60