func printFonts() {
println("--- Installed fonts ---")
let families = sorted(UIFont.familyNames() as! [String]) { $0 < $1 }
for family in families {
println("family: \(family)")
let fonts = UIFont.fontNamesForFamilyName(family)
for font in fonts {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Can currently do this | |
func titleForSection1(section: Int) -> String? { | |
switch section { | |
case 0: return "Foo" | |
case 1: return "Bar" | |
default: return nil | |
} | |
} | |
// But I want to do this to remove the redundant returns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I rarely use make, probably a better way to do some/all of this? | |
SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk | |
SOURCES=main.swift | |
EXECUTABLE=main | |
all: | |
swiftc -sdk $(SDK) $(SOURCES) -o $(EXECUTABLE) | |
clean: |
OlderNewer