Tuesday, August 09, 2011

Download, Create and Display Image from URL

NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:URL]];

UIImage *img=[UIImage imageWithData:data];

UIImageView* imageView = [[UIImageView alloc] initWithImage:img];

[self.view addSubview:imageView];


URL may be http//...../image.jpg

No comments:

Create a list in SwiftUI with sticky section headers

 Sample Code import SwiftUI struct ContentView : View {     @State var isCustomViewControllerDisplayed = false     @State private va...