This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class GradientWrapperView: UIView { | |
private let gradientLayer: CAGradientLayer = { | |
let layer = CAGradientLayer() | |
layer.borderColor = UIColor.black.cgColor | |
layer.borderWidth = CGFloat(0.5) | |
return layer | |
}() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CircularProgressBar.swift | |
// attendance-manager | |
// | |
// Created by Yogesh Manghnani on 02/05/18. | |
// Copyright © 2018 Yogesh Manghnani. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Array: Movable where Element: Movable { | |
func move() { | |
for item in self { | |
item.move() | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Vehicele: Movable { | |
var wheels: Int | |
var doors: Int | |
var tankCapacity: Double | |
var isMoving = false | |
func move() { | |
isMoving = true | |
print("The car is moving") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Movable { | |
func move() | |
} |