tutorial hay disponibles descargar compilaciones codigo code bear app xcode storyboard uiactionsheet alertview notesview

xcode - hay - Notas de usuario en ios



testflight tutorial (1)

Quiero crear un formulario de notas de usuario en mi aplicación, actualmente estoy usando una vista de texto dentro de una vista, ¡parece estar mal! ¿Hay algún otro traje de control para este propósito? El objetivo principal es cuando el usuario haga clic en el botón aparecerá una pequeña vista de texto que puede agregar comentarios allí y guardarlo en plist. Quiero algo así (mira la imagen)

Quiero ese tipo de notas de usuario (es mi imagen) por favor dame algunos consejos y ayuda a desarrollar esto ...


Usar UIAlertView con UITextView puede ser útil para usted.

Implementar UIAlertViewDelegate en archivo .h

UITextView *comments; -(IBAction)btnAddClicked:(id)sender { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Noreply Email" message:@"/n/n/n/n/n" delegate:self cancelButtonTitle:@"Close" otherButtonTitles:@"Send", nil]; comments = [[UITextView alloc] initWithFrame:CGRectMake(15,45, 255, 100)]; [comments setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"mailbody.png"]]]; [comments setFont:[UIFont fontWithName:@"Helvetica" size:15]]; comments.scrollEnabled = YES; [comments becomeFirstResponder]; [alert addSubview:comments]; [alert show]; [alert release]; }

Aquí se le pedirá una alerta con una pequeña vista de texto, puede agregar comentarios y luego manejar el texto dentro del método delegado de esta manera.

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex==1) //Send button pressed { //handle your comment here NSLog(@"%@",comments.text); } }