Questions tagged [swift5]

Use this tag only for questions directly related to changes in version 5 of Apple's Swift programming language. Use the tag [swift] for more general language questions, or the tags [ios], [cocoa], [apple-watch] etc. for questions about developing on Apple platforms.

Swift 5 is a version of the Swift language developed by Apple and was released March 26th, 2019 with Xcode 10.2. The language is open source and available on GitHub (see ).

Swift 5 follows and .

Swift 5 Release Notes for Xcode 10.2.

3158 questions
0
votes
0 answers

Subtitles wont display on table views in Swift 5 despite being a subtitled table view cell

I'm working on a project that needs to display two table views at once that each draw from their own class, but no matter what I try, I can't get subtitles to display. The table view cells are formatted to subtitle, and it recognizes detailed text…
0
votes
0 answers

Incorrect tint color DatePicker swift 5 ios16

I'm using UIDatePicker with preferredDatePickerStyle = .inline and tintColor = .systemOrange. I've tried to put this settings inside ViewDidLoad, ViewWillAppear and ViewDidAppear but the result is that the tint color remains blue. How can I…
TheCesco1988
  • 280
  • 1
  • 2
  • 10
0
votes
1 answer

how can I check for Bluetooth's Serial Number on Xcode

I am using SwiftifyBluetooth on Cocoapods but... I did use discoverServices but it only showed as its CBService's value... but I can't seem to know how to convert from its value to string... I checked on how SwiftifyBluetooth and Core Bluetooth work…
0
votes
1 answer

How to manage with custom SegmentControllCell to tableview cell?

I tried to manage from custom segment control cell into ViewController's tableview cell. This is My custom segment control class: protocol SegmentControllerCellDelegate: AnyObject { func manageSegmentControl(cell: SegmentControllerCell)} class…
0
votes
1 answer

CoreData FetchRequest Increases Compile Time from 3 Seconds to 115 Seconds (Swift 5 with Xcode 14.0 for iOS 16.0). [Edit: Too Many sortDescriptors.]

I'm new to iOS development. If I include the lines @Environment(\.managedObjectContext) var moc @FetchRequest(sortDescriptors: [SortDescriptor(\.topic), SortDescriptor(\.id), SortDescriptor(\.tag)]) var facts: FetchedResults then the compile…
0
votes
0 answers

Swift ISO8601DateFormatter TimeZone

I receive a string timestamp from JSON formatted as follows: "2022-10-06T19:10:00.000Z" I want to convert the string to my local timezone and possibly even reformat the whole thing to something more readable like "Oct 6 2022, 3:30:45 PM". I assume…
smithms
  • 113
  • 2
  • 5
0
votes
0 answers

is there a way to programatically merge a textview and a button together in a UI Stack View? Swift 5

I wanted to make it like this: into this because im having trouble merging a UIButton and UILabel together The My Current Code is this: //UIStackView lazy var infoHelpFooterStack : UIStackView = { lazy var infoContact : UILabel = { …
0
votes
0 answers

swift use TabularData and Charts together

I tried to use specified columns from a DataFrame from TabularData in a Charts LineMark, but couldn't subtract the .value's. ForEach(theXYdata, id: \.x) { //item in LineMark( x: .value("x",…
user3585825
  • 27
  • 1
  • 1
  • 3
0
votes
0 answers

i have used 'SwiftRangeSlider' in my project for double range slider with minimum and maximun value, i want to reload data of slider (min, max)

currung data load on slider not working i want to reload slider ranger from text input field applied validation converted text to value just remaining is to reload slider here slider is SwiftRangeSlider code @IBOutlet weak var viewSliderRanger:…
0
votes
0 answers

Getting error message when sending request from Alamofire in swift 5 "Unexpected number in JSON at position 1" , while work fine in postman

I have integrated api like this and server return "Unexpected number in JSON at position 1" error again and again , what can I do to fix it ? it is working fine on postman let headers: HTTPHeaders =…
0
votes
0 answers

How to test Timer in Swift Quick and Nimble

I am trying to run unit test case for timer as defined below where timer is initialised in CPTimer var searchTimer: TimerType? func initialTimer() { searchTimer = CPTimer(timeInterval: 2.0, repeats: false) { [weak self] in …
Asif Raza
  • 836
  • 12
  • 29
0
votes
0 answers

Use Base Internationalization issue with multiple storyboard - Xcode 12.4 - Swift 5

I am facing an issue while doing internationalization in Xcode 12.4 with multiple storyboards. Example: I have 2 storyboards 1. Main.storyboard, 2. Settings.storyboard as shown below - Now when I am doing localization, I only get options for…
Asif Raza
  • 836
  • 12
  • 29
0
votes
1 answer

SwiftUI Dynamic View Creation

I need to create a dynamic list of TextFields with the press of a button. Once I'm done, that data will be sent to my node server as a JSON, hence the "Codable" protocol on the NumberList struct. The issue I have currently is that after pressing one…
0
votes
1 answer

Handle unrelated serial api calls in RxSwift

I have a requirement to get responses from multiple requests with different models in RxSwift. I want to do this without GCD or Semaphore and only with RxSwift. I try this code but have some problems with in different responses with different models…
0
votes
0 answers

How to get video data or url from PFFileObject?

I am completely new to Parse Platform. Im trying load video from parse server hosted on heroku using mongoLab to store data. I have a video as PFFile in database and I can fetch it in my iOS app too as a PFFileObject. But I can't find any leads how…