swift Questions

1

I have been building a macOS app with SwiftUI and Xcode. At some point I started facing a crash with following error: The window has been marked as needing another Update Constraints in Window pas...
Gotha asked 25/10 at 13:10

1

From my App Clip, I want to use a third-party / trusted app for authentication, this will lead the user to switch from App Clip to a third-party app where the user will authenticate himself and the...
Leathaleather asked 24/5, 2021 at 10:45

1

I'm new to Swift and trying to append a string to a text file in iOS app. string.write is simple enough, but will overwrite the existing info. write(toFile: atomically:encoding:) also overwrites ex...
Dumfries asked 13/1, 2021 at 17:41

1

I am trying to create a chat app using SwiftUI and Firebase. My current approach involves using chatrooms documents and within each chatroom have a subcollection of messages. Therefore, I am using ...

5

Solved

I am struggling with the locilization of some of my TextFields. Usually a "normal" localization of a Text() or TextField() works without any problem in my App if the text I want to translate is har...
Alimentary asked 8/5, 2020 at 16:53

5

can anyone tell how to make Responsive UI in Swift UI, which is compatible on all Device , and using figma Text like 24 then it shows iphone 8 and iphone 11 same view
Walls asked 22/7, 2022 at 6:33

2

How do I pass a Binding via the new .navigationDestination(for: , destination: )? import SwiftUI enum TestEnum: String, Hashable, CaseIterable { case first, second, third } struct ContentView: V...

5

Solved

I'm trying to reproduce a "Instagram" like tabBar which has a "Utility" button in the middle which doesn't necessarily belong to the tabBar eco system. I have attached this gif to show the behavi...
Pilkington asked 25/2, 2020 at 12:2

1

I tried to create a custom SwiftUI menu (based on UIMenu). However, I'm unable to trigger the primary action. It works when I tap on the CustomMenu but the programmatic action is not triggered. Wha...
Elsyelton asked 13/1, 2021 at 12:11

6

Solved

I already have an iOS 17 App Intent that works with a URL: @available(iOS 16, *) struct MyAppIntent: AppIntent { static let title : LocalizedStringResource = "My App Inent" static let o...
Lith asked 6/7 at 22:22

3

Solved

I am trying to change the map type using a segmented control button, I wish for it to change the type of the map with 3 options: Standard, Satellite and Hybrid. So far I have this code but nothing ...
Florida asked 18/10, 2015 at 16:13

1

I'm trying to add buttons to my immersive view. The buttons have been added perfectly, but when I click on them, nothing happens. The click event is not being recognized at all. Here's my implement...
Mitrailleuse asked 30/9 at 3:36

2

After upgrading my project to iOS 18, I’ve encountered an issue where the UITabBarController no longer displays the tab bar items or icons properly. The same code has been working flawlessly across...
Evidence asked 10/9 at 16:29

4

Solved

I have users uploading images from their mobile device and these images can be either are portrait or landscape. I have these images tiled similar to Instagram posts. The biggest problem I'm having...
Commissary asked 17/8, 2020 at 22:20

2

I recently upgraded from Xcode 15.1 to Xcode 16 and now encountering the following error during build: This error seems related to the ADClient class, which is part of the iAd framework that I use...
Christmann asked 17/9 at 12:3

4

I'm just starting up with RealmSwift, and I'm trying to store an array of Strings in Realm. It doesn't work, so now I'm using List<String>() as an alternative. However, how do I convert these...
Gerstein asked 6/6, 2019 at 23:26

3

Solved

I am using the Swift Package Manager, with Swift 5.7.1. I would like to compile code with a regex literal. For example, main.swift could be as follows: let message = "Hello, world" print(...
Jitterbug asked 26/2, 2023 at 17:7

5

Solved

I am building a macOS-app using SwiftUI and the new App lifecycle. I would love to change the contents of the “About Window” (that appears when you tap “About DemoApp” in the apps’ menu) but have n...
Pulpboard asked 31/10, 2020 at 16:55

4

I have a circumstance in my app whereby a label may be given a font size greater than it's height. This is to do with some rather complex architecture and layout code. Normally I would increase the...
Gramme asked 18/10, 2017 at 8:43

6

Solved

Update The accepted answer did not directly answer the original question, but helped resolve the underlying issue I tried to solve: I wanted to map an AsyncStream (which is an AsyncSequence) into a...
Tager asked 20/8, 2022 at 9:58

2

UIDevice.current.name it's worked if used iOS15, but when I tested on iOS16 (beta3) still return 'iPad' name all the time. See related WWDC 2022 video file https://developer.apple.com/videos/play/...
Chuck asked 14/7, 2022 at 15:46

4

Solved

I have defined import SwiftUI import UniformTypeIdentifiers enum LayerType: String, Codable, RawRepresentable { case text case image } struct TransferableLayer: Identifiable, Hashable, Codable,...
Autotomy asked 15/12, 2023 at 23:0

2

Solved

I created UISearchBar programmatically as below and the button appears to be of second image.How to clear the white color of search bar and set background colour to Black var categorySearchBar : U...
Kitchen asked 26/3, 2015 at 8:40

5

Im working on an iOS project, which shows the customer number in a barcode. I had installed the framework ZXingObjC with CocoaPods, described in GitHub. I can compile my Project without errors. I ...
Pimento asked 3/6, 2015 at 8:47

4

I am attempting to integrate SwiftUI into my project, and I am currently using a storyboard which is launched via my app delegate with the following code: _rootNavigiationController = [[UINavigati...
Korenblat asked 29/8, 2020 at 23:35

© 2022 - 2024 — McMap. All rights reserved.