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
http://devstreaming.apple.com/videos/wwdc/2014/102xxw2o82y78a4/102/102_platforms_state_of_the_union.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/201xx2xfazhzce8/201/201_advanced_topics_in_internationalization.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/202xx3ane09vxdz/202/202_whats_new_in_cocoa_touch.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/203xxh9oqtm0piw/203/203_introducing_healthkit.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/204xxhe1lli87dm/204/204_whats_new_in_cocoa.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/205xxqzduadzo14/205/205_creating_extensions_for_ios_and_os_x,_part_1.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/206xxdiurnffagr/206/206_introducing_the_modern_webkit_api.pdf?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2014/207xx270npvffao/207/207_accessibility_on_os_x.pdf?dl=1 |
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
import UIKit | |
extension UICollectionReusableView { | |
/// The default implementation of `defaultIdentifier()` uses `NSStringFromClass(class)` rather than `String(class)` so that the module name is includded. | |
/// The hope being that this makes collisions unlikely making it unnnecessary to provide your own implementations. | |
public class func defaultIdentifier() -> String { | |
return NSStringFromClass(self) | |
} | |
} |
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
public struct PairwiseIterator<T>: IteratorProtocol { | |
private var iterator: AnyIterator<T> | |
private var lastElement: T? | |
public init(_ iterator: AnyIterator<T>) { | |
self.iterator = iterator | |
self.lastElement = self.iterator.next() | |
} | |
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
- (void)didMoveToParentViewController:(UIViewController *)parent | |
{ | |
[super didMoveToParentViewController:parent]; | |
if ([parent isKindOfClass:[UIPageViewController class]]) { | |
UIScrollView *scrollView; | |
for (UIView *view in parent.view.subviews) { | |
if ([view isKindOfClass:[UIScrollView class]]) { | |
scrollView = (UIScrollView *)view; | |
} |
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
# Xcode sets up its own PATH variable so we want to ensure that it includes /usr/local/bin | |
PATH=$PATH:/usr/local/bin | |
# Check that mogenerator is available | |
command -v mogenerator >/dev/null 2>&1 || { echo >&2 "You need mogenerator but it's not installed. To install using homebrew use 'brew install mogenerator'. Aborting."; exit 1; } | |
# Change the working dir to where our models are | |
cd "${SRCROOT}"/Models | |
# Only run mogenerator if the access time for ResultsCache.xcdatamodeld is newer than our lock file |
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
# Xcode sets up its own PATH variable so we want to ensure that it includes /usr/local/bin | |
PATH=$PATH:/usr/local/bin | |
# Check that mogenerator is available | |
command -v mogenerator >/dev/null 2>&1 || { echo >&2 "You need mogenerator but it's not installed. To install using homebrew use 'brew install mogenerator'. Aborting."; exit 1; } | |
# Change the working dir to where our models are | |
cd "${SRCROOT}"/Models | |
# Only run mogenerator if the access time for ResultsCache.xcdatamodeld is newer than our lock file |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
func anyCommonElements <T, U where T: Sequence, U: Sequence, T.GeneratorType.Element: Equatable, T.GeneratorType.Element == U.GeneratorType.Element> (lhs: T, rhs: U) -> Bool { | |
for lhsItem in lhs { | |
for rhsItem in rhs { | |
if lhsItem == rhsItem { | |
return true | |
} | |
} | |
} | |
return false | |
} |
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
import Foundation | |
import ObjectMapper | |
class Person: Mappable { | |
var name: String? | |
var spouse: Person? | |
required init?(_ map: Map) { | |
} |
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
// | |
// NSObject+SMDictionaryMapping.h | |
// SoundTrack | |
// | |
// Created by Paddy O'Brien on 12-04-24. | |
// Copyright (c) 2012 Paddy O'Brien. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
NewerOlder