Skip to content

Instantly share code, notes, and snippets.

View iiiyu's full-sized avatar
🐢
step by step

Ewan Xiao iiiyu

🐢
step by step
View GitHub Profile
@iiiyu
iiiyu / Podfile
Created November 7, 2014 09:17
打码 Podfile
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/xxxx/Specs.git'
inhibit_all_warnings!
def common_pods
pod 'AFNetworking', '~> 2.4.1'
pod 'MagicalRecord', '~> 2.2'
pod 'NSDate-SIUtilities', :git => 'https://github.com/iiiyu/NSDate-SIUtilities.git', :commit => '4b4bf1aa9f686bfd324bfa031edfe2df4a310b03'
pod 'Underscore.m', '~> 0.2.1'
@iiiyu
iiiyu / gist:6110935
Created July 30, 2013 07:21
运行时候获得属性的名称
- (NSString *) nameWithInstance:(id)instance
{
unsigned int numIvars = 0;
NSString *key=nil;
Ivar * ivars = class_copyIvarList([self class], &numIvars);
for(int i = 0; i < numIvars; i++) {
Ivar thisIvar = ivars[i];
const char *type = ivar_getTypeEncoding(thisIvar);
NSString *stringType = [NSString stringWithCString:type encoding:NSUTF8StringEncoding];
if (![stringType hasPrefix:@"@"]) {
# Uncrustify 0.59
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
@iiiyu
iiiyu / NSString+Version.m
Created June 25, 2012 06:23
NSString+Version
//
// NSString+Version.m
// FAW-VW
//
// Created by ChenYu Xiao on 12-6-25.
// Copyright (c) 2012年 Sumi Interactive. All rights reserved.
//
#import "NSString+Version.h"