在ViewA做已下修改 ```swift
import UIKit
class Page_A_ViewController: UIViewController {override func viewDidLoad() {
super.viewDidLoad()
//NavBar
self.navigationController?.navigationBar.barTintColor = UIColor(red: 0.58, green: 0.761, blue: 0.231, alpha: 1)
let titleDic : NSDictionary = [NSForegroundColorAttributeName : UIColor.whiteColor()]; //字的顏色
self.navigationController?.navigationBar.titleTextAttributes = titleDic;
self.navigationController?.navigationBar.tintColor = UIColor.whiteColor() //按鈕的顏色
//設定右上角的按鈕let barOptionIcon : UIBarButtonItem = UIBarButtonItem(image: UIImage(named: “icon-options”), style: UIBarButtonItemStyle.Plain, target: self, action: “PushToOptionController:”);
self.navigationController?.navigationBar.topItem?.setRightBarButtonItem(barOptionIcon, animated: true) ;
}//右上角Button按下時觸發的事件
func PushToOptionController(sender: UIBarButtonItem) {
self.performSegueWithIdentifier(“toPageB”, sender: self);
}}
```
- 完成後試試看,點擊右上角的按鈕即可跳到第二頁了!!