Ozernoty in ios

enter image description here I want to create a user note form in my application, currently I'm using a single text view inside a view that looks bad! Are there any other control suits for this purpose? The main goal is when the user clicks the button, a small text image appears, which they can add there and save in plist. enter image description here I want something like this (check image)

I want this kind of usernotes (his image), please give me some tips and help develop this.

+2
source share
1 answer

Using a UIAlertView with a UITextView may be useful for you.

Embed the UIAlertViewDelegate in the .h file.

 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]; } 

A request with a small text view will appear here, which you can add comments and then process the text inside the delegate method like this.

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

All Articles