Category "swift"

How do I Set Unselected Tab Bar Item Color using Swift in Xcode with an iOS 15+ Device?

I'm trying to customize a UITabBar using Swift in Xcode, however I can't figure our how to set the color of the unselected items using the menu on the right sid

Alamofire: How to conditionally change cache policy based on network status?

The end result I would like to achieve is to use cached data when the network is unavailable and load data from the server when the network is available. The cl

Simple function for a customised label

I'm trying to write a most basic function that will set the parameters of a label. First I set the position where I want to put a label: var xCircularPos = UISc

Disable drag to select on PHPickerViewController in iOS app

I am using a PHPickerViewController in an iOS app. I want the user to be able to select multiple media, however I am noticing that it is easily to inadvertently

The data couldn’t be read because it isn’t in the correct format error

Hi guys I am trying get request when my model class like first I can get data but with second model I can get this error message "The data couldn’t be re

When observed object data changes, UI temporarily is empty

Whenever ONE conversation row changes, all of them are updated and it becomes empty for a split second. Why? https://gyazo.com/a81d437fd92e236389acdd211ff83ad3

Universal Links redirection to specific view

I'm having a hard time understanding how universal Link works. First I have tried redirection to a specific UIViewController (Universal link works as it redirec

Color cycle not cycling through all colors in swift

Can somebody help me please. I created a color cycle but it's only cycling through yellow and orange (the last 2 colors), instead of all of them. I attached a p

/usr/include/GNUstepBase/GSVersionMacros.h:359:16: fatal error: 'objc/blocks_runtime.h' file not found

I am trying to build a objective-c library integrated to a swift project on linux. I have this Package.swift for my main project: // swift-tools-version:5.5 //

Loading docx file into NSAttributesString not showing images (MacOS Swift)

I am loading docx data into an NSAttributedString, and then rendering it into an NSTextView. It mostly works, but it does not load the images, I checked the att

Reverse Array Queries

For a given array of integers, perform operations on the array. Return the resulting array after all operations have been applied in the order given. Each opera

Custom UIButton -> part of title disappears after click

I created custom button subclassing UIButton. I set custom font for titleLabel. After tapping on custom button, the part of title disappears. Without setting cu

SwiftUI, apply drawGesture only when over Image

I'm try to apply the gesture only when the user is over the Image display not when tapped outside the image. Any suggestion how I can do? this following code dr

Data not updated in TableView after searchBarSearchButtonClicked

I have the following code to search a database for recipes then return that data to my View Controller: var discoveredRecipe: RecipeDiscovered? = nil func sear

how to analyse crash report

i need to collect crash reports, but i don't understand them. For testing purposes i make the app crash with just these 2 lines in a viewDidLoad(): var test:Str

how to analyse crash report

i need to collect crash reports, but i don't understand them. For testing purposes i make the app crash with just these 2 lines in a viewDidLoad(): var test:Str

Adding attribute to markdown NSAttributedString goes out of bounds

I have user input which can contain markdown or not. I want to show the user input on screen with rendered markdown. For some reason, I want to add my own stati

How to navigate between NavigationLink while leave a part of main window stay the same in SwiftUI

I would like to navigate between different NavigationLinks in NavigationView while some part of the main window stay the same. For example, I want to make a mus

How to navigate between NavigationLink while leave a part of main window stay the same in SwiftUI

I would like to navigate between different NavigationLinks in NavigationView while some part of the main window stay the same. For example, I want to make a mus

async/await, Task and [weak self]

Okay so we all know that in traditional concurrency in Swift, if you are performing (for example) a network request inside a class, and in the completion of tha