Category "swift"

How to use Button SwiftUI correctly?

There is a code that, by pressing the "Sign Up" button at the bottom of the screen, should open another window. But for some reason, when you click on the butto

WkWebview inside uiScrollview

I was wondering if you can help me please. I have a wkWebview that has horizontal paging content. Outside of that I have a scroll view that also has horizontal

SwiftUI: trigger redraw when NSManagedObject (not part of fetch request) bool property changes?

I have the following @SectionedFetchRequest installed on my SwiftUI view: @SectionedFetchRequest(entity: Car.entity(), sectionIdentifier:

How To Cycle Through Images on Button Click

So I have spent an embarrassing amount of time on this and I come to ask you to save my sanity. I am building an app to conduct evaluations on my blind and visu

Library not found for -lDJIWidget

I am attempting to run the sample developer dji application for the iOS platform via Xcode version 13.2.1. Upon building the application for the ObjectiveC and

One working ScrollView example and one refusing example

This is a working example of a ScrollView: var body: some View { ScrollViewReader { proxy in VStack { Button("Warp to line 10 o

How to get the size of the new swift AttributedString?

NSAttributedString has a size() method which the new AttributedString lacks. How do you get the size of the new AttributedString?

Error code -1009 and "Operation not supported by device" when using URL(...) on watchOS

Let's say I have the following code: guard let URLData = URL(string: "https://www.bing.com") else { print("Unable to access \(URLString)") return } Whe

Why can't I create an "In-App Purchase Content" target in XCode?

I am adding an in-app purchase to my iOS application that unlocks a feature to render images at a higher resolution. To achieve this, I would like to leverage A

Case Insensitive Compare with Magical Record library(Core Data) and Swift

Is it possible to add sortDescriptor in MagicalRecord request to get case insensitive sorting

continuous center of user with Mapkit

Good afternoon, I am having trouble displaying a map where it only centers around the user and will stay on the user with movement. My error is in my view file

continuous center of user with Mapkit

Good afternoon, I am having trouble displaying a map where it only centers around the user and will stay on the user with movement. My error is in my view file

Xcode failed to log metrics boringssl

I'm building a simple Xcode project to help me calculate taxes. I'm requesting an xml url but getting the error: [boringssl] boringssl_metrics_log_metric_block

UITextView contentSize is not update after paste swift iOS

When I paste some text, textview height of contentSize is not correct. It returns text height before paste. For example, I expect height value : [contentSize He

Injecting a single dependency to a view model

I want the LoginViewModel to have a single dependency of LoginViewModelService. 
LoginViewModelService in itself cannot have an implementation. Its method

Caret position in NSTextField of NSTableView

I have a view based NSTableView of n rows and 1 column, with a monospaced font. When the user clicks within a row, I need to convert the caret position to a cha

AVPlayerViewController audio continues playing in background after dismissal

My goal is to: Record a video Show it in a view and play it on a loop Dismiss it from the view Repeat with a new video Problem: Steps 1-3 work. However, the aud

Xcode program: Text box that the user can interact with through touch

I am new to Xcode and Swift. I want to create a text box for a video game that acts as the dialogue between the game and the user. for example I want the text b

iOS TextView is saved blurry when scaled

I tried save textview as image with not device scale. I implemented a method to save an image by adding an arbitrary textview according to the UI value. Because

Disable dark mode on iOS app while still being able to get prefers-color-scheme from WKWebView

I'm using the newest version on Xcode for my iOS app. I don't want iOS to automatically change the colors in my app when device is in dark mode, because it does