博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  1. -(void) viewWillDisappear:(BOOL)animated    
  2. {   
  3.     if ([self.navigationController.viewControllers indexOfObject:self]==NSNotFound)    
  4.     {   
  5.         // back button was pressed.  We know this is true because self is no longer   
  6.         // in the navigation stack.     
  7.         NSLog(@"viewWillDisappear:(BOOL)animated ");   
  8.         if(request)   
  9.         {   
  10.             [request clearDelegatesAndCancel];   
  11.             request.delegate = nil;   
  12.             [request release];   
  13.             request = nil;   
  14.         }   
  15.     }   
  16.     [super viewWillDisappear:animated];   
  17. }  
http://www.cnblogs.com/zhwl/archive/2012/08/11/2633498.html
posted on 2012-08-12 22:23  Likwo  阅读(713)  评论(0编辑  收藏  举报