Dear All!
I am trying to read text file from local system as well as using url (using NSURLConnection). And I am able to view the content of file on console.
I want them to be displayed on TextView using UITextView or by any other mean.
I created a button on clicking of which viewer with file content should be seen.
Further I am trying to use the UITextView as:
in above "data" is just for testing purpose and later I will display the NSMutabledata object on this textview.
Kindly help me out where the mistake I am doing.
Or provide me some reference / tutorial where I can learn how to use UITextView.
Thanks and regards
Sagar Priyadarshi
I am trying to read text file from local system as well as using url (using NSURLConnection). And I am able to view the content of file on console.
I want them to be displayed on TextView using UITextView or by any other mean.
I created a button on clicking of which viewer with file content should be seen.
Code:
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
initWithTitle:@"View"
style:UIBarButtonItemStylePlain
target:self
action:@selector(textviewtest)]
autorelease];
Further I am trying to use the UITextView as:
Code:
- (void) textviewtest {
textview = [[UITextView alloc] init];
NSString *data = @"this is textview";
[self.textview setText: data];
[self.textview setFont:[UIFont fontWithName:@"Helvetica" size:16.0]];
[data release];
}
in above "data" is just for testing purpose and later I will display the NSMutabledata object on this textview.
Kindly help me out where the mistake I am doing.
Or provide me some reference / tutorial where I can learn how to use UITextView.
Thanks and regards
Sagar Priyadarshi