Category "swift"

Swift 3: How to add watermark on video ? AVVideoCompositionCoreAnimationTool iOS 10 issue

This code used to work on iOS9 to add a watermark and text to a video but since iOS10 it's not working anymore. There is a iOS 10 bug that has been filed but no

SwiftUI DatePicker breaks sheet dismiss?

Scenario: RootScreen presents DateScreen modally though .sheet DateScreen has a DatePicker with CompactDatePickerStyle() and a button to dismiss the modal User

How to use camera in background in iOS

I need to use the camera in background mode for continuous taking images.but as per apple documentation, we could not use the camera in background mode. Is ther

unable to align multiple controls in SwiftUI

I'm trying to align controls as shown in "Storyboard" pic using the SwiftUI but not sure why still there is distance between segment control and search-Bar, and

How do you cluster annotations with v10 of the MapBox iOS SDK?

How is clustering done with v10 of the Mapbox iOS SDK? And can I use ViewAnnotations to show custom views for clusters? In short, I am trying to cluster annotat

Swipe to delete function

using my code below how can I swipe right to left on a Task to have an option to be able to delete it. I have tried using .SwipeAction but have gotten no luck w

SwiftUI - how to avoid navigation hardcoded into the view?

I try to do the architecture for a bigger, production ready SwiftUI App. I am running all the time into the same problem which points to a major design flaw in

How to apply a context menu to buttons in a SwiftUI list row?

When I'm long-pressing on a button in list row, all of context menus for all buttons are shown. It looks like the whole list row is selected. How can I make it

iOS name of UI menu in Apple Maps

I'm wondering what's the name of the draggable menu at the bottom of the iOS map. (See picture :) I want to implement the same kind of interface for my app.

Swift - Getting only AlphaNumeric Characters from String

I'm trying to create an internal function for the String class to get only AlphaNumeric characters and return a string. I'm running into a few errors with how t

Unable to mutate user attributes using iOS Cognito UserPool SDK after signup

I am trying to change a user's attribute (i.e family name) after they have signed up. This is an attribute that has been selected in the cognito user pool and w

SwiftUI: Display file url from Array after user Picks file using DocumentPicker

I followed a tutorial on getting Url from a Document a user chooses and be able to display it on the View. My problem now is I want to add those Url's into an a

SwiftUI MVVM Coordinator/Router/NavigationLink

I am having problems to translate UIKit architecture patterns to SwiftUI. My current pattern is mostly MVVM with Coordinators/Routers. The MVVM part seems quite

Swift Package Manager could not be resolved all libraries, project

This error always happens whenever I add a new Package via Swift Package Manager in Xcode: Cannot fetch library I've already configured my GitHub Auth Token

Manually set light/dark mode in SwiftUI and save users choice

I found a solution to manually set light/dark mode in a swiftui app in another thread found here https://stackoverflow.com/a/58476468/11698443 it mostly works,

How to enable pasting with keyboard shortcut into SwiftUI macOS agent application

I'm creating an app with Swift 5 and SwiftUI. The application runs as a status bar app (LSUIElement is true). I've created a simple preferences window with Swif

How to multiply two arrays element-wise

I need to multiply an array by another array element-wise, just like the Hadamard product of vectors in math. For example: A = [1,2,3,4] B = [2,3,4,5] C = A*B

TableView scrolling to top after applying UITableViewDiffableDataSource snapshot

I'm doing pagination using UITableViewDataSourcePrefetching. The values will be taken from the Realm local storage. I will get an array of objects. These values

ARKit/RealityKit – People Occlusion config not working

For some reason I can't get people occlusion to work, even though I looked at someone's question on Stackoverflow. Here is my code: //Load ARView let arView =

iOS ShareContext tapping on Suggestion Intent property of extensionContext is nil

I have a ShareExtension in my iOS app. I am trying to use Suggestions. I can successfully 'donate' the intent using the following code from the apple develope