Skip to main content

Questions tagged [swift]

Swift is a general-purpose programming language developed by Apple Inc first released in 2014 for its platforms and Linux. Swift is open-source. Use the tag only for questions about language features or requiring code in Swift. Use the tags [ios], [ipados], [macos], [watch-os], [tvos], [swiftui], [cocoa-touch], and [cocoa] for (language-agnostic) questions about the platforms or frameworks.

swift
0 votes
0 answers
5 views

CapacitorJS: is it possible to share local data between iOS widget and Preferences API?

I am using a widget in my capacitor app (currently this question only focuses on iOS). I want to save an integer from my webview code into Preferences and then be able to read it from the iOS widget. ...
Felix Olszewski's user avatar
0 votes
0 answers
14 views

Unable to create file in specified directory because of security scope resource errors in iOS app

Goal: A user selects a folder in Files app where they would create files in that folder. This is an iOS app. This folder path is saved in the iOS app, using this app user would create file ...
user4150758's user avatar
0 votes
0 answers
28 views

Every time I call keyboard, keyboardWillShowNotification is called twice

I am using swiftUI. And I used NotificationCenter to move textfield when keyboard appears by using keyboardWillShowNotification and keyboardWillHideNotification. But every time I touch textfield and ...
rainbowfart's user avatar
-1 votes
1 answer
15 views

Unexpected Behaviour from PHPickerFilter in SwiftUI

I am trying to filter out live photos and videos however. This filter does not work: I am trying to filter out live photos and videos. However, I am getting some unexpected results. Doing the ...
David's user avatar
  • 1
0 votes
0 answers
23 views

How to change TurpleView<_VariadicView.Children> to Custom View?

Several Views were received as 'TurpleView<_VariadicView.Children>'. struct View1: View { var body: some View { VStack { Text("page!") } } } struct ...
OlderPeo's user avatar
-2 votes
0 answers
20 views

Strange icon on UItextField iOS Swift

Image I am getting a strange icon shown in the picture on top of the UITextField in iOS Swift. I would greatly appreciate any help. One more thing I am using UIFloatLabelTextField. Regards, There is ...
Bin yamin's user avatar
0 votes
0 answers
12 views

in UIKit, the UIButton is untappable (due to Swift UIKit constraints?)

This is the code in my custom cell: gb = UIButton() gb.setImage(UIImage(named: "skejt_zelena_polutka"), for: .normal) gb.addTarget(self, action: #selector(...
Vladimir Despotovic's user avatar
0 votes
1 answer
9 views

Swift UIKit ordering and positioning with constraints inside a custom table cell [duplicate]

I have a custom table cell, and all I want to do is insert two button images inside it. This is my code: gb = UIButton() gb.setImage(UIImage(named: "skejt_zelena_polutka"), for: .normal) gb....
Vladimir Despotovic's user avatar
-3 votes
1 answer
18 views

How to Structure a Firebase Database and Query Documents from District in Swift? [closed]

I am developing an app using SwiftUI and Swift. I have a Firebase database with the following structure: Collection named products, Documents representing countries, Subcollections representing ...
Ron Tabachnik's user avatar
0 votes
0 answers
19 views

Image recognition CoreMl + SwiftUi.... Issue with view

I'm experiencing an issue with my SwiftUI project that uses Firebase and a CoreML model for image recognition. Despite adding various debug print statements, the process doesn't proceed beyond the ...
user102623's user avatar
0 votes
1 answer
26 views

How to pad a button to fit its view in a SwiftUI form

I have a page in swift like below. import Foundation import SwiftUI struct SomeViewName: View { @State private var languages = [String]() var body: some View { NavigationView { ...
Metadata's user avatar
  • 2,105
1 vote
1 answer
26 views

Pass out an array of char* into Swift from C

To be clear I want to send my C function an array of null strings of fixed length like: ["\0\0\0\0\0\0", "\0\0\0\0\0\0", "\0\0\0\0\0\0"] expect the array to return ...
nilgirian's user avatar
-1 votes
0 answers
15 views

SWIFT: Operator sequence in function [duplicate]

I have a function that gets some data from API, but I can't find why it runs code lines in wrong order func addFriend(withEmail email: String, firstName: String, lastName: String) async throws { ...
AlexTank's user avatar
0 votes
1 answer
22 views

How to convert AdMob `GADFullScreenContentDelegate` to Swift 6 concurrency

This is a similar problem to How to convert `VNDocumentCameraViewControllerDelegate` to Swift 6 Concurrency but one warning is new, so this may require different solution. I have the following code: @...
OMGPOP's user avatar
  • 1,428
0 votes
1 answer
22 views

How do I do the equivalent of SELECT COUNT type of query in SwiftData on related data?

I have a model which is similar to: import Foundation import SwiftData import SwiftUI @Model final class AccountTransaction { var id: UUID = UUID() var name: String = "" var ...
Kenny Mann's user avatar

15 30 50 per page