how-to-trap-the-back-button-event

- (void)viewWillDisappear: (BOOL)animated
{
    [super viewWillDisappear: animated];
    if (![[self.navigationController viewControllers] containsObject: self])
    {
        // the view has been removed from the navigation stack, back is probably the cause
        // this will be slow with a large stack however.
    }
}



http://stackoverflow.com/questions/1557290/how-to-trap-the-back-button-event
posted @ 2014-12-13 16:36  lianhuaren  阅读(50)  评论(0)    收藏  举报