1
NavigationBar가 있습니다. 탐색 바에 버튼을 추가하면 표시되지 않습니다.UINavigationBar 단추가 표시되지 않습니다.
코드 : 그것은 모음 단추를 표시 아니에요
UINavigationController *nav=[[UINavigationController alloc]init];
[self.view addSubview:nav.view];
UIImage *info_iphone=[UIImage imageNamed:@"infobtn_iphone.png"];
UIButton *infobtn=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 48, 30)];
[infobtn setBackgroundImage:info_iphone forState:UIControlStateNormal];
[infobtn addTarget:self action:@selector(show_info) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:infobtn];
... – Ram
이 여전히 표시되지 않는 이유는 무엇입니까? –