1
[self presentViewController:testVC animated:YES completion:^{
NSLog(@"slsl");
}];
//推出自己的控制器presentingViewController
NSLog(@"%@",self.presentingViewController);
//自己消失,推出自己的控制器将要显示
[self dismissViewControllerAnimated:YES completion:^{
NSLog(@"back");
//清理webView缓存 将此代码写进webView所在的控制器中的viewDidLoad的最后
//Set Cache
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];
[NSURLCache setSharedURLCache:sharedCache];
//Clear All Cookies
for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {
[[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];
}
2 除navigationVC外的另外一种推出控制器的方法,也是一种层级关系
TestViewController *testVC = [[TestViewController alloc] init];
//推出某个控制器[self presentViewController:testVC animated:YES completion:^{
NSLog(@"slsl");
}];
//推出自己的控制器presentingViewController
NSLog(@"%@",self.presentingViewController);
//自己消失,推出自己的控制器将要显示
[self dismissViewControllerAnimated:YES completion:^{
NSLog(@"back");
}];
presentingViewController presentedViewController 每一个被推出的控制器都有这两种关系.
3:NSFileHandle这个类可以将下载的数据直接存入沙盒.
4
代码触发EGO
[self.tableView setContentOffset:CGPointMake(0, -65) animated:NO];
[_refreshHeaderView egoRefreshScrollViewDidEndDragging:self.tableView];
5:
nil:指向oc中对象的空指针
Nil:指向oc中类的空指针
NULL:指向其他类型的空指针,如一个c类型的内存指针
NSNull:在集合对象中,表示空值的对象