Skip to content

Instantly share code, notes, and snippets.

View youngshook's full-sized avatar
🐝
Working

YoungShook youngshook

🐝
Working
View GitHub Profile
@youngshook
youngshook / UINavigationController+PopGesture.m
Created August 2, 2014 15:13
Custom leftBarButtonItem and interactivePopGestureRecognizer Freeze
#import <objc/runtime.h>
@implementation UINavigationController (PopGesture)
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = [self class];
// When swizzling a class method, use the following:
@youngshook
youngshook / abc_ downloader.sh
Created August 20, 2014 08:09
Apple resources downloader tool
#!/bin/sh
# ADC downloader tool
#
# Usage:
# adc_download.sh [download URL]
#
# Michael Tyson, A Tasty Pixel <[email protected]>
#
# Multi-team support via Christopher Bowns (@cbowns, http://cbowns.com/)
@youngshook
youngshook / generate_localizable.sh
Created August 20, 2014 14:21
Generate Localizable.strings Automatically with Xcode Build Phases
find Classes -name "*.m" -print0 | xargs -0 genstrings -o Resources
@youngshook
youngshook / DYDB.h
Created August 22, 2014 20:22 — forked from lvjian700/DYDB.h
#import <Foundation/Foundation.h>
#import <FMDB/FMDatabase.h>
@interface DYDB : NSObject {
}
@property(nonatomic, readonly) FMDatabase *database;
+ (DYDB *) sharedDB;
-(void)drawTimecodeUsingGCD
{
if( dispatch_semaphore_wait( _timecodeSemaphore, DISPATCH_TIME_NOW ) != 0 )
{
return;
}
dispatch_async( _timecodeQueue, ^()
{
float fontSize = ceilf( self.scrubberSize * 0.425f );
//
// UILabel+MultiLineSupport.h
// giffgaffIOS
//
// Created by Nigel Barber on 23/10/2013.
// Copyright (c) 2013 confidence. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// UILabel+MultiLineSupport.h
// giffgaffIOS
//
// Created by Nigel Barber on 23/10/2013.
// Copyright (c) 2013 confidence. All rights reserved.
//
#import <UIKit/UIKit.h>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@youngshook
youngshook / UITextView+Helper.m
Created October 4, 2014 15:21
Get UITextView measureHeight
@interface UITextView (Helper)
- (CGFloat)measureHeight;
@end
#import "UITextView+Helper.h"
@implementation UITextView (Helper)
@youngshook
youngshook / Podfile
Last active August 29, 2015 14:07
Podfile template
workspace 'XXX.xcworkspace'
xcodeproj 'XXX.xcodeproj'
platform :ios, '7.0'
# 非UI第三方依赖
target 'XXXModel' do
xcodeproj 'iMealModel/iMealModel.xcodeproj'
pod 'AVOSCloud', '~> 2.5.8.1'
pod 'ReactiveCocoa', '~> 2.3.1'
pod 'FLEX', '~> 1.0.0'
end