- Proposal: SE-TBD
- Authors: Dave DeLong, Tim Vermeulen, Erica Sadun
- Review Manager: TBD
- Status: Implemented
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 PlaygroundSupport | |
import SwiftUI | |
struct LiveView: View { | |
@State var isPresented = false | |
var modalPresentation: some View { | |
NavigationView { | |
Text("Hello World") | |
.font(.caption) |
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 PlaygroundSupport | |
import SwiftUI | |
extension View { | |
public func offset(by offset: CGPoint) -> Self.Modified<_OffsetEffect> { | |
self.offset(x: offset.x, y: offset.y) | |
} | |
} | |
struct LiveView : View { |
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 PlaygroundSupport | |
import SwiftUI | |
struct MouseState { | |
var corded = 0 | |
var cordless = 0 | |
var magic = 0 | |
var total: Int { | |
return corded + cordless + magic | |
} |
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 PlaygroundSupport | |
import SwiftUI | |
struct MouseState { | |
var corded = 0 | |
var cordless = 0 | |
var magic = 0 | |
var total: Int { | |
return corded + cordless + magic | |
} |
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
//----------------------------------------------------------------------------- | |
// MARK: Time Test | |
//----------------------------------------------------------------------------- | |
import Foundation | |
/// Prints the elapsed time to execute a block under whatever optimization | |
/// conditions are currently in use by the compiler | |
public func timetest(_ note: String, block: () -> Void) { | |
print("Starting Test:", note) |
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
/// Unconditionally prints a given message and stops execution. | |
/// | |
/// - Parameters: | |
/// - reason: The string to print. | |
/// - function: The name of the calling function to print with `reason`. The | |
/// default is the calling scope where `fatalError(because:, function:, file:, line:)` | |
/// is called. | |
/// - file: The file name to print with `reason`. The default is the file |
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 Never { | |
/// A developer facing statement explaining how program correctness has failed. | |
public struct Reason: CustomStringConvertible { | |
public let description: String | |
public init(_ rationale: String) { | |
self.description = rationale | |
} | |
} | |
} |
- Proposal: SE-nnnnnnnn
- Authors: Erica Sadun, Nate Cook
- Review Manager: TBD
- Status: Awaiting implementation
- Proposal: SE-nnnn
- Authors: TBD
- Review Manager: TBD
- Status: Awaiting implementation