Swift is a multi-paradigm, compiled programming language developed by Apple for iOS and OS X development.

learn more… | top users | synonyms

4
votes
1answer
32 views

Calculating delta in SpriteKit using Swift

I am attempting to learn swift by refactoring one of my old games and I need to rewrite my update method which calculates a delta time. This code works but is ugly. ...
7
votes
1answer
66 views

Fraction (rational number) structure with custom operators

First, the struct itself: ...
12
votes
5answers
834 views

Is this FizzBuzz Swift-y?

...
6
votes
2answers
98 views

Is this a correct use of using protocols and delegate pattern in Swift?

I am trying to grasp the concept of delegates and protocols in Swift. So I have implemented my own PlayableMedia protocol with two concrete classes ...
10
votes
1answer
104 views

Swift string multiplication

I like Ruby's string multiplication so I thought I'd see if I could do it in Swift. I came up with these implementations: ...
7
votes
0answers
81 views

Storing global styles and utilizing them throughout view controllers

Assuming an app has many display styles, fonts, colors, etc., and that we never want to hardcode values, I've created an AppVariables object that houses properties ...
6
votes
1answer
126 views

RSS feed parser

I've just started learning Swift. I started with an example of RSS feed parser. I have a wrapper class written in Objective-C which converted the XML response into ...