Cocoa框架OctoKit.zip

时间:2022-08-08 01:30:36
【文件属性】:

文件名称:Cocoa框架OctoKit.zip

文件大小:219KB

文件格式:ZIP

更新时间:2022-08-08 01:30:36

开源项目

OctoKit 是用于和 Github API 交互的 Cocoa 和 Cocoa Touch 框架,它由 AFNetworking、Mantle、和ReactiveCocoa 建立。示例代码:- (void)viewWillAppear:(BOOL)animated {     [super viewWillAppear:animated];     RACDisposable *disposable = [[[[self.client         fetchUserRepositories]         collect]         deliverOn:RACScheduler.mainThreadScheduler]         subscribeNext:^(NSArray *repositories) {             [self addTableViewRowsForRepositories:repositories];         } error:^(NSError *error) {             UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Whoops!"                                                             message:@"Something went wrong."                                                            delegate:nil                                                   cancelButtonTitle:nil                                                   otherButtonTitles:nil];             [alert show];         }];    // Save the disposable into a `strong` property, so we can access it later.     self.repositoriesDisposable = disposable; } - (void)viewWillDisappear:(BOOL)animated {     [super viewWillDisappear:animated];         // Cancels the request for repositories if it's still in progress. If the     // request already terminated, nothing happens.     [self.repositoriesDisposable dispose]; } 标签:OctoKit


网友评论