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
votes2
answers460
viewsHow to Reload Data on a Tableview without Losing Previous Data (Swift)
Hello, I have a tableview that will receive data on demand. however when I call scrollViewDidEndDragging function it has a call to tableview.reloadData() it replaces the previously loaded data. Load…
-
0
votes1
answer117
viewsIdentify that an App is entering the background
I have an app that is in Object-C and I’m trying to pass it to Swift, but I’m having some problems, one of them is Nsnotification that is not working. In Object-C, I’m using it as follows: -…
-
0
votes1
answer993
viewsAccess variables from another iOS Swift class
I have a class Main in my application, and in it I have created the variable cod which receives the value of 0, in this class I also have a sequence of buttons that in them contain the event of…
-
0
votes2
answers198
viewsButton with link to a website
Could you help me make a button with a link to a website? It’s an iPhone app and I’d like you to press a button and open the site in Safari (for example).
-
0
votes2
answers106
viewsXcode cannot find button
I created a button on storyboard to connect to a viewController. When clicking on the button occurs the error: thread 1:Signal SIGARBT What could be causing such a mistake? I’ve seen many tutorials…
-
0
votes1
answer57
viewsHow to create email in Swift using Mfmailcomposercontroller correctly?
I’m having trouble creating an email with MFMailComposerController on Swift. When trying to assign self to emailController.mailComposerController I get an error stating that I cannot assign…
-
0
votes1
answer36
viewsGet values from fields of a Nsarray with Coredata content
I have a table on coredata with some fields, I can get the size of these values but I need the values of each field, I have this code: var request:NSFetchRequest = NSFetchRequest(entityName:…
-
0
votes0
answers203
viewsUitextfield does not take the text value of a Swift Array
Guys, I’m using core data to save user input to an array. Until then the code works perfectly, the problem is when to take some element of this array and put in the Uitextfield. The code doesn’t…
-
0
votes1
answer216
viewsHow to use Last.fm API?
I need to make an iOS app that works with Last.fm API and it all starts out by making a request to authenticate the user. My question is: how do I do it with Swift. I’m a beginner, so I don’t quite…
-
0
votes0
answers88
viewsHow to get data in a web service when receiving a push Notifications with application in idle state
I have an application that when receiving a push notification needs to connect to my web service to get relevant data for the user. When the application state is active or in the background it can…
ios swift apple-push-notification push-notificationasked 9 years, 4 months ago João Paulo Alencar 1 -
0
votes0
answers138
viewsURL request in Swift
How do I pull only the name and poster from that page : https://www.themoviedb.org/search/remote/multi?query=exterminator%20do%20futuro&language=en For a project in Swift ?…
-
0
votes3
answers392
viewsImport a Swift into another Swift
I want to import a Swift file into another Swift file, how to proceed ? Using Xcode 7.0 beta 3 via Swift 2 in an unsuccessful attempt…
-
0
votes1
answer681
viewsHow to browse different screens in Swift using the didSelectRowAtIndexPath method?
I need you to click on one of the positions of array, the same goes for a specific screen. didSelectRowAtIndexPath method shows black screen and not the screen it should. Follow the code I made…
-
0
votes1
answer542
viewsuitextfield check with only number
I am creating a tableview with Cells custon via xib and Uitableviewcell and I have a Cell that has only one textField and I want to do a check of number and number for that textfield but I don’t…
-
0
votes1
answer186
viewsInvoke touchInside method via SWIFT programming
Good evening guys, my doubt can be simple for many more I’m having a little trouble to solve the same. Come on !!! I created a button (Uibutton) and would like to know how I invoke an action when it…
-
0
votes1
answer50
viewsFactory of objects related to local persistence on SWIFT
In the application I am developing using Swift, I need to have access to a locally persisted data entity, this entity will be built through a Factory based on data obtained probably by a request and…
-
0
votes1
answer185
viewsHow to capture and treat an Exception in the Swift language
I have a method of one framework, of AVFunction that throws an exception, but when writing the code that calls this function I can’t find what exactly the exception is launched. How should I proceed…
-
0
votes1
answer72
viewsInterrupt a chain of actions on SWIFT
I am developing a simple application with two screens, uama authentication and another for a second process, this application is for IOS using the SWIFT language. When using Storebord to define the…
-
0
votes2
answers67
viewsParse’s design with black stripes
I’m using the Parse.com project in version 7 of Xcode, however, the app gets a black belt at the top and another at the bottom as shown in the image: I’m using the Swift version of the project.…
-
0
votes1
answer200
viewsIntegrate fb into Ios Swift
Good afternoon people all good ? I wonder if by integrating fb sdk into my Ios Swift project I have access to his friends list ? And taking advantage of the question, would anyone have any tutorial…
-
0
votes1
answer81
viewsHow to update Uitableview with two-dimensional array?
I’m not getting my upgrade UITableView with the data contained in Array: var linha: NSArray = [["Categoria": "Desenvolvimento para IOS", "Imagem": "swift.png"],["Categoria": "Programação orientada a…
-
0
votes1
answer37
viewsUipicker view of array
Good night people... I have the following problem : I need to insert a Picker view into my application, this Picker view receives the data from an array, and when the user clicks on a button an…
-
0
votes2
answers208
viewsLabel Position - Swift IOS
Good evening folks. How do I leave the label that is informing the current weight positioned below the progress bar cursor ? To make this progress bar I am using Gradientslider…
-
0
votes1
answer31
viewsAccess button text
Everybody, good afternoon to you... I have the following, I need to know the title that is on a button , as if it were . text , to define use setTitle , but to know what the name ? Thank you
-
0
votes1
answer31
viewsAccess global var
I have the following problem: I have the following code var myGlobal : String func nomeDaFuncao () { // Preciso acessar a global myGlobal = "fff" } How can I access the global within a function or…
-
0
votes1
answer19
viewsperformFetchWithCompletionHandler not being called into production
I’m implementing a Swift 2 app that requests an xml feed from time to time, and triggers a local notification. For that, I’m using the method performFetchWithCompletionHandler no Appdelegate.…
-
0
votes1
answer62
viewsDeclared variable in viewDidLoad not found in Button - Swift 2
I have an array that generates a word when loading the viewController, and saves a random position in the variable declared in viewDidLoad or before inside the class. But inside the button you…
-
0
votes0
answers56
viewssending image or video via webservice
I have in my application a UIIMAGE attribute ( for image) and a NSURL for video, need to pass one of this information via webservice... How can I do that ?
-
0
votes1
answer146
viewsQuestions for Swift app development
I’m working with an iOS app and I’m using Swift. My client who owns a restaurant would like to use an administrative panel to add new dishes to the app. I wonder if there’s a panel on the net that…
-
0
votes2
answers74
viewsHow to recover the html displayed in a Uiwebview with Swift for IOS
When my application starts the method viewDidLoad executes a code snippet that accesses an X site, retrieves an HTML form and displays it in a Uiwebview. My problem is this, when a link is clicked I…
-
0
votes0
answers83
viewsUiwebview different access from Google
My webView perfectly accesses Google, but if I try to access another page like my site or a local address, it gets white screen. class ConectViewController: UIViewController { @IBOutlet weak var…
-
0
votes1
answer28
viewsCoredata Appdelegate - ERROR
I am encountering error when creating the context variable "There was an error Creating or loading the application’s saved data." The error returned is in the persistentStoreCoordinator of…
swiftasked 9 years ago Fábio Reibnitz 113 -
0
votes1
answer84
viewsmathematical function class (regression) in SWIFT
What class to use mathematical equations for regression? And how to plot the graph?
-
0
votes0
answers50
viewsERROR: 177: when playing sound Avaudioplayer [Swift]
I’m getting this error message when I play a sound, error has always happened the first time you play the sound, in some tests there is no error and in others yes.. var beep : AVAudioPlayer?…
-
0
votes1
answer92
viewsHow to pass a CPF as a parameter of the Nsdictionary type for a call with JSON and POST?
Hello, I have a question. I need to pass a CPF entered by the user as a parameter in my POST call to return with his data. The call works with a CPF already registered, but only works if the CPF is…
-
0
votes1
answer91
views -
0
votes2
answers223
viewsHow to feed a tableView from a screen with information from another screen?
Good evening, I have 3 screens in my app to buy passwords, the last of them has a Windows tablet powered by the passwords purchased by the user on a previous screen. He must choose a password and it…
-
0
votes3
answers119
viewsMigrate JSON request from android to Swift
I’m having a problem migrating a code from an android app to a code in Swift. This code is responsible for authenticating the user and password of an application. I am unable to run Swift 2 on Xcode…
-
0
votes1
answer62
viewsHow to transfer content from one Viewcontroller variable to another
Excuse my ignorance of beginner programmer. I followed the tips above but it makes a mistake when I do the self: Cannot assign value of type "Telaprincipalviecontroller" to type…
-
0
votes1
answer77
viewsError creating class reference and concatenating methods in Swift
Good night. I have two classes and created an instance referencing the parent class calling its method and the same does not run and shows the following sentence: "Swift Expressions are not allowed…
-
0
votes1
answer110
viewsGet widget index on Swift
I’m trying to use the method index to know the index of an object within the array but do not know which parameter(s) to pass. My code: /// Struct that define the track model struct Track { let…
-
0
votes1
answer37
viewsSIGABRT error in Uitableview
The code below compiles but then displays the error 12main SIGABRT in the appdelegate.swift, what to do? And the tableview already linked with source date and delegate to viewcontroller. 2016-01-09…
-
0
votes1
answer53
viewsHide Rows from a pickerview when selecting an item from another pickerview - Swift
I created a pickerview using a multidimensional array, I would need to hide some items from picker4 after I selected the first item of picker3. class ViewControllerEspessuras: UIViewController,…
-
0
votes1
answer300
viewsPass parameters between IOS views
Guys I have a view where I have login ways in my app, if the person choose login or register will be redirected to the same view but depends on the button that is pressed I will present a different…
-
0
votes1
answer1456
viewsHow to pass data from one Viewcontroller to another Viewcontroller
Researching on this I found some solutions, the first is to go through the prepareForSegue(), the second is to use a shared variable (global), I also saw something about using protocol but could not…
-
0
votes1
answer309
viewsSymmetric Swift encryption
I’m new to Swift, and I’d like to encrypt a string, using some symmetric encryption algorithm so that it’s possible with the same decryption key. I would like to know how this can be done in the…
-
0
votes1
answer39
viewsHas not initializers - Swift IOS
Good morning friends. For some reason, I’m having this mistake, as I’m new on this platform I’m not able to identify the problem, could someone please help me? Thank you!…
swiftasked 8 years, 10 months ago Bruno Bafilli 327 -
0
votes0
answers45
viewsWATCHOS 2 - CORE DATA - IOS
I’m trying to make a communication between the core data e o watch 2. In the iphone add a record in core data (sqlite). When you left the iphone and enter the app do watch it has to go in the core…
-
0
votes0
answers33
viewserror with managedObjectContext
I added a CoreData in my project Model.xcdatamodeld and would like to know why when I make the call from managedObjectContext says the class doesn’t exist? Follow the print so you understand better:…
swiftasked 8 years, 9 months ago Bruno Bafilli 327 -
0
votes1
answer25
viewsSwift Coredatamodel Select
I would like to know how I do to select only a specific table of my Coredata, for example I have 6 fields, and I would like to select only information from a single field, someone could help me? My…
swiftasked 8 years, 9 months ago Bruno Bafilli 327