The internet's most comprehensive Swift resource.




by Eirik Madland     myxcode.net
Swift Version: 1.1
Here's the instructions to create a project with Source Control and connect it to GitHub. Add a new project and make sure you enable Source Control Make your project ready for your first commit, se...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Add a new repository on GitHub (but do not make a readme-file or anything). Add Terminal and change to your project's directory. Init the local directory and add all files to your local repository ...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Comparing dates in Swift can easily be extended by some code. Add this code to your project and comparing dates is easier than ever extension NSDate { func isGreaterThanDate(dateToCompare : NSDate)...

by Eirik Madland     myxcode.net
Swift Version: 1.1
I've made a function to convert an image to black and white (of course using Internet as inpiration). The function can be added in code and used anywhere in your project. An example of usage let bl...

by Eirik Madland     myxcode.net
Swift Version: 1.1
When using Parse to do push messaging, one of the options on each push is to "Increment App Badge". This will add a number on your app icon. This will not reset itself when opening your app, but he...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Some notes for myself: An Array of structs is defined: struct newsStruct { var newsDate:NSDate! var newsHeading:String! var news:String! var newsPictures:UIImage! } Decleration of an Array of the s...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Another nice GitHub resource to simplify your code. Download GSMesages from GitHub. Drag GSMessages.swift to your project (remember to check “Copy items if needed”). A couple of examples of how to ...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Follow these instructions to prepare your app for Parse: Adding Parse to your project (Note: In the beginning, when adding a new Parse app, select Push instead of Core as stated in the example abov...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Before you start, you should have a working UICollectionView (if you don't, you can use this tutorial to set up one, ) In your Storyboard, select your collection view, select Accessories - Section ...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Adding a frame to a view using code. Create an IBOutlet for your view and connect it (in this example it's called frameView). Add the following code in viewDidLoad():  frameView.layer.borderWidth =...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Here's how to do that. In your class, add MFMailComposeViewControllerDelegate to it, look something like this: class ViewController: UIViewController, MFMailComposeViewControllerDelegate { Import M...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Here's how to do that. Create a button (or put the code somewhere else in your project) and create a IBAction for it. Add the following code:  @IBAction func callPressed(sender: AnyObject) { let ph...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Here's how to do that. First of all find the Facebook page you want to go to in the Facebook app, go to  do that. Record the ID: 96585976469 (my example i Audi US page) Create a button (or put the ...

by Eirik Madland     myxcode.net
Swift Version: 1.1
Here's how to do that. Create a button (or put the code somewhere else in your project) and create a IBAction for it. Add the following code: @IBAction func instagramButtonPressed(sender: AnyObject...

by Eirik Madland     myxcode.net
Swift Version: 1.1
I wanted to show square photos in a collection view, two on each row. How can I do that? It's quite easy to use Storyboard for this and make two photos on each row, but how do I make sure that it u...



© 2015 SoSoSwift. Blog · About · Contact · Privacy policy · Terms of service · RSS