The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!
This file contains hidden or 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 SwiftUI | |
public struct UnwrapView<Some: View, None: View>: View { | |
private let some: () -> Some? | |
private let none: () -> None? | |
public init<Value>(value: Value?, | |
some: @escaping (Value) -> Some, |
This file contains hidden or 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
// | |
// ContentView.swift | |
// ExtendedScrolView | |
// | |
// Created by Marc Palmer on 05/03/2020. | |
// Copyright © 2020 Montana Floss Co. Ltd. All rights reserved. | |
// | |
import SwiftUI |
This file contains hidden or 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 SwiftUI | |
import UIKit | |
enum ScalableFont { | |
case system(size: CGFloat, weight: Font.Weight = .regular, design: Font.Design = .default) | |
case custom(_ name: String, size: CGFloat) | |
var size: CGFloat { |
OlderNewer