Skip to content

Instantly share code, notes, and snippets.

View crespoxiao's full-sized avatar

Chengfei Xiao crespoxiao

View GitHub Profile
@crespoxiao
crespoxiao / gist:d39b31eb96afcd03e6ab7adfa67dcc2c
Created April 21, 2017 10:28 — forked from floriankugler/gist:6870499
Mapping of NSURLConnection to NSURLSession delegate methods. Created by Mattt Thompson.
NSURLConnection | NSURLSession
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connectionShouldUseCredentialStorage: |
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler:
| N
@crespoxiao
crespoxiao / gist:0a4519fbf0efd68161d6
Last active February 10, 2017 03:03 — forked from alexandreraulin/gist:f4b1504aec9d25f5af08
Script for iOS Universal Framework compilation with Xcode 6
# This script is based on Jacob Van Order's answer on apple dev forums https://devforums.apple.com/message/971277
# See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start
# To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework
# Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate
######################
# Options
@crespoxiao
crespoxiao / gist:a4fbd45d2368f20bb4d8
Last active February 10, 2017 03:04 — forked from kwylez/gist:5301597
Custom UIViewTransition Example
- (void)transitionFromViewController:(UIViewController *)fromViewController
toViewController:(UIViewController *)toViewController
withAnimationType:(EPBUIViewAnimationTransition)animation
fromFrame:(CGRect)aFrame
withOverLayImage:(NSString *)overlayName {
static NSInteger standardImageTag = 9999;
if (fromViewController == toViewController) {
return;
@interface ApplicationDelegate<UIApplicationDelegate>
@end
@implementation ApplicationDelegate
- (RACSignal *)rac_registeredForRemoteNotifications {
RACSignal *signal = objc_getAssociatedObject(self, _cmd);
if (signal != nil) return signal;
RACSignal *didRegisterForRemoteNotification = [[self rac_signalForSelector: @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:) fromProtocol: @protocol(UIApplicationDelegate)] map: ^(RACTuple *tuple) {
return tuple.second;
var githubList = [
{
name:'系统基础库',
list: [
{name:'Category/Util',
list: [
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'},
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'},
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'},
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_hd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_sd_intermediate_swift.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/403xxksrj0qs8c0/403/403_intermediate_swift.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_hd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_sd_advanced_graphics_and_animation_performance.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/419xxli6f60a6bs/419/419_advanced_graphics_and_animation_performance.pdf?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_sd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/236xxwk3fv82sx2/236/236_hd_building_interruptible_and_responsive_interactions.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2
//http://blog.xcodev.com/archives/send-sms-via-iphone-baseband/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
@implementation NSString(UCS2Encoding)
//http://blog.xcodev.com/archives/access-iphone-simcard-contacts-via-baseband/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
//UCS2编码支持
@implementation NSString(UCS2Encoding)
@crespoxiao
crespoxiao / baseband
Last active August 29, 2015 13:57 — forked from shenqiliang/baseband
//http://blog.xcodev.com/archives/iphone-baseband-intro/
#import <Foundation/Foundation.h>
#import <termios.h>
#import <time.h>
#import <sys/ioctl.h>
NSString *sendATCommand(NSFileHandle *baseBand, NSString *atCommand){
NSLog(@"SEND AT: %@", atCommand);