实际上我在导航栏的右侧放置了一个栏按钮,它不起作用。但是当我将它用作左栏按钮项目时,它工作正常。我正在使用ios5。
当我同时拥有左右栏按钮时,它也不起作用。然后我为两者设置了框架,然后这些都起作用了。但是当我在右侧只有一个按钮时,它不起作用。
UIButton *but1 = [UIButton buttonWithType:UIButtonTypeCustom];//customising map button.
but1.frame = CGRectMake(270,0,50,40);
[but1 addTarget:self action:@selector(clicked) forControlEvents:UIControlEventTouchUpInside];//on cilcking an map button clicked method is called.
buttonRight = [[UIBarButtonItem alloc]initWithCustomView:but1];//setting map button on Navigation bar.
self.navigationItem.rightBarButtonItem = buttonRight;//setting button on the Right of navigation bar.
如何追踪这个错误?