My Book
-
Recent Posts
Archives
- January 2019
- May 2017
- April 2017
- January 2017
- November 2016
- October 2016
- July 2016
- June 2016
- May 2016
- April 2016
- February 2016
- December 2015
- November 2015
- April 2015
- March 2015
- November 2014
- September 2014
- July 2014
- June 2014
- January 2014
- November 2013
- October 2013
- September 2013
- June 2013
- March 2013
- January 2013
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- November 2011
- October 2011
- July 2011
- May 2011
- April 2011
- January 2011
- November 2010
- October 2010
- September 2010
Categories
- Android
- Auto Layout
- Books
- CocoaTouch
- Debugging
- Genetic Algorithms
- Interface Builder
- iOS 6
- iOS Programming for .NET Developers
- iOS7
- iOS8
- Jobs
- MacBook Pro
- MonoTouch
- Networking
- Objective-C
- Streaming Media
- Sustainable Coding
- Swift
- Thoughts
- Tic-tac-toe
- Tips and Tricks
- Two Letters
- UICollectionView
- UITableView
- Uncategorized
- User Experience
- XCode 3
- Xcode 4
Meta
Monthly Archives: June 2014
Understanding Swift’s reduce Method
Swift’s API includes many functions and instance methods that reflect its functional programming heritage. A prime example is called reduce. You can reduce a collection of values down to just one value, such as calculating the sum of every person’s age in an array of … Continue reading
Create a Swift Dictionary from an Array
Here is a Gist I posted showing a Swift utility function that enables you to create a Dictionary containing an optional entry for every element in an Array. It uses the reduce function to create one Dictionary from every element in … Continue reading
Cross-join two Swift arrays
Here is a Gist I just published on GitHub of a utility function that performs a cross-join between two Swift arrays. This allows you to iterate over one array for every element in another array, and return an optional value built for … Continue reading
Randomly shuffle a Swift array
I just posted a Gist on GitHub that shows how to add a shuffle method to Swift’s Array class, which randomizes the order of an array’s elements. My shuffle method relies on the arc4random function, which means that the file containing that extension … Continue reading
Swift Case Study: Histograms
This article examines a program written in Swift that creates text-based histogram renderings. The purpose of this case study is to show how such a program can leverage features found in the initial pre-release version of Swift. The Xcode 6 project … Continue reading
Posted in Swift
2 Comments
Instantiating Classes by Name in Swift
This article demonstrates how to create a Swift class instance based solely on the class name and possibly an argument for its initializer method. It relies on Objective-C interop to perform the actual object creation, which is hidden behind a generic … Continue reading
Ruminations on Swift
It’s been awhile since I have found anything worth blogging about in the iOS development world. The first day of WWDC 2014 changed all that. Had Apple only announced their new programming language, Swift, that would have been enough to … Continue reading
Posted in Swift
13 Comments