In the ios navigation bar, click the barbutton drop-down list.

Source: Internet
Author: User

In the ios navigation bar, click the barbutton drop-down list.

Environment: xocde5.0.2 + ios7.0.1

1. navigation bar ---- click the subjects -------- drop-down list




<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + signature + CkBlbmQ8YnI + signature + sLro7o8YnI + CjwvcD4KPHA + signature + CiNpbXBvcnQg "signature. h"
@ Interface NGViewController: UIViewController
//-(IBAction) jumpBut :( id) sender;

@ Property (nonatomic, retain) NGRightTableViewViewController * rtvv;
@ End


. M part of the Code:

-(Void) viewDidLoad
{
[Super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: viewController];

MArray = [[NSMutableArray alloc] initWithObjects: @ "uuuuuuu", @ "qqqu", @ "qqqq", @ "rrrr", @ "yyyyy", nil];

UIButton * secondBut = [[UIButton alloc] initWithFrame: CGRectMake (120,340, 40, 40)];
[SecondBut setTintColor: [UIColor blueColor];
[SecondBut setTitle: @ "second" forState: UIControlStateNormal];
[SecondBut setTitleColor: [UIColor redColor] forState: UIControlStateNormal];
SecondBut. titleLabel. font = [UIFont fontWithName: @ "System-Bold" size: 25366f];
[SecondBut addTarget: self action: @ selector (jumpBut :) forControlEvents: UIControlEventTouchUpInside];
[Self. view addSubview: secondBut];


UIBarButtonItem * leftBarBtn = [[UIBarButtonItem alloc] initWithTitle: @ "Touch" style: UIBarButtonItemStyleBordered target: self action: @ selector (leftBarBtnClicked :)];
Self. navigationItem. leftBarButtonItem = leftBarBtn;

UIBarButtonItem * rightBarBtn = [[UIBarButtonItem alloc] initWithTitle: @ "subject" style: UIBarButtonItemStyleBordered target: self action: @ selector (rightBarBtnClicked :)];
Self. navigationItem. rightBarButtonItem = rightBarBtn;
If (rtvv = nil ){
Rtvv = [[ngrighttableviewcontroller alloc] init];

}
Rtvv. tableViewArray = mArray;
// Rtvv. view. frame = CGRectMake (0, 0,320,300 );
Rtvv. view. frame = CGRectMake (150, 64,165,120 );
[Self addChildViewController: rtvv];
[Self. view addSubview: rtvv. view];
Rtvv. pulldelegate = self;
[Rtvv. view setHidden: YES];
// [Self. view presentedViewController: rtvv. view];

// [Self .. reloadData];

}

In addition: textField corresponding keywoard height Automatic Adaptation: http://download.csdn.net/detail/shuang60/7927929

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.