<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

    Yes! There is a way of using the backBarButton with a custom action. No, it’s not by overriding the backBarButton property of navigationItem. This is not an ugly solution with images that simulate the “Back”-button (arrow-shaped.) It’s possible to use the backBarButton for popping the current viewController as normal, but than with other animations such as UIViewAnimationTransitionCurlDown.

    Enough said, the solution is simple. You have to subclass your navigationController’s  popViewControllerAnimated:(BOOL)animated. So create a custom navigationController:

    customNavigationController.h

    #import
    @interface customNavigationController : UINavigationController {}
    @end

    And a custom “popViewControllerAnimated:(BOOL)animated”, this popViewControllerAnimated-function uses the “UIViewAnimationTransitionCurlDown” when popping from a SettingsTableView.

    customNavigationController.m

    #import "customNavigationController.h"
    #import "SettingsTableController.h"
     
    @implementation customNavigationController
     
    - (UIViewController *)popViewControllerAnimated:(BOOL)animated
    {
    if([[self.viewControllers lastObject] class] == [SettingsTableController class]){
     
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration: 1.00];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown
    forView:self.view cache:NO];
     
    UIViewController *viewController = [super popViewControllerAnimated:NO];
     
    [UIView commitAnimations];
     
    return viewController;
    } else {
    return [super popViewControllerAnimated:animated];
    }
    }
    @end

    Use your custom navigationController in your appDelegate:

    customNavigationController *navigationController =
    [[customNavigationController alloc]
    initWithRootViewController:rootView];

    posted on 2010-11-13 23:12 seal 閱讀(627) 評論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 亚洲综合综合在线| 91在线品视觉盛宴免费| 九九免费观看全部免费视频| 伊人久久五月丁香综合中文亚洲 | 免费A级毛片av无码| 国产成人无码区免费内射一片色欲| jizz免费一区二区三区| 一本久久免费视频| 国产成人无码免费网站| 免费电视剧在线观看| 亚洲日韩一中文字暮| 中文字幕乱码亚洲无线三区| 日本亚洲免费无线码| 亚洲最大无码中文字幕| 亚洲国产区男人本色| 成a人片亚洲日本久久| 国产成人亚洲精品电影| 成人免费视频一区二区| 久久久久久久国产免费看| a级片免费观看视频| 免费无码VA一区二区三区| 亚洲一区二区三区免费观看| 美女被免费喷白浆视频| 日韩毛片免费在线观看| 全部免费a级毛片| 国产亚洲人成网站在线观看| 亚洲av无码不卡一区二区三区| 亚洲嫩模在线观看| 亚洲sss综合天堂久久久| 亚洲乱理伦片在线观看中字| 免费毛片毛片网址| 国产在线一区二区综合免费视频 | 亚洲视屏在线观看| 亚洲天堂2016| 牛牛在线精品免费视频观看| 在线观看免费视频网站色| 91福利免费体验区观看区| 成年女人毛片免费视频| 亚洲国产香蕉人人爽成AV片久久| 亚洲精品夜夜夜妓女网| 亚洲国产美女视频|