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
// | |
// UIView+AnimateAlpha.swift | |
// | |
// Created by Felix Mau on 17/12/18. | |
// Copyright © 2018 Felix Mau. All rights reserved. | |
// | |
import UIKit | |
extension UIView { |
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
// | |
// Combine-PassthroughSubject-CurrentValueSubject.playground | |
// | |
// Created by Felix Mau on 30.07.20. | |
// Copyright © 2020 Felix Mau. All rights reserved. | |
// | |
import PlaygroundSupport | |
import Combine |
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
// | |
// Font+Formatting.swift | |
// | |
// Created by Felix Mau on 12.11.20. | |
// Copyright © 2020 Felix Mau. All rights reserved. | |
// | |
import Foundation | |
import SwiftUI |
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 Dictionary { | |
/// Combine two dictionaries of same type with `+` operator. | |
/// | |
/// - Important: When `left` and `right` are having a same key, the value from `right` will override | |
/// the value from `left`. E.g. | |
/// ``` | |
/// var left = ["a": 1, "b": 2] | |
/// let right = ["a": 3, "c": 4] | |
/// left += right | |
/// print(left) |
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
// | |
// Dictionary+MapKeys.swift | |
// | |
// Created by Felix Mau on 14.06.21. | |
// Copyright © 2021 Felix Mau. All rights reserved. | |
// | |
extension Dictionary { | |
/// Returns a new dictionary containing the keys transformed by the given closure. | |
/// The values of this dictionary stay the same. |
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
// | |
// ColoredToggleStyle.swift | |
// | |
// Created by Felix Mau on 29.03.2021. | |
// Copyright © 2021 Felix Mau. All rights reserved. | |
// | |
/// A fully configurable toggle style. | |
struct ColoredToggleStyle: ToggleStyle { |
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
// | |
// CombinePublishedVsCurrentValueSubject.playground | |
// | |
// Created by Felix Mau on 09.02.21. | |
// Copyright © 2021 Felix Mau. All rights reserved. | |
// | |
import Foundation | |
import Combine |
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
// | |
// PDFBase64ToImageViewController.swift | |
// | |
// Created by Felix Mau on 20.04.21. | |
// Copyright © 2021 Felix Mau. All rights reserved. | |
// | |
import PlaygroundSupport | |
import UIKit | |
import PDFKit |
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
public extension UIColor { | |
/// Create color from RGB(A) | |
/// | |
/// Parameters: | |
/// - absoluteRed: Red value (between 0 - 255) | |
/// - green: Green value (between 0 - 255) | |
/// - blue: Blue value (between 0 - 255) | |
/// - alpha: Blue value (between 0 - 255) | |
/// |
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 XCTest | |
class NotificationTestCase: XCTestCase { | |
func testTriggerNotification() { | |
expectation(forNotification: .fooBar, | |
object: nil, | |
handler: nil) | |
let notificationCenter = NotificationCenter.default |