У меня та же проблема, и я прочитал ответ wattson12, а затем решил другой аналогичный путь. Я не знаю, что является более эффективным.
//play button
@ IBAction func startIt (отправитель: AnyObject) {
startThrough();
};
// кнопка воспроизведения
func startThrough () {
timer = NSTimer.scheduledTimerWithTimeInterval (1, target: self, selector: Selector ("updateTime"), userInfo: nil, повторяется: true);
let pauseButton = UIBarButtonItem(barButtonSystemItem: .Pause, target: self, action: "pauseIt");
self.toolBarIt.items?.removeLast();
self.toolBarIt.items?.append( pauseButton );
}
func pauseIt () {
timer.invalidate();
let play = UIBarButtonItem(barButtonSystemItem: .Play, target: self, action: "startThrough");
self.toolBarIt.items?.removeLast();
self.toolBarIt.items?.append( play );
}