<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 充当导航控制器

        时间:2023-06-10

          <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 仅隐藏导航栏 - 后退动画问题 下一篇:为什么我的视图仍然以横向显示?

                  相关文章

                  <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>

                    1. <small id='AjgJA'></small><noframes id='AjgJA'>

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