Code-free
Code-free

Swift 3 Open Source

Early Christmas Present

Russ Bishop
December 03, 2015

You may have heard already but Swift is now open source! As of 9:09 AM PST the site is still choking under heavy load but the associated github repos are now public.

Grabbing the source:

Run brew install cmake ninja. Create a main directory to hold all the associated repos, then clone:

git clone git@github.com:/apple/swift.git swift  git  . . .

Read More

UITouchType.Stylus

Supporting the Pencil

Russ Bishop
November 19, 2015

I'm happy to finally be able to share what I've been working on: supporting the Apple Pencil.

In this post I want to cover the basics of supporting UITouchType.Stylus, some conveniences to make it easier to support iOS 8 and iOS 9.0, and a hole in the current processing of events in iOS that can make supporting the Pencil tricky (plus . . .

Read More

Shoot the Heap

Leaks is a filthy liar

Russ Bishop
November 05, 2015

Fall Cleaning

This is a blog post I started many months ago and never got around to finishing; please forgive any outdated screenshots or references. The core ideas are still relevant so I'm gonna go ahead and post it. The bug in UIKit that confused Leaks into missing the cycle was supposedly fixed but a good Software Engineer should . . .

Read More

Objective-C Generics

A small detour

Russ Bishop
November 04, 2015

In Xcode 7 Clang learned a new trick: Objective-C generics. Now that I've started using this feature in our legacy code I can't live without it. Even without Swift interop consequences I would still use it.

The What

Objective-C can now declare that an NSArray is an NSArray<NSString *>. This helps on the Objective-C side by . . .

Read More

Swift 2.1 Beta 3

Russ Bishop
October 07, 2015

Another day, another Xcode beta.

IDE & Playgrounds

  • You can now set Swift Error breakpoints, including restricting the breakpoint to specific error types.
  • The in-playground API has been revamped. XCPlaygroundPage.currentPage now grants a reference to the current page.
  • The playground live view support has been enhanced. Types can adopt . . .

Read More

Swift 2.1

Russ Bishop
September 23, 2015

If you thought Apple was slowing down with Swift, think again. Xcode 7.1 Beta 2 includes Swift 2.1. As always you can check the release notes for yourself because I don't necessarily address everything here.

Interop & Types

  • Enums imported from C automatically conform to Equatable so now they work in pattern matching switch statements . . .

Read More

Swift 2: Beta 6

Russ Bishop
August 26, 2015

Some highlights from Beta 6:

Compiler & Tools

  • A new try? keyword has been added. This attempts an operation that may throw (fail). If it succeeds the result is wrapped in an optional. If it fails the error is ignored and nil is returned. This seems like a pragmatic compromise but I have to imagine someone lost a battle somewhere because . . .

Read More

Archive
  Subscribe by Email and Never Miss a Post