This file contains hidden or 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
// Hello, fellow Swift programmer! | |
// | |
// Here's a demonstration of a few ways of cleaning up the unwrapping of | |
// optionals in Swift. | |
// | |
// Swift is known to have both OO and functional background. Thus, there is | |
// probably some middle ground programming style that is *more* functional than | |
// Objective-C, and probably less so than Haskell. This playground tries to | |
// compare their differences in the pretty common scenario of dealing with | |
// errors or missing input. |
This file contains hidden or 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
- (void)applicationDidBecomeActive:(UIApplication *)application { | |
... | |
// Initial Google analytics | |
[[GANTrackersharedTracker] startTrackerWithAccountID: | |
@"UA-xxxxxxxx-y"dispatchPeriod: | |
kGANDispatchPeriodSecdelegate:self]; | |
... | |
} |
This file contains hidden or 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
// | |
// Created by Michael Dippery on 1/12/2011. | |
// Copyright 2011 Michael Dippery. All rights reserved. | |
// | |
#import "FileTailer.h" | |
@implementation FileTailer | |
- (id)initWithPath:(NSString *)path refreshPeriod:(NSTimeInterval)aRefresh |