<bdo id='PDgqO'></bdo><ul id='PDgqO'></ul>

        <i id='PDgqO'><tr id='PDgqO'><dt id='PDgqO'><q id='PDgqO'><span id='PDgqO'><b id='PDgqO'><form id='PDgqO'><ins id='PDgqO'></ins><ul id='PDgqO'></ul><sub id='PDgqO'></sub></form><legend id='PDgqO'></legend><bdo id='PDgqO'><pre id='PDgqO'><center id='PDgqO'></center></pre></bdo></b><th id='PDgqO'></th></span></q></dt></tr></i><div id='PDgqO'><tfoot id='PDgqO'></tfoot><dl id='PDgqO'><fieldset id='PDgqO'></fieldset></dl></div>

        <legend id='PDgqO'><style id='PDgqO'><dir id='PDgqO'><q id='PDgqO'></q></dir></style></legend>

        <tfoot id='PDgqO'></tfoot>

        <small id='PDgqO'></small><noframes id='PDgqO'>

        使 UIButton 充当导航控制器

        Make UIButton act as navigationcontroller(使 UIButton 充当导航控制器)

          <legend id='4mypD'><style id='4mypD'><dir id='4mypD'><q id='4mypD'></q></dir></style></legend>
        1. <tfoot id='4mypD'></tfoot>
          <i id='4mypD'><tr id='4mypD'><dt id='4mypD'><q id='4mypD'><span id='4mypD'><b id='4mypD'><form id='4mypD'><ins id='4mypD'></ins><ul id='4mypD'></ul><sub id='4mypD'></sub></form><legend id='4mypD'></legend><bdo id='4mypD'><pre id='4mypD'><center id='4mypD'></center></pre></bdo></b><th id='4mypD'></th></span></q></dt></tr></i><div id='4mypD'><tfoot id='4mypD'></tfoot><dl id='4mypD'><fieldset id='4mypD'></fieldset></dl></div>

            <small id='4mypD'></small><noframes id='4mypD'>

              <tbody id='4mypD'></tbody>

              • <bdo id='4mypD'></bdo><ul id='4mypD'></ul>
                  本文介绍了使 UIButton 充当导航控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  How can I make a regular UIButton act as a navigationcontroller so that when it's pressed I can open up a new view?

                  解决方案

                  Create yourButton in viewDidLoad method as following way...

                  UIButton *yourButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
                  [yourButton setTitle:@"YearButton" forState:UIControlStateNormal];
                  yourButton.frame = CGRectMake(240, 40, 75, 30);     
                  [yourButton addTarget:self action:@selector(buttonSelected:) forControlEvents:UIControlEventTouchUpInside]; 
                  [self.view addSubview:yourButton];
                  

                  This is your method code and createViewController which is object of CreateViewController class and it is declared in .h file.....

                  -(void) buttonSelected:(id)sender{
                     if (!createViewController) {
                                  createViewController = [[CreateViewController alloc] initWithNibName:@"CreateViewController" bundle:nil];
                  
                              }
                  
                  
                              [self.navigationController pushViewController:createViewController animated:YES];
                  
                   }
                  

                  I think it will be helpful to you.

                  这篇关于使 UIButton 充当导航控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  UINavigationController inside a UITabBarController inside a UISplitViewController presented modally on iPhone(UISplitViewController 内的 UITabBarController 内的 UINavigationController 以模态方式呈现在 iPhone 上) - IT屋-程序员软件开发技术分
                  ViewController in UINavigationController orientation change(UINavigationController 中的 ViewController 方向更改)
                  Custom back button in UINavigationController(UINavigationController 中的自定义后退按钮)
                  How to add a navigation controller programmatically in code but not as initial view controller(如何在代码中以编程方式添加导航控制器,但不作为初始视图控制器)
                  The correct way to set a light status bar text color in iOS 7 based on different ViewControllers(iOS 7中基于不同ViewControllers设置灯光状态栏文字颜色的正确方法)
                  View being blocked by UITransitionView after being presented(呈现后被 UITransitionView 阻止的视图)
                  <tfoot id='AjgJA'></tfoot>
                  1. <legend id='AjgJA'><style id='AjgJA'><dir id='AjgJA'><q id='AjgJA'></q></dir></style></legend>
                  2. <i id='AjgJA'><tr id='AjgJA'><dt id='AjgJA'><q id='AjgJA'><span id='AjgJA'><b id='AjgJA'><form id='AjgJA'><ins id='AjgJA'></ins><ul id='AjgJA'></ul><sub id='AjgJA'></sub></form><legend id='AjgJA'></legend><bdo id='AjgJA'><pre id='AjgJA'><center id='AjgJA'></center></pre></bdo></b><th id='AjgJA'></th></span></q></dt></tr></i><div id='AjgJA'><tfoot id='AjgJA'></tfoot><dl id='AjgJA'><fieldset id='AjgJA'></fieldset></dl></div>

                          <tbody id='AjgJA'></tbody>
                      • <small id='AjgJA'></small><noframes id='AjgJA'>

                        • <bdo id='AjgJA'></bdo><ul id='AjgJA'></ul>