Category "swift5"

Opacity Or Alpha issue - Different Look in screen and while export in Photos in swift

Hierarchy Of View ===> CTStickerView(UIView) -> RefenceView(UIView) -> LabelMakingView(UIView) -> StackView(UIView) Having a Multiple Labels When I

Function for Return Dictionary in swift 5

I'm working on the client Project. I've seen a function that helps to append two Parameter in a single object like this { "GroupType": "string", "Language": "

Unable to select files form UIDocumentPickerViewController Swift

I am working on UIDocumentPickerViewController() in swift. After opening the document picker the files and images look blur and I can't able to select anyone of

Text not updating when variable updates in SwiftUI (Swift 5, Xcode 13)

I have this variable, timeRemaining and when a button is pressed it should subtract one from timeRemaining. I want the Text to update whenever the user clicks t

self is not available in swift project

I am trying to run an image comparison in swift. However i am getting an error that states Cannot use instance member 'featureprintObservationForImage' within p

Xcode 13.3.1 showing Build input files cannot be found error after changing my device

I recently changed my device from iPhone 8 to an iPhone 13 mini and tried to run my app on it but xcode is failing and showing me Build input files cannot be fo

How to move a view/shape along a custom path with swiftUI?

There doesn't seem to be an intuitive way of moving a view/shape along a custom path, particularly a curvy path. I've found several libraries for UIKit that all

Not getting Razor pay Signature and Order ID in iOS

I have integrated the code of Razor pay, but after adding Order_id which I got from Web service Response, I am just getting Payment Id, but not getting Razor pa

Background Task to Fetch HealthKit Data

I am using iOS 13 where Background Task framework there. My Query is Can it will be possible to fetch HealthKit Data in Background Mode. Can i send these Healt

How to switch the statusBarStyle with the new syntax to remove deprecated warnings?

how am I supposed to change this piece of code? The current solutions for this problem either cover older iOS versions or are unanswered. This is the line: UIAp

Why Swift Tuples can be compared only when the number of elements is less than or equal to 6?

I read in HackingWithSwift that Swift tuples can be compared with == operator only when the number of elements is less than or equal to 6. What is the reason be

Cannot assign value of type 'UIImage??' to type 'UIImage?' Swift 5

Why does swift(Xcode) requires a "!!" double exclamation mark after using randomElement() to an UIImage array, it by itself gives me an error. Example: someVie

How can I make a background color with opacity on a Sheet view?

I'm currently developing an application using SwiftUI. I'm looking for some way to make a background color with opacity on a Sheet view. is there any way to do

Change UIScrollView's frame programatically (Swift 5)

How can I change the height of the frame based on the size of the subview programatically? scrollView.frame = CGRect(origin: scrollView.frame.origin, size: CGSi

Why there's no Int Index for Set struct in Swift?

I know that Strings in Swift don't have Int indices as Swift supports Grapheme Clusters. But, when coming to Collections in Swift, Array supports Int indices bu

SwiftUI - is it possible to get didSet to fire when changing a @Published struct?

I have just updated to XCode 11.4 and some of my code has stopped working. I have some @Published struct variables in an ObservableObject. Previously, when I up

Swift 5 UIButton title didn't change

I just learned Swift and developed an iOS project. But the button title doesn't change when I click it. How can I change the title? Simulator: iPhone 11 iOS14.4

Whenever I add a spacer into my code. it crashes. It works fine until then

This is simple code I made to practice with spacers. This is SwiftUI. struct Spacer: View { var body: some View{ HStack{

Conditional property in SwiftUI

How can I add an additional property based on a condition? With my code below I get the error: Cannot assign value of type 'some View' (result of 'Self.overlay

Align Items in swiftUI Stack Evenly

How can the items in a swiftUI Stack be aligned evenly to fill up all the available space? The first and last item should be straight at the beginning / end of