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
// | |
// AppFonts.swift | |
// AppFonts | |
// | |
// Created by Gurdeep on 15/12/16. | |
// Copyright © 2016 Gurdeep. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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 SwiftyJSON | |
enum AppUserDefaults { | |
enum Key : String { | |
case Name | |
case Age |
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
typedef enum : NSUInteger { | |
AppStoryboardMain = 0, | |
AppStoryboardDetail, | |
} AppStoryboardName; | |
#define kStoryboardArray @"Main", @"Detail", nil | |
#define storyboardString(enumVal) [[[NSArray alloc] initWithObjects:kStoryboardArray] objectAtIndex:enumVal] |
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
// | |
// AppStoryboards.swift | |
// AppStoryboards | |
// | |
// Created by Gurdeep on 15/12/16. | |
// Copyright © 2016 Gurdeep. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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
[{ | |
"tmsId": "MV000009840000", | |
"rootId": "629", | |
"subType": "Feature Film", | |
"title": "Monty Python and the Holy Grail", | |
"releaseYear": 1975, | |
"releaseDate": "1975-04-01", | |
"titleLang": "en", | |
"descriptionLang": "en", | |
"entityType": "Movie", |
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
/// Cast the argument to the infered function return type. | |
func autocast<T>(some: Any) -> T? { | |
return some as? T | |
} | |
protocol Foo { | |
static func foo() -> Self | |
} | |
class Vehicle: Foo { |
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
// | |
// PrettyTextField.swift | |
// | |
// | |
// Created by Gurdeep Singh on 26/05/15. | |
// Copyright (c) 2015 AppInventiv. All rights reserved. | |
// | |
import UIKit |
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
// UIWindow+AppSwitchScrollStopper.h | |
// Created by Tim Johnsen on 3/27/16. | |
#import <UIKit/UIKit.h> | |
@interface UIWindow (AppSwitchScrollStopper) | |
/// Call this early on in your app's lifecycle to avoid | |
/// scroll-related flashing when your app resumes from the background | |
- (void)installAppSwitchScrollStopper; |