第五天 loadmore

        mutating func loadFresh(completion: (result: APIResult<DeserializedType>) -> ()) -> CancellableToken {
self.currentPage =
// self.isNoMoreData = false return self.doRequest() { result in
if case .Success(let entities) = result {
if entities.isEmpty {
// self.isNoMoreData = true
} else {
self.currentPage +=
}
} completion(result: result)
}
}
mutating func loadMore(completion: (result: APIResult<DeserializedType>) -> ()) -> CancellableToken { // self.isNoMoreData = false return self.doRequest() { result in
if case .Success(let entities) = result {
if entities.isEmpty {
// self.isNoMoreData = true
} else {
self.currentPage +=
}
} completion(result: result)
}
}

https://www.github.com/MengTo/DesignerNewsApp/

上一篇:C++ 中容器


下一篇:去除List集合中重复的元素(利用HashSet的特性---无重复元素)