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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

CoreData and Swift: how can I get the objects in a relation with another object?

I have an entity called train_list and another called word. They have a one-to-many relation, so I can have many words in the same list. I've gotten one train_list and I want to get the words that I ...
user avatar
0 votes
0 answers
5 views

Are the 'unnamed' struct instances in this Swift data structure going to create unanticipated problems?

This code produces struct instances without a specified name (but which get identified with an '--lldb_expr_#' label). I can't anticipate any specific logistical problems associated with the structs ...
user avatar
0 votes
0 answers
11 views

ios - Failed to upload video from swift to server

I wrote the code through this question Uploading video using URL swift Alamofire I want to upload a video to the server, but an error occurs Where do you have a problem? This is my swift code. This is ...
user avatar
  • 9
0 votes
0 answers
5 views

how to use Gridfs mongodb in Swift

I am trying to store video using Gridfs in Mongodb from Xcode but I can not find any document for Swift.
user avatar
0 votes
0 answers
8 views

How can I redraw view in iOS similar to InvalidateRect in window?

Custom made override func draw with setNeedsDisplay is executed n times with successful redrawing by executing from pressing button n times. If I replace override func draw with setNeedsDisplay by ...
user avatar
-1 votes
0 answers
5 views

Integrate FB Messenger with Swift 5 (iOS)

I'm trying to integrate FB Messenger with Swift. I already have Facebook Login integrated and that seems to work. Specifically, I want to get the overview of a conversation (like the last message ...
user avatar
0 votes
0 answers
9 views

Swift: Unit testing delegate methods with 3rd party class as an argument

I know how to unit test with 3rd party dependencies by extending the class with your own protocol so that you can inject a mock dependency that implements that same protocol. But this only seems to ...
user avatar
1 vote
0 answers
12 views

Has anyone been able to override/block the new iPadOS 15 behavior of rotating iPhone apps in landscape?

The new behavior Ideally we'd have native iPad support, but that's a ways off and not feasible at the moment. So for now we have to work with iPad running the iPhone app. Hybrid Swift and Objective-C ...
user avatar
-1 votes
0 answers
14 views

what will be the best way to implement this view in swift with a xib not programatically?

this is the view i want to make with shadow included
user avatar
0 votes
0 answers
13 views

NSView Resize Indicator at Corner

I am using below code to resize (from corners) and drag view inside superview. Resizing works fine from corner. But I also want to add images at corner as resizing indicator and my code fails here as ...
user avatar
0 votes
0 answers
16 views

Update a specific item stored with CoreData

Please excuse me if I'm using the wrong nomenclature of things, but this is the first time I'm using CoreData. I'm editing text in one of the items stored using CoreData. The way it works on the app ...
user avatar
  • 145
0 votes
0 answers
14 views

@State with a @Appstorage property does not update a SwiftUI View

I organized some settings to be stored in UserDefauls in a struct like this, because I want to have them in one place and to have getters and Setters. enum PrefKeys : String { case KEY1 case KEY2 ...
user avatar
  • 3,298
0 votes
1 answer
23 views

swiftui generate barcode not produce image

I'm trying to generate a barcode in swiftui I have try in two ways but always the same result below the code first way with this function func generateBarcode(from string: String) -> UIImage { ...
user avatar
0 votes
0 answers
5 views

SwiftUI: UIPickerView row description with UIViewRepresentable

I implemented a UIPickerView in SwiftUI using UIViewRepresentable with following code: struct DurationPickerView: UIViewRepresentable { func makeUIView(context: Context) -> UIPickerView { ...
user avatar
0 votes
0 answers
16 views

Can't add constraint to method

I'm trying to create a publisher for CoreData changes. I've implemented Publisher protocol and I was required to implement NSFetchedResultsControllerDelegate in same type (not in extension). Next, I ...
user avatar
  • 49

15 30 50 per page
1
2 3 4 5
20832