Skip to content

Commit

Permalink
Minor code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
afil310 committed Feb 16, 2019
1 parent 2d80097 commit 3a42ddc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Clocket.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Clocket'
s.version = '1.0.1'
s.version = '1.0.2'
s.summary = 'Customizable analog clock framework for iOS written in Swift'
s.homepage = 'https://github.com/afil310/Clocket'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
15 changes: 10 additions & 5 deletions Example/Clocket/ViewController.swift
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
//
// ViewController.swift
// Clocket
// Clocket-development
//
// Created by Andrey Filonov on 08/11/2018.
// Copyright © 2018 Andrey Filonov. All rights reserved.
// Copyright © 2019 Andrey Filonov. All rights reserved.
//


import UIKit
import AVFoundation
import Clocket


class ViewController: UIViewController, ClocketDelegate {
class ViewController: UIViewController {


@IBOutlet weak var startButton: UIButton!
Expand All @@ -27,7 +28,7 @@ class ViewController: UIViewController, ClocketDelegate {

override func viewDidLoad() {
super.viewDidLoad()
clock.clockDelegate = self
clock.clocketDelegate = self
setupView()
setupClock()
}
Expand Down Expand Up @@ -157,7 +158,10 @@ class ViewController: UIViewController, ClocketDelegate {
@objc func manualTimeSetSwitchStateChanged(switchState: UISwitch) {
clock.manualTimeSetAllowed = switchState.isOn
}

}


extension ViewController: ClocketDelegate {

func timeIsSetManually() {
clock.displayRealTime = false
Expand Down Expand Up @@ -185,4 +189,5 @@ class ViewController: UIViewController, ClocketDelegate {

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
}

}

0 comments on commit 3a42ddc

Please sign in to comment.