[manger GET:urlRelate parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
//今天推荐、头部、国内、国际
NSMutableArray *listArray = [responseObject objectForKey:@"video_all"];
for (NSDictionary *listDic in listArray) {
Vmovie_model *modelList = [[Vmovie_model alloc] init];
[modelList setValuesForKeysWithDictionary:listDic];
switch (self.CustomSegment.selectedSegmentIndex ) {
case 0:
[self.vMovieArray addObject:modelList];
break;
case 1:
[self.vMovieArray addObject:modelList];
break;
case 2:
[self.vMovieArray addObject:modelList];
break;
case 3:
[self.vMovieArray addObject:modelList];
break;
default:
break;
}
}
-------------model类
// Vmovie_model.h
@interface Vmovie_model : NSObject
@property (nonatomic, strong) NSString *itemid;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *thumb;
@property (nonatomic, strong) NSString *video;
@property (nonatomic, strong) NSString *info;
@property (nonatomic, strong) NSString *niandai;
@property (nonatomic, strong) NSString *leixing;
@property (nonatomic, strong) NSString *ifung_rate_mean;
@end
#import "Vmovie_model.h"
@implementation Vmovie_model
//KVC
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
}
@end