Reputation: 3433
Hi I am new to iPhone.
What I need is, have to display some text as help for my application. For that I create a button while clicking that button text must be displayed.
How can I do this?
Please post some code. Thank you.
Upvotes: 0
Views: 529
Reputation: 1213
Inside your button click event,
for example.
-(IBAction) showTextView:(id)sender{
yourSubViewController * subView = [[yourSubViewController alloc] initWithNibName:@"yourSubViewController" bundle:nil];
[self.navigationController pushViewController:subView animated:YES];
}
and inside yourSubViewController viewDidLoad method,
UITextView * textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)];
textView.text = @"display your info text";
[self.view addSubview:textView];
before you must declare UITextViewDelegate in yourSubViewController.h
Upvotes: 2
Reputation: 2076
on button click event load new UIviewController.
add uitextview in it and load your help text in that textview
Upvotes: 0