Xcode 11 Won’t Open New Editor Pane

Ok, this is embarrassing. I was in a ‘focus’ mode and could only add editors after I had ‘hidden focus’. There are a few ways to do this: View > Editor > Hide Focus Tap the ‘arrows pointing at each other’ icon in the top left of the editor toolbar ^⇧⌘↩︎ ps. I was seriously … Read more

Add a border with cornerRadius to an Image in SwiftUI Xcode beta 5

SwiftUI 1.0 Using cornerRadius & overlay Modifiers Here is another way in which we can use a cornerRadius modifier (which clips the view) and then overlay a stroke with a color. VStack(spacing: 40) { Text(“Image Border”).font(.largeTitle) Text(“Using cornerRadius & overlay”).font(.title).foregroundColor(.gray) Text(“Using cornerRadius will also clip the image. Then overlay a border.”) .frame(minWidth: 0, maxWidth: .infinity) … Read more

How to fix “Read-Write-Data Sandbox: error when using Mac Catalyst

MasterChief96, you are not alone. Here is my setup: MacOS 10.15.3 Xcode 11.4.1 I create a brand new SwiftUI “Hello World” project, enable Mac as a target device, a.k.a. Catalyst. I set the iOS deployment target to 13.2 (otherwise I get a MacOS runtime error saying I need Catalina 10.15.4) Set the scheme to “My … Read more

addSubview SwiftUI View to UIKit UIView in Swift

Step 1: Create instances of UIHostingController by using SwiftUI View struct ContentView : View { var body: some View { VStack { Text(“Test”) Text(“Test2”) } } } var child = UIHostingController(rootView: ContentView()) Step 2: Add instance of UIHostingController as a child view controller to Any UIKit ViewController var parent = UIViewController() child.view.translatesAutoresizingMaskIntoConstraints = false child.view.frame … Read more

Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1 compiler

This problem is caused by the fact that you attempt to embed a pre-compiled framework that was created with a different compiler version. Currently, pre-compiled frameworks can only be embedded if the compiler versions match! The swift compiler version that is used to compile the project must be the same version that was used to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)