<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 閱讀(621) 評論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 久久久久亚洲AV无码专区首| 亚洲精品国精品久久99热| 亚洲av福利无码无一区二区| 中国一级特黄高清免费的大片中国一级黄色片 | 国产成人不卡亚洲精品91| 免费精品一区二区三区在线观看| 亚洲一区二区三区四区视频| 美女裸身网站免费看免费网站| 亚洲伊人久久大香线蕉影院| 毛片免费在线视频| 亚洲欧美日韩一区二区三区| 精品国产一区二区三区免费看| 亚洲日韩国产二区无码| 国产成人3p视频免费观看| 免费毛片毛片网址| 亚洲伊人久久精品影院| 日韩精品在线免费观看| 亚洲精品国产专区91在线| 久久国内免费视频| 国产亚洲一卡2卡3卡4卡新区| 亚洲伊人久久成综合人影院| 成人爽a毛片免费| 亚洲校园春色另类激情| 国产一区二区三区免费看| 97超高清在线观看免费视频| 亚洲综合色丁香麻豆| 性感美女视频免费网站午夜 | 亚洲成A人片在线观看中文| 久久久久久噜噜精品免费直播| 亚洲精品白浆高清久久久久久| 91久久精品国产免费一区| 亚洲中文字幕乱码AV波多JI| 亚洲乱码日产精品a级毛片久久| 国色精品va在线观看免费视频| 亚洲免费观看在线视频| 国产一区视频在线免费观看| 国产午夜免费高清久久影院| 亚洲不卡影院午夜在线观看| 亚洲精品~无码抽插| 日韩毛片免费无码无毒视频观看| 在线播放国产不卡免费视频|