I am trying to get a label to load text from a URL so it can be updated from a server without updating the actual app.
Originally I used the viewDidLoad method, however this loads the view too slow. I read to use the viewDidAppear method, however, it is loading in the same way. I tried to find forums that had detail on how to make it work, though couldn't find what I needed.
I also read about loading asynchronously, though I am new to coding, so I didn't really know what I was reading!
If someone could let me know how to work this out in this circumstance, that'd be great.
Thanks.
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void) viewDidAppear:(BOOL)animated {
NSURL *urlTermOutlookTitle = [NSURL URLWithString:@"URL that info is coming from here"];
NSString *TitleLabel = [NSString stringWithContentsOfURL:urlTermOutlookTitle encoding:NSStringEncodingConversionAllowLossy error:nil];
TermOutlookTitleLabel.text = TitleLabel;
}