1
A
回答
0
你可以試試這個
[self.navigationItem setTitle:@"Vijay"];
UIImage *image = [UIImage imageNamed:@"tabarrrr"];
[self.navigationController.navigationBar setBackgroundImage:image forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:image];
[self.navigationController.navigationBar setShadowImage:[UIImage new]];
[self.navigationController setNavigationBarHidden:FALSE];
[self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
//
// UIBarButtonItem *RigthButtonClicek=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"search.png"] style:UIBarButtonItemStylePlain target:self action:@selector(RigthButtonClicek:)];
UIButton *button1=[UIButton buttonWithType:UIButtonTypeCustom];
[button1 setFrame:CGRectMake(10.0, 2.0, 40, 20.0)];
[button1 addTarget:self action:@selector(RigthButtonClicek:) forControlEvents:UIControlEventTouchUpInside];
[button1 setImage:[UIImage imageNamed:@"cancelbtn.png"] forState:UIControlStateNormal];
UIBarButtonItem *button = [[UIBarButtonItem alloc]initWithCustomView:button1];
self.navigationItem.leftBarButtonItem = button;
UIButton *button2=[UIButton buttonWithType:UIButtonTypeCustom];
[button2 setFrame:CGRectMake(10.0, 2.0, 40, 20.0)];
[button2 addTarget:self action:@selector(RigthButtonClicek:) forControlEvents:UIControlEventTouchUpInside];
[button2 setImage:[UIImage imageNamed:@"search.png"] forState:UIControlStateNormal];
UIBarButtonItem *button3 = [[UIBarButtonItem alloc]initWithCustomView:button2];
self.navigationItem.rightBarButtonItem = button3;
相關問題
- 1. 刪除移動視圖上的粘滯導航粘滯js
- 2. 在導航欄下添加一個粘滯視圖
- 3. 粘滯導航欄
- 4. 粘滯側導航
- 5. jquery粘滯導航
- 6. 如何創建滾動到粘滯導航欄的標題?
- 7. 粘滯導航棒太遲
- 8. 粘滯側導航/面板
- 9. 基金會粘滯導航
- 10. 粘滯導航滯後滾動
- 11. 創建一個PHP的粘滯形式
- 12. 使用淡入淡出效果創建粘滯導航
- 13. Jquery粘滯導航滿足一定條件時觸發
- 14. 使用JavaScript粘滯導航的問題
- 15. 粘滯的導航欄,但有餘量
- 16. 在標準Flipside視圖內創建一個導航視圖?
- 17. 粘滯導航菜單不能正確粘貼到頂部
- 18. Bootstrap 4 - 具有固定邊距的粘滯導航條
- 19. 出現在滾動條上的粘滯導航
- 20. 粘滯導航像閃爍燈閃爍
- 21. 粘滯導航欄不再工作
- 22. 粘滯導航不起作用
- 23. 粘滯導航欄不工作
- 24. 響應和粘滯導航欄
- 25. 如何製作粘滯導航欄?
- 26. React JS粘滯導航滾動
- 27. 粘滯導航欄dö不工作/// stickyfill.js
- 28. React.js粘滯導航不起作用
- 29. 粘滯導航不會對齊中心
- 30. 粘滯導航欄不起作用