Author Archive for Andrei Puni

Spread the love!

We ❤ Swift is a blog dedicated to the Swift programming language since it was announced by Apple at WWDC 2014. Help spread the love! Check out our t-shirt campaign on Teespring.     If you are more interested in programming than t-shirts you can read one of our articles: One month of Swift How to make a custom keyboard in…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

One month of Swift

    It’s been an amazing month since Apple announced Swift, at WWDC 2014. Since then we saw a lot of enthusiasm among developers all over the world, writing hundreds of blog posts and discussing on Reddit and Twitter. A bit over 100.000 people visited We ❤ Swift. We are really excited to see the massive number of people interested in learning Swift in just one…

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

How to make a custom keyboard in iOS 8 using Swift

tl;dr I will go over the basics of a Keyboard Extension and then make a morse code keyboard using the new Application Extension API in iOS 8. It should take you about 20 minutes to go through all the steps. full code Overview A custom keyboard replaces the system keyboard for users who want capabilities such as a novel text input…

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading...

Object Subscripting in Swift

What is Object Subscripting Subscripts are shortcuts for accessing elements from a collection, sequence or list. They are used to set and retrieve values by index without needing separate methods for setting and retrieval. A type can have multiple subscripts and subscripts can have more than one dimension. To access elements via subscripts write one or more values between square…

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Swift Classes – Part 2

Inheritance A class can inherit methods, properties, and other characteristics from another class. When one class inherits from another, the inheriting class is known as a subclass, and the class it inherits from is known as its superclass. Inheritance is a fundamental behavior that differentiates classes from other types in Swift. A simple example of inheritance: class AClass { func doSomething() {…

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading...

How to make awesome UI components in iOS 8 using Swift and XCode 6

In Xcode 6 two new interface builder declaration attributes were introduced: IBInspectable and IBDesignable. IBInspectableexposes class properties in the interface builder Attribute Inspector, and IBDesignable updates the view in realtime! They are pure magic! I can’t wait to see what cool stuff you will make. tl;dr a short tutorial on how to use IBInspectable and IBDesignable with a video demo. It should take you around 10 minutes to go through all the steps. code on…

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

Swifting Around

tl;dr I’m going to make a simple tableview with a custom cell type, use the new UIVisualEffectView from iOS 8 and then show off a bit of the power of Swift. It should take you about ~30 minutes to go through all the steps. Enjoy! full code if you are looking for a simpler tutorial for tableviews check out this one Create a new project Open Xcode 6, create…

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.50 out of 5)
Loading...

Swift Classes – Part 1

Creating a class To create a new class use the class keyword followed by the class name and a pair of braces. Inside the braces we can declare the class properties. class Point { var x = 0.0 // sets the default value of x to 0 var y = 0.0 // sets the default value of x to 0 } //…

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

How to make a simple tableview with iOS 8 and Swift

The first thing that came to mind when I saw Swift was TableViews. This is a step by step tutorial. tl;dr Full Code Create a new project Open Xcode 6, create a new “Single Page Application” and select Swift as the programming language. Add a table view property Open the ViewController.swift class and add a new tableview instance variable below the class…

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 3.67 out of 5)
Loading...
Subscribe
We send about one email per week with our latest tutorials and updates
Never display this again :)