iOS
3
Вклад в тег
UIKit+AFNetworking
#import "UIImageView+AFNetworking.h"
/** Запускаете индикатор активности. */
[[self activitiIndicator] startAnimating];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://"]];
[[self imageView] setImageWithURLRequest:request placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
[[self imageView] setImage:image];
/** Останавливаете индикатор активности. */
[[self activitiIndicator] stopAnimating];
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
/** Если возникла ошибка при загрузке. */
}];
func funcion(object: NSObject) {
let typeOfObject = object.dynamicType
var freshInstance = typeOfObject()
}