FullyShowViewController.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // FullyShowViewController.m
  3. // phoneTest
  4. //
  5. // Created by Ray on 05/09/2017.
  6. //
  7. //
  8. #import "FullyShowViewController.h"
  9. @interface FullyShowViewController ()
  10. @end
  11. @implementation FullyShowViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. NSAttributedString *attributedString = [[NSAttributedString alloc]
  15. initWithData: [self.htmlText dataUsingEncoding:NSUnicodeStringEncoding]
  16. options: @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType }
  17. documentAttributes: nil
  18. error: nil
  19. ];
  20. // self.textView.text = self.text;
  21. self.textView.attributedText = attributedString;
  22. // Do any additional setup after loading the view.
  23. }
  24. - (void)didReceiveMemoryWarning {
  25. [super didReceiveMemoryWarning];
  26. // Dispose of any resources that can be recreated.
  27. }
  28. /*
  29. #pragma mark - Navigation
  30. // In a storyboard-based application, you will often want to do a little preparation before navigation
  31. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  32. // Get the new view controller using [segue destinationViewController].
  33. // Pass the selected object to the new view controller.
  34. }
  35. */
  36. @end