我有1个mutablearray,我想删除对象的所有索引,但在第一个索引处保持对象.示例:输入:数组(a,b,c,d,e)输出:数组(a)
你能帮助我吗.提前致谢
我将应用程序上传图像从uiimagepickercontroller实现到服务器.但我想在上传过程中实现取消按钮取消上传.
在上传功能:
[operation setCompletionBlock:^{
ProgressView.hidden = YES;
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Uploading successfull." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[av show];
[av release];
overlayToolbar.userInteractionEnabled = YES;
NSLog(@"response string: %@", operation.responseString); //Lets us know the result including failures
}];
NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
[queue addOperation:operation];
Run Code Online (Sandbox Code Playgroud)
并且buttoncancel:
[httpClient.operationQueue cancelAllOperations];
Run Code Online (Sandbox Code Playgroud)
当我按下buttoncancel时,它不会停止上传过程,然后出现alertview"Uploading successful".我不知道为什么不能停止但仍然会出现alertview.alertview你能帮帮我吗?