Skip to content

Instantly share code, notes, and snippets.

// 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;
//
// PrettyTextField.swift
//
//
// Created by Gurdeep Singh on 26/05/15.
// Copyright (c) 2015 AppInventiv. All rights reserved.
//
import UIKit
/// 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 {
[{
"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",
@Gurdeep0602
Gurdeep0602 / AppStoryboard.swift
Last active September 23, 2023 20:34
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
typedef enum : NSUInteger {
AppStoryboardMain = 0,
AppStoryboardDetail,
} AppStoryboardName;
#define kStoryboardArray @"Main", @"Detail", nil
#define storyboardString(enumVal) [[[NSArray alloc] initWithObjects:kStoryboardArray] objectAtIndex:enumVal]
import Foundation
import SwiftyJSON
enum AppUserDefaults {
enum Key : String {
case Name
case Age
//
// AppFonts.swift
// AppFonts
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit