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
3 answers

Swift 5 - How to hide back button in Navigation bar or move to another screen without back button

I was having this issue and I've tried a lot of solutions that was proposed by some kind people here in the following topic: Swift - How to hide back button in navigation item I created a ViewController class: import SwiftUI import UIKit class…
Mux02
  • 1
  • 1
0
votes
0 answers

How can I access systemfolders in Swift 5?

Scenario: I write an macOS-app that gets an export file from a banking app by apple script. The banking app stores the export file to /var/folders/.../filename.csv var inputFile = inputFile inputFile.removeFirst() let inputURL = URL(fileURLWithPath:…
mihema
  • 158
  • 1
  • 10
0
votes
1 answer

Swift Dark mode supported on a presenter model

I have a struct UI model. I create this model on ViewModel. I put an example below. TextRow(title: "Come", font: .myFont(.bold, size: 14), color: .appBlack, alignment: .center) I use that model in a table view cell. When I change the theme,…
ryla
  • 47
  • 1
  • 8
0
votes
1 answer

Swift5 Network layer and fetch

This my network Service layer I can’t understand where I made a mistake and why it doesn’t let me pull it out normally Result Help me figure out my head And i have a trouble with network layer: class NetworkService: Networking { func request( …
Alex
  • 1
  • 3
0
votes
1 answer

popViewController after dismiss Modal VC Swift

I want to popViewController after I dismiss a modalVC. However my code is not working. What is wrong? func showMessage(withTitle title: String, message: String) { let alert = UIAlertController(title: title, message: message, preferredStyle:…
JuFa512
  • 119
  • 7
0
votes
0 answers

Swift core data count true Boolean attributes

I have an entity Exams, with a one-to-many relationship with another entity, Topics. When the user clicks an exam on a table view, they go through to a page showing the topics associated with that exam. The topics page table view is in two sections,…
Lukenn77
  • 19
  • 1
  • 3
0
votes
1 answer

how to make a gauge view with highlight value as in the following image in Swift iOS?

I have looked at the libraries like gauge kit but they does not solve my problem. Are there any other libraries for making gauge view as in the image? If not, then how can I go around about it? I Checked these articles and the…
Yogesh Patel
  • 1,893
  • 1
  • 20
  • 55
0
votes
1 answer

AdMob Ad in UIView() Swift

Can I add a native AdMob ad in a UIView() that is a property of a UICollectionViewCell? let adView: UIView = { let ad = UIView() (in here I want to show the ad.) return ad }() then in override init I want to add the UIView containing…
JuFa512
  • 119
  • 7
0
votes
1 answer

Insert cell between two cells in UICollectionView

In lots of apps that have a feed every now and then the users are presented ads. I am assuming these adds are placed in their own cells of a UICollectionViewController. How does one add such ads to ones app in a randomly inserted cell between two…
JuFa512
  • 119
  • 7
0
votes
2 answers

Insert row in UITableViewController without replacing row - SWIFT

In my app I have a data pull from Firebase. I have a UITableViewController and would like to insert in a row a text from within the app. The data pull would be like this (please excuse the bad example but I cannot go into too much detail ..) The…
JuFa512
  • 119
  • 7
0
votes
1 answer

How to fetch specific response from api response and use it with deep linking swift 5

I'm Receiving Response from api using post method like this 'Success{ shortlink = pAHJt7; status = 200; } ' I want to use only shortlink with my url to share using deep linking concept. Here is my code of post method in which I'm getting response…
0
votes
1 answer

Convert object mapper model class to json string in swift

class LeadsEntity: NSObject, Mappable { var name: String? var mobile: String? var address: String? var coords: String? var stime: String? override init() {} required init?(map: Map) {} func mapping(map: Map) { name <- map["name"] mobile…
Rahul Gupta
  • 501
  • 1
  • 7
  • 15
0
votes
1 answer

Is there a way to adjust image size in a button in iOS?

As seen in the image below, the image of the button is crossing the button boundaries. Is there a way to make the image fit in the boundaries of the button either through the storyboard or programmatically?
Electric Dragon
  • 176
  • 5
  • 17
0
votes
1 answer

Adding a Second CollectionView

In my attempt to add a second CollectionView I have became lost. Here is my future project and I was essentially trying to duplicate that (The reason for the Second collectionView is so that I will have 4 rows, but the top two and bottom two will…
0
votes
1 answer

Cells for CollectionView Are Not All Showing

The code below is my test files for my final project that will look like this. As you can see I will be scrolling by rows of one or two. I have figured out how to get the horizontal scroll to work, however, it only displays two out of the six…
1 2 3
99
100