 	*/
 	
 	@IBAction func startStopButtonTouched(startStopButton: UIButton) {
-		startStopButton.setTitle(startStopButton.tag == stopButtonTag ? "Start" : "Stop", forState:UIControlState.Normal)
-		startStopButton.tag = startStopButton.tag == stopButtonTag ? startButtonTag : stopButtonTag
+		if (startStopButton.tag == stopButtonTag) {
+			startStopButton.setTitle("Start", forState:UIControlState.Normal)
+			startStopButton.tag = startButtonTag
+			fotoGenerator.stopTimeLapsing()
+		} else {
+			startStopButton.setTitle("Stop", forState:UIControlState.Normal)
+			startStopButton.tag = stopButtonTag
+			fotoGenerator.startTimeLapsing()
+		}
+		
+		
 	}
 	
 	@IBAction func playButtonTouched(AnyObject) {

	@IBOutlet weak var prevButton: UIButton!
	@IBOutlet weak var nextButton: UIButton!
	
	
	override func viewDidLoad() {
		super.viewDidLoad()
		// Do any additional setup after loading the view, typically from a nib.
	}
	
	override func viewWillAppear(animated: Bool) {

let startButtonTag = 1111
let stopButtonTag = 9999

class ViewController: UIViewController, TimeLapseFotoGeneratorDelegate {

	@IBOutlet weak var durationLabel: UILabel!
	@IBOutlet weak var startStopButton: UIButton!
