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)scrollViewDidScroll:(UIScrollView *)scrollView { | |
| if (scrollView.contentOffset.y < 0) { | |
| UIView * firstCell = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; | |
| firstCell.frame = ({ | |
| CGRect frame = firstCell.frame; | |
| frame.origin.y = 0; | |
| [_tableView.superview convertRect:frame toView:firstCell.superview]; | |
| }); |
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
| static inline NSRange UBRShiftRange(NSRange range, NSRange replacedRange, NSUInteger insertedLength) { | |
| if (replacedRange.location > range.location + range.length) { | |
| // Following | |
| return range; | |
| } | |
| NSRange intersection = NSIntersectionRange(range, replacedRange); |
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
| require 'fileutils' | |
| path = ARGV[0] | |
| ok = 0 | |
| fail = 0 | |
| Dir.glob("#{path}/*.png", File::FNM_DOTMATCH) do |f| | |
| unless f.end_with? "@2x.png" | |
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
| <?php | |
| /*********************************************************************************************** | |
| * Tweetledee - Incredibly easy access to Twitter data | |
| * userrss.php -- User timeline results formatted as a RSS feed | |
| * Version: 0.3.0 | |
| * Copyright 2013 Christopher Simpkins | |
| * MIT License | |
| ************************************************************************************************/ | |
| /*----------------------------------------------------------------------------------------------- | |
| ==> Instructions: |
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
| override func shouldPerformSegueWithIdentifier(identifier: String!, sender: AnyObject!) -> Bool { | |
| let needsNavigationController = (splitViewController.traitCollection.horizontalSizeClass == .Regular) | |
| if identifier == "ShowDetail" && needsNavigationController { | |
| performSegueWithIdentifier("ShowDetailWithNavigationController", sender: sender) | |
| return false; | |
| } | |
| return super.shouldPerformSegueWithIdentifier(identifier, sender: sender) |
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
| override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) { | |
| var detailViewContoller: UIViewController? | |
| if (segue.identifier == "ShowDetail") { | |
| detailViewContoller = segue.destinationViewController as? UIViewController | |
| } else if (segue.identifier == "ShowDetailWithNavigationController") { | |
| let navigationController = segue.destinationViewController as UINavigationController | |
| detailViewContoller = navigationController.viewControllers[0] as? UIViewController | |
| } |
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
| import UIKit | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| let rootViewController = RootViewController() | |
| func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
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
| import UIKit | |
| // We define a APIResultType as something that can be generated from a JSON | |
| protocol APIResultType { | |
| init?(json: String) | |
| } |
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
| import Foundation | |
| class BaseClass : Equatable { | |
| var stringValue: String = "" | |
| } | |
| class SubClass : BaseClass { | |
| var intValue: Int = 0 | |
| } |
OlderNewer