<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 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評(píng)論 :: 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) 評(píng)論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 国产91在线|亚洲| 精品亚洲国产成AV人片传媒| 亚洲一区二区三区写真| 性xxxxx免费视频播放| 久久亚洲AV无码精品色午夜 | 亚洲Av无码国产一区二区| 日韩一区二区免费视频| 久久久久久国产精品免费免费 | 一进一出60分钟免费视频| 亚洲电影日韩精品| 国产va免费精品| 亚洲欧洲精品无码AV| 久久免费视频精品| 亚洲高清视频免费| 最近中文字幕无免费视频| 久久亚洲国产视频| 日本免费一区二区在线观看| 亚洲一区免费在线观看| 啦啦啦在线免费视频| 无遮挡呻吟娇喘视频免费播放| 国产成人亚洲精品影院| 免费污视频在线观看| 亚洲国产高清在线精品一区| 天天干在线免费视频| 本道天堂成在人线av无码免费| 久久亚洲AV午夜福利精品一区| 亚欧人成精品免费观看| 亚洲av无码专区亚洲av不卡| 国产成人高清亚洲| 亚洲视频在线观看免费视频| 337P日本欧洲亚洲大胆艺术图| 久久久无码精品亚洲日韩软件| 91精品国产免费久久国语麻豆| 亚洲欧洲专线一区| 国产亚洲大尺度无码无码专线| **俄罗斯毛片免费| 国产精品亚洲av色欲三区| 久久亚洲AV无码精品色午夜麻| 免费视频淫片aa毛片| 亚洲美国产亚洲AV| 国产亚洲av片在线观看16女人|