Ir para conteúdo
  • Cadastre-se

Clayton

Membros
  • Total de itens

    13
  • Registrou-se em

  • Última visita

Tudo que Clayton postou

  1. Estou testando o GitHub usando GitHub for mac. Na hora de tentar sincronizar (Sync Branch ou Publish Branch) da esse erro: error: RPC failed; result=22, HTTP code = 417 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Alguém sabe por que?
  2. Para iniciar outra tela tanto faz se eu passar o objeto ou passar nulo. Porque para o que estou fazendo nem utilizo ele... Eu posso usar com objeto nulo... ou se precisar de algo do pacote passo o objeto. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; NSLog(@"%@",[nibBundleOrNil bundlePath]); if (self) { // Custom initialization } return self; }
  3. Podem me explicar a diferença em usar [NSBundle mainBundle] ou nil? ini = [[Inicio alloc]initWithNibName:@"Inicio" bundle:[NSBundle mainBundle]]; //ou ini = [[Inicio alloc]initWithNibName:@"Inicio" bundle:nil];
  4. faltou o NSDateFormatter... NSDate *data = [NSDate date]; NSDateFormatter *formatoData = [[NSDateFormatter alloc]init]; //seta o tipo de formatação... [formatoData setDateFormat:@"dd/MM/yyyy - hh:mm:ss"]; NSString *dataFormatada = [[NSString alloc ]initWithFormat:@"%@", [formatoData stringFromDate:data]]; [formatoData release]; NSLog(@"%@",dataFormatada);
  5. NSDate *data = [NSDate date]; //seta o tipo de formatação... [formatoData setDateFormat:@"dd/MM/yyyy - hh:mm:ss"]; NSString *dataFormatada = [[NSString alloc ]initWithFormat:@"%@", [formatoData stringFromDate:data]]; [formatoData release]; NSLog(@"%@",dataFormatada);
  6. Existe o NSMutableString onde é possível concatenar strings... float valor = 199.99; NSMutableString *stringMutable = [[NSMutableString alloc]initWithString:@"resutados:"]; [stringMutable appendFormat:@"%.2f", valor]; [stringMutable appendString:@" reais"]; NSLog(@"%@",stringMutable);
  7. Tente criar uma outra thread, uma roda a animação e a outra roda o processo. Veja o tópico "Utilizando Threads no iPhone SDK – iOS" no link abaixo... http://2mnsoftware.wordpress.com/category/intermediario/
  8. Não pode fazer assim? Verificando se tem virgula e substituir por ponto? NSString *string = [[NSString alloc ]initWithFormat:@"%@", numerico.text]; NSString *string2 = [[NSString alloc]initWithFormat:@"%@", [string stringByReplacingOccurrencesOfString:@"," withString:@"."]];
  9. NSString *login = [[NSString alloc]initWithFormat:@"123456"]; if ([login isEqual:loginSenha.text]) { NSLog(@"verdade"); }else{ NSLog(@"falso"); }
  10. Poderia ser com UIAlertView? -(IBAction)chamarAlerta{ UIAlertView *alerta = [[UIAlertView alloc]initWithTitle:@"Teste Alerta" message:@"Chamou o alert?" delegate:self cancelButtonTitle:@"Sim" otherButtonTitles:@"Nao",@"Outros", nil]; [alerta show]; [alerta release]; } //metodo delegate do UIAlertView - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ switch (buttonIndex) { case 0: NSLog(@"Clicou em Sim"); break; case 1: NSLog(@"Clicou em Nao"); break; case 2: NSLog(@"clicou em Outros"); break; default: break; } }
×
×
  • Criar Novo...