├── appvideo.gif
├── CountDownTimer
├── Assets.xcassets
│ ├── Contents.json
│ ├── background.imageset
│ │ ├── background.jpg
│ │ ├── background@2x.jpg
│ │ ├── background@3x.jpg
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── HeaderView.swift
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── AppDelegate.swift
├── ViewController.swift
└── HeaderView.xib
├── CountDownTimer.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── Kamal.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── CountDownTimer.xcscheme
└── project.pbxproj
├── CountDownTimer.xcworkspace
└── contents.xcworkspacedata
├── Podfile
├── README.md
└── .gitignore
/appvideo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalupasena/CountDownTimerSwift/HEAD/appvideo.gif
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/background.imageset/ background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalupasena/CountDownTimerSwift/HEAD/CountDownTimer/Assets.xcassets/background.imageset/ background.jpg
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/background.imageset/ background@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalupasena/CountDownTimerSwift/HEAD/CountDownTimer/Assets.xcassets/background.imageset/ background@2x.jpg
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/background.imageset/ background@3x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kamalupasena/CountDownTimerSwift/HEAD/CountDownTimer/Assets.xcassets/background.imageset/ background@3x.jpg
--------------------------------------------------------------------------------
/CountDownTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CountDownTimer.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'CountDownTimer' do
5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | # Pods for CountDownTimer
9 | pod 'CircleProgressView'
10 | end
11 |
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/background.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : " background.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : " background@2x.jpg",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : " background@3x.jpg",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/CountDownTimer.xcodeproj/xcuserdata/Kamal.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CountDownTimer.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8A1B201E1F6962AA002F0322
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Countdown Timer Swift
2 |
3 | ## Preview
4 |
5 | 
6 |
7 | ## Overview
8 |
9 | This is a sample of coundownd timer that create using swift.I have created this to simply view the remaning time in a colorful way
10 |
11 | ## Configure
12 |
13 | Download or Clone the project and go to terminal and type `pod install`
14 |
15 | ## Steps
16 |
17 | You can read it from [here](https://medium.com/@kamalupasena/countdown-timer-swift-3-8265686e8191)
18 |
19 | ## Inspired by
20 |
21 | This project was inspired by `CircleProgressView` [Link](https://github.com/CardinalNow/iOS-CircleProgressView)
22 |
--------------------------------------------------------------------------------
/CountDownTimer/HeaderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HeaderView.swift
3 | //
4 | //
5 | // Created by Kamal Sampath Upasena on 8/21/17.
6 | // Copyright © 2017 bhasha. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import CircleProgressView
11 |
12 | class HeaderView: UIView {
13 |
14 | @IBOutlet var view: UIView!
15 |
16 | @IBOutlet var DaysProgress: CircleProgressView!
17 | @IBOutlet var hoursProgress: CircleProgressView!
18 | @IBOutlet var minitesProgress: CircleProgressView!
19 | @IBOutlet var secondesProgress: CircleProgressView!
20 |
21 |
22 | @IBOutlet var valueDay: UILabel!
23 | @IBOutlet var valueHour: UILabel!
24 | @IBOutlet var valueMinites: UILabel!
25 | @IBOutlet var valueSeconds: UILabel!
26 |
27 | @IBOutlet var clockView: UIView!
28 |
29 |
30 |
31 | required init?(coder aDecoder: NSCoder) {
32 | super.init(coder: aDecoder)
33 |
34 |
35 |
36 | _ = Bundle.main.loadNibNamed("HeaderView", owner: self, options: nil)![0] as! UIView
37 | view.frame = self.bounds
38 | }
39 |
40 | override init(frame: CGRect) {
41 | super.init(frame: frame)
42 | _ = Bundle.main.loadNibNamed("HeaderView", owner: self, options: nil)![0] as! UIView
43 | view.frame = frame
44 | self.addSubview(view)
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/CountDownTimer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | # Package.resolved
41 | .build/
42 |
43 | # CocoaPods
44 | #
45 | # We recommend against adding the Pods directory to your .gitignore. However
46 | # you should judge for yourself, the pros and cons are mentioned at:
47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48 | #
49 | Pods/
50 | Podfile.lock
51 |
52 | # Carthage
53 | #
54 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
55 | # Carthage/Checkouts
56 |
57 | Carthage/Build
58 |
59 | # fastlane
60 | #
61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
62 | # screenshots whenever they are needed.
63 | # For more information about the recommended setup visit:
64 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
65 |
66 | fastlane/report.xml
67 | fastlane/Preview.html
68 | fastlane/screenshots
69 | fastlane/test_output
70 |
--------------------------------------------------------------------------------
/CountDownTimer/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CountDownTimer/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/CountDownTimer/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/CountDownTimer/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // CountDownTimer
4 | //
5 | // Created by Kamal Sampath Upasena on 9/13/17.
6 | // Copyright © 2017 Kamal Sampath Upasena. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/CountDownTimer.xcodeproj/xcuserdata/Kamal.xcuserdatad/xcschemes/CountDownTimer.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/CountDownTimer/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // CountDownTimer
4 | //
5 | // Created by Kamal Sampath Upasena on 9/13/17.
6 | // Copyright © 2017 Kamal Sampath Upasena. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | var timeEnd : Date?
14 | var header : HeaderView?
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | // Add your End Time here
20 | timeEnd = Date(timeInterval: "2019-01-01 10:00:00".toDate(format: "yyyy-MM-dd HH:mm:ss").timeIntervalSince(Date()), since: Date())
21 |
22 | addTimerView()
23 |
24 | }
25 |
26 | override func didReceiveMemoryWarning() {
27 | super.didReceiveMemoryWarning()
28 | // Dispose of any resources that can be recreated.
29 | }
30 |
31 |
32 | func addTimerView(){
33 |
34 | let height = (self.view.frame.width * 9)/16
35 |
36 | header = HeaderView(frame: CGRect(x:0, y: 0,width : self.view.frame.width, height : height))
37 |
38 | self.view.addSubview(header!)
39 |
40 | updateView()
41 |
42 | }
43 |
44 | func updateView() {
45 | // Initialize the label
46 | setTimeLeft()
47 |
48 | // Start timer
49 | Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(self.setTimeLeft), userInfo: nil, repeats: true)
50 | }
51 |
52 |
53 | func setTimeLeft() {
54 | let timeNow = Date()
55 |
56 |
57 | if timeEnd?.compare(timeNow) == ComparisonResult.orderedDescending {
58 |
59 | let interval = timeEnd?.timeIntervalSince(timeNow)
60 |
61 | let days = (interval! / (60*60*24)).rounded(.down)
62 |
63 | let daysRemainder = interval?.truncatingRemainder(dividingBy: 60*60*24)
64 |
65 | let hours = (daysRemainder! / (60 * 60)).rounded(.down)
66 |
67 | let hoursRemainder = daysRemainder?.truncatingRemainder(dividingBy: 60 * 60).rounded(.down)
68 |
69 | let minites = (hoursRemainder! / 60).rounded(.down)
70 |
71 | let minitesRemainder = hoursRemainder?.truncatingRemainder(dividingBy: 60).rounded(.down)
72 |
73 | let scondes = minitesRemainder?.truncatingRemainder(dividingBy: 60).rounded(.down)
74 |
75 |
76 | header?.DaysProgress.setProgress(days/360, animated: false)
77 | header?.hoursProgress.setProgress(hours/24, animated: false)
78 | header?.minitesProgress.setProgress(minites/60, animated: false)
79 | header?.secondesProgress.setProgress(scondes!/60, animated: false)
80 |
81 | let formatter = NumberFormatter()
82 | formatter.minimumIntegerDigits = 2
83 |
84 | header?.valueDay.text = formatter.string(from: NSNumber(value:days))
85 | header?.valueHour.text = formatter.string(from: NSNumber(value:hours))
86 | header?.valueMinites.text = formatter.string(from: NSNumber(value:minites))
87 | header?.valueSeconds.text = formatter.string(from: NSNumber(value:scondes!))
88 |
89 |
90 |
91 | } else {
92 | header?.fadeOut()
93 | }
94 | }
95 |
96 |
97 |
98 | }
99 |
100 | extension String{
101 | func toDate(format : String) -> Date{
102 | let dateFormatter = DateFormatter()
103 |
104 | dateFormatter.dateFormat = format
105 | return dateFormatter.date(from: self)!
106 | }
107 | }
108 |
109 | extension UIView {
110 | func fadeIn() {
111 | // Move our fade out code from earlier
112 | UIView.animate(withDuration: 0.3, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: {
113 | self.alpha = 1.0 // Instead of a specific instance of, say, birdTypeLabel, we simply set [thisInstance] (ie, self)'s alpha
114 | }, completion: nil)
115 | }
116 |
117 | func fadeOut() {
118 | UIView.animate(withDuration: 0.3, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
119 | self.alpha = 0.0
120 | }, completion: nil)
121 | }
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/CountDownTimer.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 8A1B20231F6962AA002F0322 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A1B20221F6962AA002F0322 /* AppDelegate.swift */; };
11 | 8A1B20251F6962AA002F0322 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A1B20241F6962AA002F0322 /* ViewController.swift */; };
12 | 8A1B20281F6962AA002F0322 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8A1B20261F6962AA002F0322 /* Main.storyboard */; };
13 | 8A1B202A1F6962AA002F0322 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8A1B20291F6962AA002F0322 /* Assets.xcassets */; };
14 | 8A1B202D1F6962AA002F0322 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8A1B202B1F6962AA002F0322 /* LaunchScreen.storyboard */; };
15 | 8A1B20371F69654F002F0322 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A1B20351F69654F002F0322 /* HeaderView.swift */; };
16 | 8A1B20381F69654F002F0322 /* HeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8A1B20361F69654F002F0322 /* HeaderView.xib */; };
17 | C53F7594924FD45D252AFC69 /* Pods_CountDownTimer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FEAD0F079F9721595E724BF9 /* Pods_CountDownTimer.framework */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 8A1B201F1F6962AA002F0322 /* CountDownTimer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CountDownTimer.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 8A1B20221F6962AA002F0322 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
23 | 8A1B20241F6962AA002F0322 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
24 | 8A1B20271F6962AA002F0322 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
25 | 8A1B20291F6962AA002F0322 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | 8A1B202C1F6962AA002F0322 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
27 | 8A1B202E1F6962AA002F0322 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
28 | 8A1B20351F69654F002F0322 /* HeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; };
29 | 8A1B20361F69654F002F0322 /* HeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HeaderView.xib; sourceTree = ""; };
30 | BFB711DDD6B4090CE8A0DA72 /* Pods-CountDownTimer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CountDownTimer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CountDownTimer/Pods-CountDownTimer.debug.xcconfig"; sourceTree = ""; };
31 | F381765C19263037F615164A /* Pods-CountDownTimer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CountDownTimer.release.xcconfig"; path = "Pods/Target Support Files/Pods-CountDownTimer/Pods-CountDownTimer.release.xcconfig"; sourceTree = ""; };
32 | FEAD0F079F9721595E724BF9 /* Pods_CountDownTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CountDownTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 8A1B201C1F6962AA002F0322 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | C53F7594924FD45D252AFC69 /* Pods_CountDownTimer.framework in Frameworks */,
41 | );
42 | runOnlyForDeploymentPostprocessing = 0;
43 | };
44 | /* End PBXFrameworksBuildPhase section */
45 |
46 | /* Begin PBXGroup section */
47 | 19703E72F5134F0C2E6A2341 /* Pods */ = {
48 | isa = PBXGroup;
49 | children = (
50 | BFB711DDD6B4090CE8A0DA72 /* Pods-CountDownTimer.debug.xcconfig */,
51 | F381765C19263037F615164A /* Pods-CountDownTimer.release.xcconfig */,
52 | );
53 | name = Pods;
54 | sourceTree = "";
55 | };
56 | 6D2777B931C995A063F5003D /* Frameworks */ = {
57 | isa = PBXGroup;
58 | children = (
59 | FEAD0F079F9721595E724BF9 /* Pods_CountDownTimer.framework */,
60 | );
61 | name = Frameworks;
62 | sourceTree = "";
63 | };
64 | 8A1B20161F6962AA002F0322 = {
65 | isa = PBXGroup;
66 | children = (
67 | 8A1B20211F6962AA002F0322 /* CountDownTimer */,
68 | 8A1B20201F6962AA002F0322 /* Products */,
69 | 19703E72F5134F0C2E6A2341 /* Pods */,
70 | 6D2777B931C995A063F5003D /* Frameworks */,
71 | );
72 | sourceTree = "";
73 | };
74 | 8A1B20201F6962AA002F0322 /* Products */ = {
75 | isa = PBXGroup;
76 | children = (
77 | 8A1B201F1F6962AA002F0322 /* CountDownTimer.app */,
78 | );
79 | name = Products;
80 | sourceTree = "";
81 | };
82 | 8A1B20211F6962AA002F0322 /* CountDownTimer */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 8A1B20341F69652E002F0322 /* View */,
86 | 8A1B20221F6962AA002F0322 /* AppDelegate.swift */,
87 | 8A1B20241F6962AA002F0322 /* ViewController.swift */,
88 | 8A1B20261F6962AA002F0322 /* Main.storyboard */,
89 | 8A1B20291F6962AA002F0322 /* Assets.xcassets */,
90 | 8A1B202B1F6962AA002F0322 /* LaunchScreen.storyboard */,
91 | 8A1B202E1F6962AA002F0322 /* Info.plist */,
92 | );
93 | path = CountDownTimer;
94 | sourceTree = "";
95 | };
96 | 8A1B20341F69652E002F0322 /* View */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 8A1B20351F69654F002F0322 /* HeaderView.swift */,
100 | 8A1B20361F69654F002F0322 /* HeaderView.xib */,
101 | );
102 | name = View;
103 | sourceTree = "";
104 | };
105 | /* End PBXGroup section */
106 |
107 | /* Begin PBXNativeTarget section */
108 | 8A1B201E1F6962AA002F0322 /* CountDownTimer */ = {
109 | isa = PBXNativeTarget;
110 | buildConfigurationList = 8A1B20311F6962AA002F0322 /* Build configuration list for PBXNativeTarget "CountDownTimer" */;
111 | buildPhases = (
112 | B01142E9F86A9D08A5933932 /* [CP] Check Pods Manifest.lock */,
113 | 8A1B201B1F6962AA002F0322 /* Sources */,
114 | 8A1B201C1F6962AA002F0322 /* Frameworks */,
115 | 8A1B201D1F6962AA002F0322 /* Resources */,
116 | E4C8C9432C3EFA3D8BDA7380 /* [CP] Embed Pods Frameworks */,
117 | DC846D4B38C81AB14BBC9694 /* [CP] Copy Pods Resources */,
118 | );
119 | buildRules = (
120 | );
121 | dependencies = (
122 | );
123 | name = CountDownTimer;
124 | productName = CountDownTimer;
125 | productReference = 8A1B201F1F6962AA002F0322 /* CountDownTimer.app */;
126 | productType = "com.apple.product-type.application";
127 | };
128 | /* End PBXNativeTarget section */
129 |
130 | /* Begin PBXProject section */
131 | 8A1B20171F6962AA002F0322 /* Project object */ = {
132 | isa = PBXProject;
133 | attributes = {
134 | LastSwiftUpdateCheck = 0830;
135 | LastUpgradeCheck = 0830;
136 | ORGANIZATIONNAME = "Kamal Sampath Upasena";
137 | TargetAttributes = {
138 | 8A1B201E1F6962AA002F0322 = {
139 | CreatedOnToolsVersion = 8.3.2;
140 | ProvisioningStyle = Automatic;
141 | };
142 | };
143 | };
144 | buildConfigurationList = 8A1B201A1F6962AA002F0322 /* Build configuration list for PBXProject "CountDownTimer" */;
145 | compatibilityVersion = "Xcode 3.2";
146 | developmentRegion = English;
147 | hasScannedForEncodings = 0;
148 | knownRegions = (
149 | en,
150 | Base,
151 | );
152 | mainGroup = 8A1B20161F6962AA002F0322;
153 | productRefGroup = 8A1B20201F6962AA002F0322 /* Products */;
154 | projectDirPath = "";
155 | projectRoot = "";
156 | targets = (
157 | 8A1B201E1F6962AA002F0322 /* CountDownTimer */,
158 | );
159 | };
160 | /* End PBXProject section */
161 |
162 | /* Begin PBXResourcesBuildPhase section */
163 | 8A1B201D1F6962AA002F0322 /* Resources */ = {
164 | isa = PBXResourcesBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | 8A1B202D1F6962AA002F0322 /* LaunchScreen.storyboard in Resources */,
168 | 8A1B202A1F6962AA002F0322 /* Assets.xcassets in Resources */,
169 | 8A1B20281F6962AA002F0322 /* Main.storyboard in Resources */,
170 | 8A1B20381F69654F002F0322 /* HeaderView.xib in Resources */,
171 | );
172 | runOnlyForDeploymentPostprocessing = 0;
173 | };
174 | /* End PBXResourcesBuildPhase section */
175 |
176 | /* Begin PBXShellScriptBuildPhase section */
177 | B01142E9F86A9D08A5933932 /* [CP] Check Pods Manifest.lock */ = {
178 | isa = PBXShellScriptBuildPhase;
179 | buildActionMask = 2147483647;
180 | files = (
181 | );
182 | inputPaths = (
183 | );
184 | name = "[CP] Check Pods Manifest.lock";
185 | outputPaths = (
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | shellPath = /bin/sh;
189 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
190 | showEnvVarsInLog = 0;
191 | };
192 | DC846D4B38C81AB14BBC9694 /* [CP] Copy Pods Resources */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "[CP] Copy Pods Resources";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CountDownTimer/Pods-CountDownTimer-resources.sh\"\n";
205 | showEnvVarsInLog = 0;
206 | };
207 | E4C8C9432C3EFA3D8BDA7380 /* [CP] Embed Pods Frameworks */ = {
208 | isa = PBXShellScriptBuildPhase;
209 | buildActionMask = 2147483647;
210 | files = (
211 | );
212 | inputPaths = (
213 | );
214 | name = "[CP] Embed Pods Frameworks";
215 | outputPaths = (
216 | );
217 | runOnlyForDeploymentPostprocessing = 0;
218 | shellPath = /bin/sh;
219 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CountDownTimer/Pods-CountDownTimer-frameworks.sh\"\n";
220 | showEnvVarsInLog = 0;
221 | };
222 | /* End PBXShellScriptBuildPhase section */
223 |
224 | /* Begin PBXSourcesBuildPhase section */
225 | 8A1B201B1F6962AA002F0322 /* Sources */ = {
226 | isa = PBXSourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | 8A1B20251F6962AA002F0322 /* ViewController.swift in Sources */,
230 | 8A1B20371F69654F002F0322 /* HeaderView.swift in Sources */,
231 | 8A1B20231F6962AA002F0322 /* AppDelegate.swift in Sources */,
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | };
235 | /* End PBXSourcesBuildPhase section */
236 |
237 | /* Begin PBXVariantGroup section */
238 | 8A1B20261F6962AA002F0322 /* Main.storyboard */ = {
239 | isa = PBXVariantGroup;
240 | children = (
241 | 8A1B20271F6962AA002F0322 /* Base */,
242 | );
243 | name = Main.storyboard;
244 | sourceTree = "";
245 | };
246 | 8A1B202B1F6962AA002F0322 /* LaunchScreen.storyboard */ = {
247 | isa = PBXVariantGroup;
248 | children = (
249 | 8A1B202C1F6962AA002F0322 /* Base */,
250 | );
251 | name = LaunchScreen.storyboard;
252 | sourceTree = "";
253 | };
254 | /* End PBXVariantGroup section */
255 |
256 | /* Begin XCBuildConfiguration section */
257 | 8A1B202F1F6962AA002F0322 /* Debug */ = {
258 | isa = XCBuildConfiguration;
259 | buildSettings = {
260 | ALWAYS_SEARCH_USER_PATHS = NO;
261 | CLANG_ANALYZER_NONNULL = YES;
262 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
263 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
264 | CLANG_CXX_LIBRARY = "libc++";
265 | CLANG_ENABLE_MODULES = YES;
266 | CLANG_ENABLE_OBJC_ARC = YES;
267 | CLANG_WARN_BOOL_CONVERSION = YES;
268 | CLANG_WARN_CONSTANT_CONVERSION = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
271 | CLANG_WARN_EMPTY_BODY = YES;
272 | CLANG_WARN_ENUM_CONVERSION = YES;
273 | CLANG_WARN_INFINITE_RECURSION = YES;
274 | CLANG_WARN_INT_CONVERSION = YES;
275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
277 | CLANG_WARN_UNREACHABLE_CODE = YES;
278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
280 | COPY_PHASE_STRIP = NO;
281 | DEBUG_INFORMATION_FORMAT = dwarf;
282 | ENABLE_STRICT_OBJC_MSGSEND = YES;
283 | ENABLE_TESTABILITY = YES;
284 | GCC_C_LANGUAGE_STANDARD = gnu99;
285 | GCC_DYNAMIC_NO_PIC = NO;
286 | GCC_NO_COMMON_BLOCKS = YES;
287 | GCC_OPTIMIZATION_LEVEL = 0;
288 | GCC_PREPROCESSOR_DEFINITIONS = (
289 | "DEBUG=1",
290 | "$(inherited)",
291 | );
292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
294 | GCC_WARN_UNDECLARED_SELECTOR = YES;
295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
296 | GCC_WARN_UNUSED_FUNCTION = YES;
297 | GCC_WARN_UNUSED_VARIABLE = YES;
298 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
299 | MTL_ENABLE_DEBUG_INFO = YES;
300 | ONLY_ACTIVE_ARCH = YES;
301 | SDKROOT = iphoneos;
302 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
303 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
304 | TARGETED_DEVICE_FAMILY = "1,2";
305 | };
306 | name = Debug;
307 | };
308 | 8A1B20301F6962AA002F0322 /* Release */ = {
309 | isa = XCBuildConfiguration;
310 | buildSettings = {
311 | ALWAYS_SEARCH_USER_PATHS = NO;
312 | CLANG_ANALYZER_NONNULL = YES;
313 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
314 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
315 | CLANG_CXX_LIBRARY = "libc++";
316 | CLANG_ENABLE_MODULES = YES;
317 | CLANG_ENABLE_OBJC_ARC = YES;
318 | CLANG_WARN_BOOL_CONVERSION = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
321 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Release;
351 | };
352 | 8A1B20321F6962AA002F0322 /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | baseConfigurationReference = BFB711DDD6B4090CE8A0DA72 /* Pods-CountDownTimer.debug.xcconfig */;
355 | buildSettings = {
356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357 | INFOPLIST_FILE = CountDownTimer/Info.plist;
358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
359 | PRODUCT_BUNDLE_IDENTIFIER = lk.root.CountDownTimer;
360 | PRODUCT_NAME = "$(TARGET_NAME)";
361 | SWIFT_VERSION = 3.0;
362 | };
363 | name = Debug;
364 | };
365 | 8A1B20331F6962AA002F0322 /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | baseConfigurationReference = F381765C19263037F615164A /* Pods-CountDownTimer.release.xcconfig */;
368 | buildSettings = {
369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370 | INFOPLIST_FILE = CountDownTimer/Info.plist;
371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
372 | PRODUCT_BUNDLE_IDENTIFIER = lk.root.CountDownTimer;
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | SWIFT_VERSION = 3.0;
375 | };
376 | name = Release;
377 | };
378 | /* End XCBuildConfiguration section */
379 |
380 | /* Begin XCConfigurationList section */
381 | 8A1B201A1F6962AA002F0322 /* Build configuration list for PBXProject "CountDownTimer" */ = {
382 | isa = XCConfigurationList;
383 | buildConfigurations = (
384 | 8A1B202F1F6962AA002F0322 /* Debug */,
385 | 8A1B20301F6962AA002F0322 /* Release */,
386 | );
387 | defaultConfigurationIsVisible = 0;
388 | defaultConfigurationName = Release;
389 | };
390 | 8A1B20311F6962AA002F0322 /* Build configuration list for PBXNativeTarget "CountDownTimer" */ = {
391 | isa = XCConfigurationList;
392 | buildConfigurations = (
393 | 8A1B20321F6962AA002F0322 /* Debug */,
394 | 8A1B20331F6962AA002F0322 /* Release */,
395 | );
396 | defaultConfigurationIsVisible = 0;
397 | defaultConfigurationName = Release;
398 | };
399 | /* End XCConfigurationList section */
400 | };
401 | rootObject = 8A1B20171F6962AA002F0322 /* Project object */;
402 | }
403 |
--------------------------------------------------------------------------------
/CountDownTimer/HeaderView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
219 |
225 |
231 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
--------------------------------------------------------------------------------