...
//創建一個左邊按鈕 UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"<" style:UIBarButtonItemStylePlain target:self action:@selector(clickLeftButton)]; // leftButton. [leftButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName, [UIColor greenColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal]; //創建一個右邊按鈕 UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"登陸" style:UIBarButtonItemStyleDone target:self action:@selector(clickRightButton)]; [rightButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName, [UIColor greenColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];