Click here to Skip to main content
15,885,757 members
Everything / Programming Languages / Swift

Swift

Swift

Great Reads

by Paulo Zemek
Mistakes that can be made while using MVVM and how to overcome them
by Vince Chan
Pwnage Checker is an iOS app that allows users to check whether an account has been compromised in a known data breach
by raddevus
Learn to create iOS apps using Xcode while you learn Swift. (If you've ever wanted to see iOS app dev in action, take a look at the screenshots.)
by pgmr_64804
Tree View in Swift for iOS that is easy to implement and use

Latest Articles

by Serhii Krotkykh
On easy example shown how to implement UIKit and SwiftUI TableView auto resizable cells and explained difference between Nib and Xib, how to load nib file and what exactly owner parameter of the load nib file method.
by Serhii Krotkykh
Example of using result builder for the MVVM pattern
by Dearich
First part of the ultimate guide on how to add a Live Activity feature to your project
by Paulo Zemek
Mistakes that can be made while using MVVM and how to overcome them

All Articles

Sort by Title

Swift 

5 Oct 2014 by KarstenK
Some toughts whether to prefer Objective-C or Swift.
30 Oct 2014 by Ui-Sing So
The method doesn't replace existing Computer Language. Natural Language and Computer Language have to cooperate with each other.
23 Nov 2019 by Zhaohui Xing (Joey)
Swift classes for algorithm, including single linked list class, stack class, queue class
22 Apr 2015 by ankur1163
I am making login page. Now, when i put username, password, it keeps rotating and doesnt do anything. I started it in debug mode and saw that it doesnt loop through code inside while statement>>>>>>>>>>>>>>>>>while(rdr.Read()) { int RetryAttempts =...
22 Apr 2015 by MdOK
Put a if condition outside the while loop and check the 'HasRows' property of the reader object like 'if(rdr.HasRows)'. By doing this you will make sure that the while loop will be executed only if there are rows in reader.
22 Apr 2015 by Abhinav S
Trywhile (reader.HasRows){ //Code reader.NextResult();}
10 Apr 2017 by Majid99
The code work good when I was using Xcode 7.3 with iOS 9 but when I migrated to Xcode 8 using swift 3 ,the code below show me that runtime error.still finding a solution for itclass TableViewController: UITableViewController,NSFetchedResultsControllerDelegate,UISearchResultsUpdating...
10 Apr 2017 by Surya_Narayan
It feel like context is not properly set . Please try let ad = UIApplication.shared.delegate as! AppDelegate let context = ad.persistenceContainer.viewContext
6 Sep 2021 by OriginalGriff
We really can't help you: we have no access to your code or any idea what it is doing. So it's going to be down to you - and the chances are you'll have to fall back to old-school debugging: manual logging. If you can get it to fail under the...
23 Aug 2015 by paulortiz
Hi Guys,We are currently in the process of migrating our codes from Javascript to Swift with Objective C supported libraries. Our encryption algorithms was written using Javascript, and I found out that we are using ASN1 structures. I was wondering if any of you knows any ASN1 libraries that...
24 Aug 2015 by KarstenK
Swift isnt so wide spread now and here, so you better to Objective-C. My tip would be interesting approch to wrap OpenSSL into Xcode.The professional software from Chilkat has also Swift Example.Lastly I found that ASN1C on Github.I really would like to hear from you how you solve...
17 May 2018 by rikidev
Goodmorning I have a node.js server that must receive json calls from a node.js application that uses express to manage routers, the ios application makes calls to routers passing json values! My problem is that I can not configure the apple ATS! How can I do? below I entered both the code and...
14 Jun 2021 by Abbas Gujjar
Suppose we navigate to child view and when the Parent View updates then automatically back navigation performs up to Parent View. Can we disable this Behaviour? What I have tried: I have a list of card views and when I click on one of them...
19 Mar 2017 by Will J Miller
Programming tests are frequently used to screen job applicants. This article describes one problem given by a large modern technology company and its solution in swift.
21 Aug 2016 by Dennis E White
Catching the bug… Server Side Swift
15 Apr 2015 by Member 11611871
I want to know the code for change the language from English to Arabic in Label or Button!this is for xcode6 swift
15 Apr 2015 by Maciej Los
Please, read these:Localizing Your App[^]Let's localize your iPhone app![^]
30 Mar 2016 by CodeProject, Val Polouchkine
Welcome to our continuing series of CodeProject interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we talk to Val Polouchkine, a Developer Advocate for Twitter.
20 Aug 2018 by Member 13955667
I'm trying to find an image compression algorithm in the Swift programming language, as in the WhatsApp messenger. In the programming language Java under OS Android I found quickly, and under the platform iOS have difficulties. Here is the image compression algorithm for Android: public...
20 Aug 2018 by Patrice T
Quote: This algorithm compresses the image to 100 KB. No, this code do not compress the image to given size, it downscale the image. The reduced size is only a secondary effect. Quote: I'm trying to find an image compression algorithm You are not looking for a compression algorithm jpeg images...
2 Mar 2015 by Member 11491281
Is there any way to connect to your database in swift without JSON or any others frameworks
18 Oct 2017 by fmikele
There is a very useful library in Android development (RETROFIT2) to convert JSON into Java classes in one step. Is there a similar library in Swift to convert JSON to Swift classes? Thank you What I have tried: import Foundation let data: Data // received from a network request, for example...
10 Jun 2015 by Member 11611871
I'm trying to display an items in the table but the app is saved in the core data without displayed can anyone know what the problem here because it's doesn't show that the app have any problem.override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the...
19 Sep 2015 by HRamesh
make fallowing changes :1. var nItem: ItemList = frc.objectAtIndexPath(indexPath!) as! ItemList &2. In viewController.swift file var nItem : ItemList = nilThat will fix
27 Apr 2017 by Member 13157880
let uid = FIRAuth.auth()?.currentUser?.uid let ref = FIRDatabase.database().reference().child("users").child((uid)!) ref.observeSingleEvent(of: .value, with: { snapshot in if let dictionary = snapshot.value as? [String:...
15 Sep 2015 by Member 11360293
I created an SQLite table with a row of id integer PRIMARY KEY. I used this tutorial to integrate SQLite with my app. I'm trying to add that to an array of Ints. Here's my code:let all = "select id from \(self.tableName)"let fullArray = self.dbManager.loadDataFromDB(all)for...
15 Sep 2015 by KarstenK
your type cast from string to int is the problem. You cant use a type cast to extract the numeric value from a string object. You must convert it.I am not so fit on Swift but code like this should do the job.currentObject[0]!.toInt() //Swift 1.0let i:Int? = Int(currentObject[0]!) //...
26 Oct 2014 by Member 11181364
Hi,I have been looking for an example of how to create a grouped TableView in Swift but have had no luck.. I am working on a project to create a Categories Page and currently have a working search bar as well as the sub-categories listed in a TableView.. I'd like to be able to break these...
29 Jun 2021 by Dener Araújo, André Marcos (Advisor)
A Mobile Application Development for a Private Network Connection on iOS Platform Using Prococol OpenVPN
6 Apr 2018 by Prakash Manikkam
i need to distribute my app i have to purchase the developer account right? There is three type of accounts (Enterprise, Organisation, Individuals) So what is the difference between these accounts , limit of client and please advice me which account is better What I have tried: I Try to...
6 Apr 2018 by OriginalGriff
Quote: Difference between enterprise, organisation, individuals Apple id ? See here: Choosing a Membership[^] Which one is "better" depends on what kind of company you are, and what you are plannign on doing.
5 Dec 2015 by Vince Chan
How to display activity indicator with overlay
16 Nov 2021 by ShinehahGnolaum
When I use the Contacts Framework with Swift for iOS 15 using Xcode 13, when I use CNContactStore instance method unifiedContacts(matching:keysToFetch:), what happens to those CNContact objects that are not linked with any other CNContact...
21 Sep 2016 by OriginalGriff
Completely the wrong site - this is for development and coding questions.I'd suggest you talk to your parents or doctor.
24 Aug 2018 by kamil87
Hello everybody:) It's my first post so I would try describe my description the best how I can . Is it possibie to create aplication(web or mobile) where I can input *.dwg file and modify it(change something on it or put any comment)? I have read that there are aplication based on AutoCad...
13 Sep 2023 by Pravin TS
I am trying to integrate WireGuard for iOS and macOS in Xcode, the build process is success, but the integration shows error,although I had followed the procedures said in...
11 Jul 2017 by Member 13304726
I am fairly new to Xcode and Swift, but am trying to create an app. My goal is that I have an Expandable/Collapse TableView. The expandable cell (the subcell of the main cell) will have 2 text fields (one on the right and one on the left) where the user can input information using the keyboard....