Xcode 4 – clang error

Apparently, you’ve set custom compiler flags for the include paths. Go to your target’s build settings and check this option: Other C flags If you have something in it, you may replace it by the -iquote version. Otherwise, still in the build settings, check the value of the following options: Header Search Paths User Header … Read more

SwiftUI TabView PageTabViewStyle prevent changing tab?

The solution from mentioned reference works, just the swipe is blocked not by gesture(nil), but by gesture(DragGesture()). And view should be full-tab-content-view-wide, like TabView { ForEach(0..<5) { idx in Text(“Cell: \(idx)”) .frame(maxWidth: .infinity, maxHeight: .infinity) .contentShape(Rectangle()) .gesture(DragGesture()) // this blocks swipe } } .tabViewStyle(PageTabViewStyle()) Tested with Xcode 12.1 / iOS 14.1 * and, of course, … Read more

How do I do weak linking in Swift?

Seems like I’ve figured out what you can do I used NSClassFromString() to check if class is available on device, i.e. if NSClassFromString(“UIBlurEffect”) { let blur = UIBlurEffect(…) //… } else { //… } It’s needed to make UIKit.framework (or another corresponding framework) optional. If you create Swift-based application in XCode6-BetaX, all the frameworks wouldn’t … Read more