Skip to content

Commit

Permalink
#71 Added vibration when End activity is showed
Browse files Browse the repository at this point in the history
  • Loading branch information
kperusko committed Dec 23, 2015
1 parent 336559a commit e696b26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DesignStudioExpress/ViewModels/EndActivityViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright © 2015 Alexander Interactive. All rights reserved.
//
import NRSimplePlist
import AudioToolbox

class EndActivityViewModel {
var didAddMoreTime = false
Expand All @@ -32,6 +33,10 @@ class EndActivityViewModel {
}
}

func viewDidAppear() {
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
}

func viewDidDisappear() {
if self.didAddMoreTime {
AppDelegate.designStudio.addMoreTimeViewDidDisappear()
Expand Down
4 changes: 4 additions & 0 deletions DesignStudioExpress/Views/EndActivityViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class EndActivityViewController: UIViewController {
self.addMoreTime.setTitle(vm.addMoreTimeTitle, forState: .Normal)
}

override func viewDidAppear(animated: Bool) {
self.vm.viewDidAppear()
}

override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)

Expand Down

0 comments on commit e696b26

Please sign in to comment.