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 | |
///사용 방법 | |
///Haptics.tap() | |
struct Haptics { | |
static func tap() { | |
UIImpactFeedbackGenerator(style: .light).impactOccurred() | |
} | |
static func impact() { |
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 Collection { | |
var isNotEmpty: Bool { | |
isEmpty == false | |
} | |
} |
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
// https://www.youtube.com/watch?v=jf9TBhyAXvo 곰튀김님 | |
import UIKit | |
/* | |
사용 | |
DEBUG_LOG("View Did Load") | |
ERROR_LOG("JSON Error") | |
*/ | |
func DEBUG_LOG(_ msg: Any, file: String = #file, function: String = #function, line: Int = #line) { |
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
// https://gist.github.com/siempay/1dd2af4ccc06cea2858ced27d0988c21 | |
extension Data { | |
var bytes: Int64 { | |
.init(self.count) | |
} | |
public var kilobytes: Double { | |
return Double(bytes) / 1_024 | |
} |
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
Text("Hello, world!") | |
.onAppear { | |
for family in UIFont.familyNames { | |
print("\(family)"); | |
for names in UIFont.fontNames(forFamilyName: family) { | |
print("== \(names)"); | |
} | |
} | |
} |