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.

0 votes
0 answers
4 views

How to update and compare new data user entered to previous SwiftUI

I have a list of devices with radio buttons which is filled when user chooses special cell. When I click again to change mind - I have 2 active radio buttons and cannot delete previous one. Do you ...
user avatar
0 votes
0 answers
13 views

Swift - Cannot convert value of type 'Any?' to expected argument type 'String'

if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] { if let nickn = json["nickname"] as? String { if(nickname != nickn){ ...
user avatar
0 votes
0 answers
10 views

How does scope work for nested structs in Swift?

I am confused and it's best described by an example. let name = "My Name is John Appleseed.." struct FirstStruct { static let name = "My Name is Jeff.." static func ...
user avatar
  • 15.1k
0 votes
0 answers
9 views

How to properly uninstall AdMob from iOS app

I have uninstalled the AdMob SDK by commenting out the lines in the Podfile. Then I run pod update. The AdMob SDK and the utilities are removed. However, I get framework not found FBLPromises error. I ...
user avatar
0 votes
0 answers
19 views

Mutable Binding.constant()?

I'm using a secondary init to pass a different set of values into my struct. The issue with this is that values is a generic binding but I need to format the Binding values before setting it. public ...
user avatar
  • 9,722
0 votes
0 answers
17 views

Flutter plugin - MethodChannel: .invokeMethod() from native iOS to Flutter never reaches Flutter part

I'm having an issue with Flutter plugin development, especially with invoking MethodChannel from native iOS side to trigger Flutter plugin code. On Android, identical (in terms of logic) code ...
user avatar
  • 563
0 votes
0 answers
9 views

How to display all pictures from firebase folder with good animation swift

So I have a folders of images in firebase and all the folders have a name, when in viewcontriller I press the button with specific name I need to receive images from the folder with same name. I have ...
user avatar
0 votes
1 answer
20 views

Unable to display thumbnails in UICollectionView

I am trying to recreate this thing. I've created in Storyboard skeleton. Here's the idea of my code: Fetch images from URL's array with help of the function getThumbnailFromImage Add UIImage's with ...
user avatar
0 votes
1 answer
29 views

How can I access to didSet of a Type in general use case in Swift?

I am working on a custom type called UIL stand for Unique Identifiable Label, here is my code: struct UIL: Equatable { init?(labelValue: String) { if checkLabelAvailability(for: ...
user avatar
  • 1,997
0 votes
0 answers
17 views

socket handle socket event log error xcode

I started getting these log errors in my swift project about a minute after it starts running. I'm wondering what they mean and what I can do to investigate removing them. [connection] ...
user avatar
-1 votes
1 answer
45 views

How to compare array before removing its items in SwiftUI?

How can i compare original items of an array before i remove them? I have an array of items that get removed every time they are showed and get added into the empty array... to avoid index out of ...
user avatar
0 votes
0 answers
16 views

how to save over a core data binary attribute

In my swift code my goal is to save this image to the attribute img. The problem is that instead of overwriting the previous image it just saves a new one. The saved image should always stay in slot 1 ...
user avatar
1 vote
1 answer
19 views

View shifts downward upon navigation link in Swift

I am having a weird issue when I try to navigate back and forth between different views. On WelcomePage, when the user clicks sign in, they are directed to HomePage. HomePage has a navigation bar. ...
user avatar
  • 13
0 votes
0 answers
17 views

Xcode 13.4.1 Command CodeSign failed with a nonzero exit code

I've tried to follow all the examples I've found both here on stackoverflow and on the Apple Developer Forums, but can't find a solution that works. Maybe I'm doing something wrong. Anyone who has had ...
user avatar
  • 2,728
0 votes
0 answers
13 views

CollectionViewCell's preferredLayoutAttributesFitting vs CollectionView( sizeForItemAt)

I am currently working on a repo where they are implementing both collectionView(sizeForItemAt: ) and override the custom collectionViewCell preferredLayoutAttributesFitting(). My question is, which ...
user avatar

15 30 50 per page
1
2 3 4 5
21165