Category "swift"

Expandable forms with UITableView?

I haave to implement 3 seperate forms, but they have headers which make the forms collapsible when clicked. When searching online I saw the expanding rows for U

Detect userEvent/pan/scroll on orthogonal sections in UICollectionViewCompositionalLayout

I am using autoScroll on an orthogonal section of the collectionView using compositional layout. I need to invalidate the autoscroll timer as soon as the user m

Refreshing auth token with Moya

I'm using Moya to communicate with my API. For many of my endpoints, I require that the user be authenticated (i.e. a bearer token is based in the Authorization

Open UIDatePicker programmatically in iOS 14

I have this normal UIDatePicker (sorry that it's not in English, please ignore that): But the problem is that it only appears when I'm pressing the Date Picker

I am getting an error called "Argument passed to call that takes no arguments"

I am following the ios app development tutorial for the Scrumdinger app and I have followed the tutorial and it has worked until I finished the Passing Data wit

How can I convert a CMSampleBuffer with image data to a format suitable for sending over a network connection?

I want to send frames of a video stream over a network connection, so I have implemented the AVCaptureVideoDataOutputSampleBufferDelegate function: func captur

cornerRadius on message SwiftUI

I'm having this problem that my messages don't have corner radius on the other side. This is how it looks: And there is the code for it: HStack { HStack {

Is there expiration date attribute for Apple Identity Pinning?

I have pinned hash of public key on iOS app (like there). On Android there is option to set expiration time: <pin-set expiration="2022-05-22">

Xcode 11.5 Rename Refactor failed when trying to rename variable

When I try to re-name any variable, Xcode give me the following error: I have tried restarting Xcode but the same thing happens. Any ideas how to fix?

how can I edit lots of swift string at once?

In my project, I have Localizable.string file which is having more than 10,000 lines keyValue format. I need to convert all of keys which are dotCase format lik

Returning data from async call in Swift function

I have created a utility class in my Swift project that handles all the REST requests and responses. I have built a simple REST API so I can test my code. I hav

How to have a publisher emit only to the last subscriber in Combine

Is there a way to have the publisher emit a value only to the latest subscriber/observer? An example for that would be; a manager class that can be subscribed t

Change background color of TextEditor in SwiftUI

TextEditor seems to have a default white background. So the following is not working and it displayed as white instead of defined red: var body: some View {

How can I detect a server ping using URLSessionWebSocketTask?

Using URLSessionWebSocketTask, a server ping is automatically responded to by a pong from the client. Still, can the client observe that a ping/pong occurred? (

Is it possible to access multiple cameras from ARFrame?

I have an ARSession using a ARWorldTrackingConfiguration as part of its configuration. I've also enabled face tracking via: configuration.userFaceTrackingEnable

UIStepper - start counting from 1

I have successfully implemented core data and UISteppers. Every time I try to edit a saved record the UI Stepper starts over from 0. Please help me to figure pu

Swift - AES base64 + md5 decryption

I'm trying to decrypt a message sent from our server. Both our server and my Android client side uses the encryption code from here:https://gist.github.com/jafe

UITabBar containing SwiftUI View

I have the below series of controllers and views. However, when I use the navigation link on the MoreView it changes the tabBarItem.title value. For instance it

UICollection View "Reload Data" After Scrolling Crash

I have made a collection view with cells arranged in rows in columns using a great tutorial. I have added a button to a toolbar in the main view controller tha

SwiftUI set corner radius depending on its own height

When I set corner radius with constant value, depending on the size of the image, the results don't come out the way I want. Image(“myImage”) .c