Category "swift"

when i scroll down viewController shaking

Hello guys ,I have problem when i try scrolling down my viewcontroller shaking ,i couldn't find error.In other view controller haven't errors like this... How

Cleanest way to wrap array index?

Say I have an array of 5 Ints. What would be the most efficient way to wrap the index of the array if the index were incremented or decremented (for example) th

Issues while switching cameras during recording with AVFoundation

I am building a camera application similar to snapchat, and I need to be able to switch cameras while recording. I am able to switch cameras while NOT recording

CollectionView Disappears within StackView (Swift)

I'm trying to achieve the stackView arrangement shown in the middle of this figure:, but for some reason the top stack, containing a collectionView, disappears

How do I programmatically set secure text field and normal text field in swiftUI

SwiftUI has two different forms of text fields, one is SecureField which hides input and TextField which doesn't hide input. Instead of creating two separate vi

Open a FileDialog in SwiftUI on MacOs

In a SwiftUI app on MacOS I want to allow a users to select a file from the MacOS filesystem. I try to use AppKits NSOpenPanel . I tried like this, but I'm not

Arrange SCNNodes in Circle

I'm creating multiple nodes automatically and I want to arrange them around me, because at the moment I'm just increasing of 0.1 the current X location. capsu

iOS AppDelegate.m: Handling openUrl RCTLinkingManager and Twitter - Duplicate declaration of method 'application:openURL:options:'

I need to add DeepLinking to my React Native app, and as mentioned in docs I need to add the method above @and. // Add this above `@end`: - (BOOL)application:(U

Run code during app launch in SwiftUI 2.0

In my App struct, I have a small function that checks to see if the user has opened the app before. If not, it shows an onboarding view with a few questions. Ri

Unable to activate because they have no common ancestor IBOutlet and code

I am trying to add a constraint to a tableview I created and added to view programatically. I want to constraint it based on a UITextField which is an IBOutlet.

OUTDATED: Updating a UILabel to display current location

TLDR; I want to get locations outside the main thread using a different function but I am receiving delays. In details: I'm performing a GET request. later on I

Firebase/Firestore - database has insecure rules?

I have a SwiftUI application, which uses Firebase as a back end, and my rules are something like this: rules_version = '2'; service cloud.firestore { match /d

Xcode: Own Swift packages missing in Schema selector

I have some SPM swift packages as part of my swift project. After some Xcode crashes, those packages don't appear in the Schema selector (black arrow in image)

How to access NSWindow from @main App using only SwiftUI?

At this answer the solution work for Scene plus swiftUI. However using @main like: @main struct MyApp: App { @StateObject private var model = MyModel()

How to fix problem with opening ViewController by action from Coordinator in Swift?

I'm trying to open another controller by tapping on the cell of my tableView. I'm coding with MVVM and Coordinator pattern. In the beginning we see this screen

iOS 13 Status bar style invalid (childForStatusBarStyle never called)

I've been searching a lot, but didn't find the same problem as my on StackOverflow or anywhere else. Setup Info.plist ViewControllerBasedStatusBar set to YES St

automatic delete token in userdefaults after 6 hours in swiftui

I have two apis Login DataShow when i login server gives me token which remains valid for only 6 hours and i am saving it in userdefaults, so that user will not

How to check if IndexPath is valid?

Prior to swift 3, i used to use for example: let path = self.tableView.indexPathForSelectedRow if (path != NSNotFound) { //do something } But now, since i u

Swift, Get action Bar Button Action from Container

I have ParentViewController.swift and ChildContainer.swift. In ParentViewController, I have bar button item action like below : @IBAction func onClickBarItemRef

How to make UIScrollView inside a UIScrollView act simultaneously

I'm using a UIScrollView (UIScrollView_1) with paging enabled to move between 3 pages horizontally. On the last page there is multiple UIScrollViews (each one i