The best way to download content from the Internet

I have an application that displays 10 images, and each image is associated with a button and a link to a URL. I would like to publish this application, but be able to update images and links over the Internet without the need to update the application.

I know that I can pull images from the Internet like this:

NSURL *url = [NSURL URLWithString: @"http://example.com/image.png"];
 NSData *data = [NSData dataWithContentsOfURL: url];
 UIImage *image = [UIImage imageWithData: data];
 UIImageView *imageView = [[UIImageView alloc] initWithImage: image];

I guess you can also pull a layer from the Internet?

What about .xib and .h / .m files? Can I have the application check a specific URL for new .xib / .h / .m files every time I start, and when I upload these files to this URL in two weeks, the people who run the application will upload new files?

So, instead of loading the / xib class from my resources, for example:

UIViewController *nextController = [[ClassName alloc] initWithNibName:@"ClassName" bundle:nil];

- ClassName , ?

, ( / - , "" Doodle Jump) , . ... !

+3
2

, , . . . , .

, Apple.

, , . , , . , , . .h/.m xibs, .

+2

, "" - , .m/.mh/.xib .

, , plist ( ) . (http://example.com/image.png .)

+1

Source: https://habr.com/ru/post/1770025/


All Articles