uibarbuttonsystemitem

UIBarButton not changing

喜欢而已 提交于 2019-12-24 03:54:07
问题 @IBOutlet weak var playStopButton: UIBarButtonItem! var playStopArray = [UIBarButtonSystemItem.Pause, UIBarButtonSystemItem.Play] var index = 0 @IBOutlet weak var image: UIImageView! @IBAction func playButton(sender: UIBarButtonItem) { println("pressed") playStopButton = UIBarButtonItem(barButtonSystemItem: playStopArray[index], target: self, action: "startMusic:") println("here") if index == 0 { index = 1 } else { index = 0 } } func startMusic() { println("test") } I expected the bar button

Compose UIBarButtonItem changes position slightly when coming into view

空扰寡人 提交于 2019-12-04 18:12:35
问题 When presenting a new view with a UIBarButtonSystemItemCompose button in the navigation bar, the position is slightly off and adjusts after the view has come into view. I think this is a bug in iOS (version 8.3 used). It only happens when using the UIBarButtonSystemItemCompose. It does not happen with other types of Buttons (system, text or custom). The only code needed to replicate this bug is to use this ViewController code with the view that will come into view: #import "ViewController.h"

Compose UIBarButtonItem changes position slightly when coming into view

你离开我真会死。 提交于 2019-12-03 11:02:14
When presenting a new view with a UIBarButtonSystemItemCompose button in the navigation bar, the position is slightly off and adjusts after the view has come into view. I think this is a bug in iOS (version 8.3 used). It only happens when using the UIBarButtonSystemItemCompose. It does not happen with other types of Buttons (system, text or custom). The only code needed to replicate this bug is to use this ViewController code with the view that will come into view: #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super