Most voted "swift" questions
Swift is a multi-paradigm programming language for Apple’s iOS and macOS operating systems. It was created by Chris Lattner in 2010 and released on Apple’s WWDC on 06/02/2014. It is currently in version 5.
Learn more…491 questions
Sort by count of
-
0
votes1
answer112
viewsError running app directly on IOS device
I have an app that runs perfectly in the simulator, the same is already signed with my dev account. But when I try to build to run on a "physical" device some errors happen, I already tried to…
-
0
votes1
answer32
viewsBy clicking on the tab item the application closes
I’m making an app that has a tab, in the first tab I put a webview, in the second a map, when I enter the app and click on the map item, the app closes, the error happens after I reference the map…
-
0
votes1
answer40
viewsNslocalizedstring does not recognize Localizable strings.strings
Next I’m trying to use Swift’s string localization system, but apparently it doesn’t recognize the strings, for example instead of appearing the string Start appears txtinicio, I’m trying to access…
-
0
votes1
answer88
viewsUiscrollview rolling when displays keyboard - Swift
Hello I am using a Uiview with a Uiscrollview to assemble a layout, but every time the keyboard is shown the scrollview and scrolled down, I have tried some solutions, found here and in other forums…
-
0
votes2
answers39
viewsRemove all subviews from a Stack View
At a certain time of my application I consume an API and add buttons in a Stack View. The name of my Stack view is "viewPossibleAnswer". for answer in newListsResponses { let newButton = UIButton()…
swiftasked 6 years, 4 months ago Ricardo Lucas 593 -
0
votes1
answer45
viewsWebview does not capture gestures
Wkwebview loads the link but I can’t perform any action on the site Viewcontroller import UIKit import WebKit class promoVC: UIViewController{ @IBOutlet weak var webView: WKWebView! override func…
-
0
votes1
answer32
viewsLink in a Nsattributedstring
I have a string that is actually a snippet in HTML. I use the following method to convert this snippet into a string and set it in label let s = Descricao.data(using: String.Encoding.unicode)! let…
swiftasked 6 years, 1 month ago Marceloawq 971 -
0
votes1
answer62
viewsProblem with collectionView
Hello, good afternoon. I’m facing a problem with the collectionView Swift, it just doesn’t show up, I don’t quite understand this issue, but it doesn’t get into the routine of the collectionView…
-
0
votes1
answer58
viewsSectionheader tableview Swift
I have a message tableview, I would like to know how to add sections using the date field of the Notificationitem object. struct NotificationItem: Codable { let title: String let body: String let…
-
0
votes1
answer64
viewsHow to pull a specific firebase document using Swift?
I’m trying to get a document inside a collection, but I can only get it all at once. The way in the firebase looks like this: Collection: digital-liquors. Documents: adult(That’s what I’m trying to…
-
0
votes2
answers128
viewsWhile an existing Transition or Presentation is occurring; the navigation stack will not be updated
Boas, I am trying to implement an Indicator loading in my application with a small message, so that the user can see that information is being processed (in this case fetching the API through…
-
0
votes1
answer40
views"unwrapping an Optional value Swift" error in hiding label
Every time having to hide one label of my screen using label.isHidden = true this error appears, I’ve seen in other questions here on the forum on the topic, however I could not understand…
-
0
votes1
answer45
viewsWebview does not read with some javascript codes
I’m having a problem using Swift webview, I noticed that some javascript codes inside the loaded page do not run. Example: onclick="functionMuitoLegal()" But if I do the same thing using React on…
-
0
votes0
answers51
viewsUitableview error
Gentlemen, are you all right? I’m having difficulties with Uitableview and Uitableviewcell, when I try to pass information from a selected Uitableviewcell to another screen is giving me this error…
-
0
votes1
answer135
views -
0
votes1
answer169
viewsConstant '' " used before being initialized
How do I get access to an attribute of one class in another? It may sound silly, but I’m learning now Swift and still getting confused with simple things. I’m trying to make a movie app using an…
-
0
votes1
answer125
viewsError calling another Viewcontroller per button [IOS 13]
I’m studying about Clean-Swift and VIP architecture, and I’m having trouble doing the route part to call a Viewcontroller by the button. It may seem simple, but I don’t have much experience with…
-
0
votes0
answers43
viewsasynchronous function that maintains a strong reference to the object?
I’m having trouble having strong reference of an asynchronous function, I’m using Coredata to make data persistence. When I start the app appears to me the following message : however, when I call…
-
0
votes1
answer127
viewsFormatting values with Numberformatter() Swift
I have a function that I want to format the values to decimals with the Brazilian standard. Today my function is like this ... func formatNumberToDecimal(value:Double) -> String { let…
swiftasked 4 years, 10 months ago Ricardo Lucas 593 -
0
votes1
answer40
viewsImageview Swift error
Fala galera... I am developing an app, but it is with an optional error (I believe that is the error), I have the following scenario: A button "A" and a "B" in a main Viewcontroller(1) when clicking…
-
0
votes1
answer28
viewsHow to make not all cells in a tableView editable?
I have a tableView where the user can delete the cells he selects. In my case the first cell of the tableView cannot be deleted by the user. How do I make only the first cell of the tableView not…
-
0
votes1
answer121
viewsError Use of undeclared type , when trying to use the identifier of one screen to carry information, to another
I am studying Swift and at the moment I am trying to make an application with more than one screen, very simple. But I’m having trouble working with these inter-screen, storyboard connections. I…
-
0
votes2
answers42
viewsHow do I turn a login button on and off on Swift?
I am creating a login screen, I want: in case the user has not entered your document (username) the login button is disabled. import UIKit class loginManager: UIViewController, UITextFieldDelegate {…
-
0
votes0
answers33
viewsReturning an API in Swift
Hello, yesterday I was doing the requisicao as in the code below, and was returning normally. But today when running again (without any change) the code is not returning me, it comes up to this…
-
0
votes0
answers21
viewsdropbox_client Authorize with token does not work on IOS
Hello, I have an application developed in flutter that use Dropbox to upload images, I access Dropbox by dropbox_client https://pub.dev/packages/dropbox_client and upload images. However, on IOS it…
-
-1
votes1
answer48
viewsError with switch in Swift
Guys, I’m having an error in the following code. The error is on the switch, the following error appears: expected declaration. What to do? import UIKit class ViewControllerAnalseOP1:…
-
-1
votes1
answer707
viewsHow to pick specific letters from a string - Swift2
How do I get one letra specifies a variable? var variavel = "teste"; I’d like to take a letra separada, I need to put each letter in a different variable Thank you!…
-
-1
votes1
answer117
viewsLib from image gallery
I’m looking for a lib image gallery in the style of the image below with the page control. I tried to create one using page view and insert into the screen request with a container, but it was not…
-
-1
votes1
answer103
viewsexample of login with Basic Athentication for Swift?
Hello. I have an api in cakephp with basic Authentication, for android it was easy but I’m not getting an example of request "POST" passing the parameter "user" and "password" via http: if anyone…
-
-1
votes1
answer30
viewsHow to use Safariviewcontroller on all App Urls
I have an App that presents itself initially with a TableViewController where each cell leads to a ViewController simple. But each Viewcontroller presents many Urls that are automatically recognized…
-
-1
votes2
answers1102
viewsfatal error: unexpectedly found nil while unwrapping an Optional value
I know the problem is simple. but I can’t seem to solve it my variable Beats only appears in the second view, but a function ends up calling it in the first view, I just need to check if she’s…
-
-1
votes1
answer90
viewsConnect Sql Server Database to Ios Swfit Program
Is there any way to use the sql server database on Ios ? I use lib jtds on android and can make the connection but on Ios?
-
-1
votes2
answers80
views -
-1
votes1
answer49
viewsDownload data from firebase
I would like help to download the information inside the "Items". Since it would be a list created by the user, I would not put a limit of items in it, and at the same time I would not know how much…
-
-1
votes1
answer40
viewsAdd Uitextfield text to an array
Oops, I know it may seem simple, but I’m having trouble picking up the typed text on Uitextfield and pressing the include button on an array, but I’m not getting it. Someone can help me? var…
-
-1
votes2
answers39
viewsUilongpressgesturerecognizer does not work with my Uiimageview
I’m trying to capture the long tap on my image. So I can send an action to in a long touch. @IBOutlet weak var imageRecord: UIImageView! override func viewDidLoad() { super.viewDidLoad() let…
swiftasked 6 years, 3 months ago Ricardo Lucas 593 -
-1
votes1
answer60
viewshelp with the code below
Good afternoon, you guys! I’m trying to make an app and I can’t do the programming so it doesn’t go to the next field with the empty field. The way the code is left blank and press to calculate the…
swiftasked 5 years, 4 months ago Elcio Alves 1 -
-2
votes1
answer237
viewsChat for IOS with Swift 3
I’m looking for a faster way to develop a Whatsapp app for IOS. As I’m very new in Swift I would like to know if there is something like a "skeleton app" that I could improve the look and point to…
-
-2
votes1
answer104
viewsPush Notifications Ios
I would like to add push Notifications to my app, I would like someone to explain to me what this whole process would be like since the data enters a SQL Server database and my app receives this…
-
-2
votes1
answer49
viewsHow does IOS development responsiveness work with Swift 4 in Xcode ?
Good guys, I’m starting now to enter the IOS programming, and I have this doubt in my head, from what I saw, the people work a lot dragging the objects and programming them, however, how…
-
-2
votes1
answer45
viewsHow to resolve this problem: Expected '{' in body of Function declaration
I’m trying to print a hello world and I can’t. I actually put hello world in place of what I need to print to test and keeps giving the error. import UIKit import RealmSwift class…