Initial commit
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// UMComLocationListDataController.h
|
||||
// UMCommunity
|
||||
//
|
||||
// Created by 张军华 on 16/6/23.
|
||||
// Copyright © 2016年 Umeng. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UMComListDataController.h"
|
||||
|
||||
@class CLLocation;
|
||||
|
||||
@interface UMComLocationListDataController : UMComListDataController
|
||||
|
||||
|
||||
- (instancetype)initWithCount:(NSInteger)count withLocation:(CLLocation *)location;
|
||||
|
||||
@property(nonatomic,strong)CLLocation *location;
|
||||
|
||||
@end
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// UMComLocationListDataController.m
|
||||
// UMCommunity
|
||||
//
|
||||
// Created by 张军华 on 16/6/23.
|
||||
// Copyright © 2016年 Umeng. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UMComLocationListDataController.h"
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
|
||||
|
||||
|
||||
@implementation UMComLocationListDataController
|
||||
|
||||
- (instancetype)initWithCount:(NSInteger)count withLocation:(CLLocation *)location
|
||||
{
|
||||
if (self = [super initWithRequestType:UMComRequestType_AllTopic count:count] ) {
|
||||
|
||||
self.location = location;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)refreshNewDataCompletion:(UMComDataListRequestCompletion)completion
|
||||
{
|
||||
__weak typeof(self) weakself = self;
|
||||
[[UMComDataRequestManager defaultManager] fetchLocationNamesWithLocation:self.location completion:^(NSDictionary *responseObject, NSError *error) {
|
||||
[weakself handleNewData:responseObject error:error completion:completion];
|
||||
}];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user