Install Package Control for easy package management.
- Open the console with
Ctrl+`
- Paste in the following:
Install Package Control for easy package management.
Ctrl+`
A guide for using the Google Testing Framework with Xcode 5 on Mac OS X
// save current buffer | |
streambuf* coutBak = cout.rdbuf(); | |
// setup temp stream | |
stringstream coutBuf; | |
// redirect to temp | |
cout.rdbuf(coutBuf.rdbuf()); | |
// test against contents of coutBuf.str() |
To remove a submodule you need to:
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<!-- All Exceptions --> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
<BreakpointContent |
import UIKit | |
#if canImport(SwiftUI) && DEBUG | |
import SwiftUI | |
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable { | |
let viewController: ViewController | |
init(_ builder: @escaping () -> ViewController) { | |
viewController = builder() | |
} |
(extension in :Animatable< where A.AnimatableData == EmptyAnimatableData>.animatableData.getter : EmptyAnimatableData | |
(extension in :Animatable< where A.AnimatableData == EmptyAnimatableData>.animatableData.modify : EmptyAnimatableData | |
(extension in :Animatable< where A.AnimatableData == EmptyAnimatableData>.animatableData.setter : EmptyAnimatableData | |
(extension in :Animatable< where A: VectorArithmetic>.animatableData.getter : A | |
(extension in :Animatable< where A: VectorArithmetic>.animatableData.modify : A | |
(extension in :Animatable< where A: VectorArithmetic>.animatableData.setter : A | |
(extension in :Button< where A == PrimitiveButtonStyleConfiguration.Label>.init(PrimitiveButtonStyleConfiguration) -> Button<PrimitiveButtonStyleConfiguration.Label> | |
(extension in :Button< where A == Text>.init(_: LocalizedStringKey, action: () -> ()) -> Button<Text> | |
(extension in :Button< where A == Text>.init<A where A1: StringProtocol>(_: A1, action: () -> ()) -> Button<Text> | |
(extension in :CoreGraphics.CGFloat.magnitudeSqu |
import SwiftSyntax | |
import SwiftSemantics | |
import Foundation | |
let source = try! String(contentsOf: URL(fileURLWithPath: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/arm64e.swiftinterface")) | |
var collector = DeclarationCollector() | |
let tree = try SyntaxParser.parse(source: source) | |
tree.walk(&collector) |
// Author: SwiftUI-Lab (swiftui-lab.com) | |
// Description: Implementation of the showSizes() debugging modifier | |
// blog article: https://swiftui-lab.com/layout-protocol-part-2 | |
import SwiftUI | |
struct MeasureExample: View { | |
var body: some View { | |
VStack { |
import Foundation | |
// Here's a pretty typical scenario where you want to encode a polymorphic type - | |
// in this case a Shape type that can be either a Square or Circle. Swift provides | |
// a nice pattern for doing this in a type-safe way using enums: | |
struct Circle: Codable { | |
var radius: Int | |
} |