iOS runtime應(yīng)用總結(jié)

一些公用類:

@interface CustomClass : NSObject

- (void) fun1;

@end

@implementation CustomClass

- (void) fun1

{

NSLog(@"fun1");

}

@end

@interface TestClass : NSObject

@end

@implementation TestClass

@end

別忘記引入庫:#include <objc/runtime.h>

1函卒、對(duì)象拷貝:id object_copy(id obj, size_t size)

- (void) copyObj

{

CustomClass *obj = [CustomClassnew];

NSLog(@"%p", &obj);

id objTest = object_copy(obj,sizeof(obj));

NSLog(@"%p", &objTest);

[objTest fun1];

}

打印結(jié)果:

2013-07-26 15:35:11.547 HighOC[6859:c07] 0xbfffdf64

2013-07-26 15:35:11.547 HighOC[6859:c07] 0xbfffdf60

2013-07-26 15:35:11.547 HighOC[6859:c07] fun1

說明:

object_copy 函數(shù)實(shí)現(xiàn)了對(duì)象的拷貝算吩。

2膜蠢、對(duì)象釋放 id object_dispose(id obj)

- (void) objectDispose

{

CustomClass *obj = [CustomClassnew];

object_dispose(obj);

[obj release];

[obj fun1];

}

打印結(jié)果:程序crash

malloc: *** error for object 0x758e6d0: pointer being freed was not allocated

3、更改對(duì)象的類/獲取對(duì)象的類

Class object_setClass(id obj, Class cls)? /? ? Class object_getClass(id obj)

- (void) setClassTest

{

CustomClass *obj = [CustomClassnew];

[obj fun1];

Class aClass =object_setClass(obj, [CustomClassOtherclass]);

//obj 對(duì)象的類被更改了? ? swap the isa to an isa

NSLog(@"aClass:%@",NSStringFromClass(aClass));

NSLog(@"obj class:%@",NSStringFromClass([objclass]));

[obj fun2];

}

- (void) getClassTest

{

CustomClass *obj = [CustomClassnew];

Class aLogClass =object_getClass(obj);

NSLog(@"%@",NSStringFromClass(aLogClass));

}

4夜焦、獲取對(duì)象的類名? constchar *object_getClassName(id obj)

- (void) getClassName

{

CustomClass *obj = [CustomClassnew];

NSString *className = [NSStringstringWithCString:object_getClassName(obj)encoding:NSUTF8StringEncoding];

NSLog(@"className:%@", className);

}

5、給一個(gè)類添加方法

BOOL class_addMethod(Class cls,SEL name,IMP imp,? ? const char *types)

/**

* 一個(gè)參數(shù)

*

*/

int cfunction(id self, SEL _cmd, NSString *str) {

NSLog(@"%@", str);

return10;//隨便返回個(gè)值

}

- (void) oneParam {

TestClass *instance = [[TestClassalloc]init];

//? ? 方法添加

class_addMethod([TestClassclass],@selector(ocMethod:), (IMP)cfunction,"i@:@");

if ([instance respondsToSelector:@selector(ocMethod:)]) {

NSLog(@"Yes, instance respondsToSelector:@selector(ocMethod:)");

} else

{

NSLog(@"Sorry");

}

int a = (int)[instanceocMethod:@"我是一個(gè)OC的method,C函數(shù)實(shí)現(xiàn)"];

NSLog(@"a:%d", a);

}

/**

* 兩個(gè)參數(shù)

*

*/

int cfunctionA(id self, SEL _cmd, NSString *str, NSString *str1) {

NSLog(@"%@-%@", str, str1);

return20;//隨便返回個(gè)值

}

- (void) twoParam {

TestClass *instance = [[TestClassalloc]init];

class_addMethod([TestClassclass],@selector(ocMethodA::), (IMP)cfunctionA,"i@:@@");

if ([instance respondsToSelector:@selector(ocMethodA::)]) {

NSLog(@"Yes, instance respondsToSelector:@selector(ocMethodA::)");

} else

{

NSLog(@"Sorry");

}

int a = (int)[instanceocMethodA:@"我是一個(gè)OC的method激捏,C函數(shù)實(shí)現(xiàn)" :@"-----我是第二個(gè)參數(shù)"];

NSLog(@"a:%d", a);

}

相關(guān)文檔及說明:

Obj-C的方法(method)就是一個(gè)至少需要兩個(gè)參數(shù)(self,_cmd)的C函數(shù)

IMP有點(diǎn)類似函數(shù)指針煮盼,指向具體的Method實(shí)現(xiàn)短纵。

向一個(gè)類動(dòng)態(tài)添加方法

BOOL class_addMethod(Class cls, SEL name, IMP imp, const char *types)

參數(shù)說明:

cls:被添加方法的類

name:可以理解為方法名

imp:實(shí)現(xiàn)這個(gè)方法的函數(shù)

types:一個(gè)定義該函數(shù)返回值類型和參數(shù)類型的字符串

class_addMethod([TestClass class], @selector(ocMethod:), (IMP)testFunc, "i@:@");

其中types參數(shù)為"i@:@“,按順序分別表示:

i:返回值類型int僵控,若是v則表示void

@:參數(shù)id(self)

::SEL(_cmd)

@:id(str)

一些公用類:

@interface ClassCustomClass :NSObject{

NSString *varTest1;

NSString *varTest2;

NSString *varTest3;

}

@property (nonatomic,assign)NSString *varTest1;

@property (nonatomic,assign)NSString *varTest2;

@property (nonatomic,assign)NSString *varTest3;

- (void) fun1;

@end

@implementation ClassCustomClass

@synthesize varTest1, varTest2, varTest3;

- (void) fun1 {

NSLog(@"fun1");

}

@end

@interface ClassCustomClassOther :NSObject {

int varTest2;

}

- (void) fun2;

@end

@implementation ClassCustomClassOther

- (void) fun2 {

NSLog(@"fun2");

}

@end

@interface ClassPropertyViewCtr () {

float myFloat;

ClassCustomClass *allobj;

}

myFloat = 2.34f;

6香到、獲取一個(gè)類的所有方法:

- (void) getClassAllMethod

{

u_int count;

Method* methods= class_copyMethodList([UIViewController class], &count);

for (int i = 0; i < count ; i++)

{

SEL name = method_getName(methods[i]);

NSString *strName = [NSString stringWithCString:sel_getName(name)encoding:NSUTF8StringEncoding];

NSLog(@"%@",strName);

}

}

打印結(jié)果(部分):

2013-07-26 16:07:03.972 HighOC[7021:c07] _screen

2013-07-26 16:07:03.973 HighOC[7021:c07] applicationWillSuspend

2013-07-26 16:07:03.973 HighOC[7021:c07] _tryBecomeRootViewControllerInWindow:

2013-07-26 16:07:03.973 HighOC[7021:c07] isViewLoaded

2013-07-26 16:07:03.974 HighOC[7021:c07] view

......................

7、獲取一個(gè)類的所有屬性:

- (void) propertyNameList

{

u_int count;

objc_property_t *properties=class_copyPropertyList([UIViewControllerclass], &count);

for (int i = 0; i < count ; i++)

{

const char* propertyName =property_getName(properties[i]);

NSString *strName = [NSString stringWithCString:propertyNameencoding:NSUTF8StringEncoding];

NSLog(@"%@",strName);

}

}

打印結(jié)果(部分)

2013-07-26 16:09:42.182 HighOC[7041:c07] tabBarItem

2013-07-26 16:09:42.184 HighOC[7041:c07] tabBarController

2013-07-26 16:09:42.185 HighOC[7041:c07] splitViewController

2013-07-26 16:09:42.186 HighOC[7041:c07] navigationItem

2013-07-26 16:09:42.186 HighOC[7041:c07] hidesBottomBarWhenPushed

...............

8报破、獲扔凭汀/設(shè)置類的屬性變量

//獲取全局變量的值? (myFloat 為類的一個(gè)屬性變量)

- (void) getInstanceVar {

float myFloatValue;

object_getInstanceVariable(self,"myFloat", (void*)&myFloatValue);

NSLog(@"%f", myFloatValue);

}

//設(shè)置全局變量的值

- (void) setInstanceVar {

float newValue = 10.00f;

unsigned int addr = (unsignedint)&newValue;

object_setInstanceVariable(self,"myFloat", *(float**)addr);

NSLog(@"%f", myFloat);

}

9、判斷類的某個(gè)屬性的類型

- (void) getVarType {

ClassCustomClass *obj = [ClassCustomClassnew];

Ivar var = class_getInstanceVariable(object_getClass(obj),"varTest1");

const char* typeEncoding =ivar_getTypeEncoding(var);

NSString *stringType =? [NSStringstringWithCString:typeEncodingencoding:NSUTF8StringEncoding];

if ([stringType hasPrefix:@"@"]) {

// handle class case

NSLog(@"handle class case");

} else if ([stringTypehasPrefix:@"i"]) {

// handle int case

NSLog(@"handle int case");

} else if ([stringTypehasPrefix:@"f"]) {

// handle float case

NSLog(@"handle float case");

} else

{

}

}

10充易、通過屬性的值來獲取其屬性的名字(反射機(jī)制)

- (NSString *)nameOfInstance:(id)instance

{

unsigned int numIvars =0;

NSString *key=nil;

//Describes the instance variables declared by a class.

Ivar * ivars = class_copyIvarList([ClassCustomClassclass], &numIvars);

for(int i = 0; i < numIvars; i++) {

Ivar thisIvar = ivars[i];

const char *type =ivar_getTypeEncoding(thisIvar);

NSString *stringType =? [NSStringstringWithCString:typeencoding:NSUTF8StringEncoding];

//不是class就跳過

if (![stringType hasPrefix:@"@"]) {

continue;

}

//Reads the value of an instance variable in an object. object_getIvar這個(gè)方法中梗脾,當(dāng)遇到非objective-c對(duì)象時(shí),并直接crash

if ((object_getIvar(allobj, thisIvar) == instance)) {

// Returns the name of an instance variable.

key = [NSStringstringWithUTF8String:ivar_getName(thisIvar)];

break;

}

}

free(ivars);

return key;

}

測(cè)試代碼:

allobj = [ClassCustomClassnew];

allobj.varTest1 =@"varTest1String";

allobj.varTest2 =@"varTest2String";

allobj.varTest3 =@"varTest3String";

NSString *str = [selfnameOfInstance:@"varTest1String"];

NSLog(@"str:%@", str);

打印結(jié)果:

str:varTest1

11盹靴、系統(tǒng)類的方法實(shí)現(xiàn)部分替換

- (void) methodExchange {

Method m1 = class_getInstanceMethod([NSStringclass],@selector(lowercaseString));

Method m2 = class_getInstanceMethod([NSStringclass],@selector(uppercaseString));

method_exchangeImplementations(m1, m2);

NSLog(@"%@", [@"sssAAAAss"lowercaseString]);

NSLog(@"%@", [@"sssAAAAss"uppercaseString]);

}

打印結(jié)果:(仔細(xì)看log)

2013-07-26 16:33:22.776 HighOC[7104:c07] SSSAAAASS

2013-07-26 16:33:22.778 HighOC[7104:c07] sssaaaass

12炸茧、自定義類的方法實(shí)現(xiàn)部分替換

- (void) justLog1 {

NSLog(@"justLog1");

}

- (void) justLog2 {

NSLog(@"justLog2");

}

- (void) methodSetImplementation {

Method method = class_getInstanceMethod([ClassMethodViewCtrclass],@selector(justLog1));

IMP originalImp = method_getImplementation(method);

Method m1 = class_getInstanceMethod([ClassMethodViewCtrclass],@selector(justLog2));

method_setImplementation(m1, originalImp);

}

//[self methodSetImplementation];

//[self justLog2];

13、覆蓋系統(tǒng)方法

IMP cFuncPointer;

IMP cFuncPointer1;

IMP cFuncPointer2;

NSString* CustomUppercaseString(idself,SEL_cmd){

printf("真正起作用的是本函數(shù)CustomUppercaseString\r\n");

NSString *string = cFuncPointer(self,_cmd);

return string;

}

NSArray* CustomComponentsSeparatedByString(idself,SEL_cmd,NSString *str){

printf("真正起作用的是本函數(shù)CustomIsEqualToString\r\n");

return cFuncPointer1(self,_cmd, str);

}

//不起作用稿静,求解釋

bool CustomIsEqualToString(idself,SEL_cmd,NSString *str) {

printf("真正起作用的是本函數(shù)CustomIsEqualToString\r\n");

return cFuncPointer2(self,_cmd, str);

}

- (void) replaceMethod{

cFuncPointer = [NSStringinstanceMethodForSelector:@selector(uppercaseString)];

class_replaceMethod([NSStringclass],@selector(uppercaseString), (IMP)CustomUppercaseString,"@@:");

cFuncPointer1 = [NSStringinstanceMethodForSelector:@selector(componentsSeparatedByString:)];

class_replaceMethod([NSStringclass],@selector(componentsSeparatedByString:), (IMP)CustomComponentsSeparatedByString,"@@:@");

cFuncPointer2 = [NSStringinstanceMethodForSelector:@selector(isEqualToString:)];

class_replaceMethod([NSStringclass],@selector(isEqualToString:), (IMP)CustomIsEqualToString,"B@:@");

}

14梭冠、自動(dòng)序列化(轉(zhuǎn))

#import "NSObject+AutoEncodeDecode.h"

@implementation NSObject (AutoEncodeDecode)

- (void)encodeWithCoder:(NSCoder *)encoder {

Class cls = [selfclass];

while (cls != [NSObjectclass]) {

unsigned int numberOfIvars =0;

Ivar* ivars = class_copyIvarList(cls, &numberOfIvars);

for(const Ivar* p = ivars; p < ivars+numberOfIvars; p++){

Ivar const ivar = *p;

const char *type =ivar_getTypeEncoding(ivar);

NSString *key = [NSStringstringWithUTF8String:ivar_getName(ivar)];

id value = [selfvalueForKey:key];

if (value) {

switch (type[0]) {

case _C_STRUCT_B: {

NSUInteger ivarSize =0;

NSUInteger ivarAlignment =0;

NSGetSizeAndAlignment(type, &ivarSize, &ivarAlignment);

NSData *data = [NSDatadataWithBytes:(constchar *)self + ivar_getOffset(ivar)

length:ivarSize];

[encoder encodeObject:dataforKey:key];

}

break;

default:

[encoder encodeObject:value

forKey:key];

break;

}

}

}

free(ivars);

cls = class_getSuperclass(cls);

}

}

- (id)initWithCoder:(NSCoder *)decoder {

self = [self init];

if (self) {

Class cls = [selfclass];

while (cls != [NSObjectclass]) {

unsigned int numberOfIvars =0;

Ivar* ivars = class_copyIvarList(cls, &numberOfIvars);

for(constIvar* p = ivars; p < ivars+numberOfIvars; p++){

Ivar const ivar = *p;

const char *type =ivar_getTypeEncoding(ivar);

NSString *key = [NSStringstringWithUTF8String:ivar_getName(ivar)];

id value = [decoder decodeObjectForKey:key];

if (value) {

switch (type[0]) {

case _C_STRUCT_B: {

NSUInteger ivarSize =0;

NSUInteger ivarAlignment =0;

NSGetSizeAndAlignment(type, &ivarSize, &ivarAlignment);

NSData *data = [decoderdecodeObjectForKey:key];

char *sourceIvarLocation = (char*)self+ivar_getOffset(ivar);

[data getBytes:sourceIvarLocationlength:ivarSize];

}

break;

default:

[self setValue:[decoder decodeObjectForKey:key]

forKey:key];

break;

}

}

}

free(ivars);

cls = class_getSuperclass(cls);

}

}

return self;

}

用C代替OC:#import#import#importextern int UIApplicationMain (int argc,char *argv[],void *principalClassName,void *delegateClassName);

struct Rect {

float x;

float y;

float width;

float height;

};

typedef struct Rect Rect;

void *navController;

static int numberOfRows =100;

int tableView_numberOfRowsInSection(void *receiver,structobjc_selector *selector, void *tblview,int section) {

returnnumberOfRows;

}

void *tableView_cellForRowAtIndexPath(void *receiver,structobjc_selector *selector, void *tblview,void *indexPath) {

Class TableViewCell = (Class)objc_getClass("UITableViewCell");

void *cell = class_createInstance(TableViewCell,0);

objc_msgSend(cell, sel_registerName("init"));

char buffer[7];

int row = (int) objc_msgSend(indexPath, sel_registerName("row"));

sprintf (buffer, "Row %d", row);

void *label =objc_msgSend(objc_getClass("NSString"),sel_registerName("stringWithUTF8String:"),buffer);

objc_msgSend(cell, sel_registerName("setText:"),label);

return cell;

}

void tableView_didSelectRowAtIndexPath(void *receiver,structobjc_selector *selector, void *tblview,void *indexPath) {

Class ViewController = (Class)objc_getClass("UIViewController");

void * vc = class_createInstance(ViewController,0);

objc_msgSend(vc, sel_registerName("init"));

char buffer[8];

int row = (int) objc_msgSend(indexPath, sel_registerName("row"));

sprintf (buffer, "Item %d", row);

void *label =objc_msgSend(objc_getClass("NSString"),sel_registerName("stringWithUTF8String:"),buffer);

objc_msgSend(vc, sel_registerName("setTitle:"),label);

objc_msgSend(navController,sel_registerName("pushViewController:animated:"),vc,1);

}

void *createDataSource() {

Class superclass = (Class)objc_getClass("NSObject");

Class DataSource = objc_allocateClassPair(superclass,"DataSource",0);

class_addMethod(DataSource,sel_registerName("tableView:numberOfRowsInSection:"), (void(*))tableView_numberOfRowsInSection,nil);

class_addMethod(DataSource,sel_registerName("tableView:cellForRowAtIndexPath:"), (void(*))tableView_cellForRowAtIndexPath,nil);

objc_registerClassPair(DataSource);

returnclass_createInstance(DataSource,0);

}

void * createDelegate() {

Class superclass = (Class)objc_getClass("NSObject");

Class DataSource = objc_allocateClassPair(superclass,"Delegate",0);

class_addMethod(DataSource,sel_registerName("tableView:didSelectRowAtIndexPath:"), (void(*))tableView_didSelectRowAtIndexPath,nil);

objc_registerClassPair(DataSource);

returnclass_createInstance(DataSource,0);

}

void applicationdidFinishLaunching(void *receiver,structobjc_selector *selector, void *application) {

Class windowClass = (Class)objc_getClass("UIWindow");

void * windowInstance = class_createInstance(windowClass, 0);

objc_msgSend(windowInstance, sel_registerName("initWithFrame:"),(Rect){0,0,320,480});

//Make Key and Visiable

objc_msgSend(windowInstance,sel_registerName("makeKeyAndVisible"));

//Create Table View

Class TableViewController = (Class)objc_getClass("UITableViewController");

void *tableViewController = class_createInstance(TableViewController, 0);

objc_msgSend(tableViewController, sel_registerName("init"));

void *tableView = objc_msgSend(tableViewController,sel_registerName("tableView"));

objc_msgSend(tableView, sel_registerName("setDataSource:"),createDataSource());

objc_msgSend(tableView, sel_registerName("setDelegate:"),createDelegate());

Class NavController = (Class)objc_getClass("UINavigationController");

navController = class_createInstance(NavController,0);

objc_msgSend(navController,sel_registerName("initWithRootViewController:"),tableViewController);

void *view =objc_msgSend(navController,sel_registerName("view"));

//Add Table View To Window

objc_msgSend(windowInstance, sel_registerName("addSubview:"),view);

}

//Create an class named "AppDelegate", and return it's name as an instance of class NSString

void *createAppDelegate() {

Class mySubclass = objc_allocateClassPair((Class)objc_getClass("NSObject"),"AppDelegate",0);

structobjc_selector *selName =sel_registerName("application:didFinishLaunchingWithOptions:");

class_addMethod(mySubclass, selName, (void(*))applicationdidFinishLaunching,nil);

objc_registerClassPair(mySubclass);

returnobjc_msgSend(objc_getClass("NSString"),sel_registerName("stringWithUTF8String:"),"AppDelegate");

}

int main(int argc, char *argv[]) {

returnUIApplicationMain(argc, argv,0,createAppDelegate());

}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市改备,隨后出現(xiàn)的幾起案子控漠,更是在濱河造成了極大的恐慌,老刑警劉巖绍妨,帶你破解...
    沈念sama閱讀 211,743評(píng)論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件润脸,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡他去,警方通過查閱死者的電腦和手機(jī)毙驯,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,296評(píng)論 3 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來灾测,“玉大人爆价,你說我怎么就攤上這事∠碧拢” “怎么了铭段?”我有些...
    開封第一講書人閱讀 157,285評(píng)論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長秦爆。 經(jīng)常有香客問我序愚,道長,這世上最難降的妖魔是什么等限? 我笑而不...
    開封第一講書人閱讀 56,485評(píng)論 1 283
  • 正文 為了忘掉前任爸吮,我火速辦了婚禮芬膝,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘形娇。我一直安慰自己锰霜,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,581評(píng)論 6 386
  • 文/花漫 我一把揭開白布桐早。 她就那樣靜靜地躺著癣缅,像睡著了一般。 火紅的嫁衣襯著肌膚如雪哄酝。 梳的紋絲不亂的頭發(fā)上友存,一...
    開封第一講書人閱讀 49,821評(píng)論 1 290
  • 那天,我揣著相機(jī)與錄音炫七,去河邊找鬼爬立。 笑死,一個(gè)胖子當(dāng)著我的面吹牛万哪,可吹牛的內(nèi)容都是我干的侠驯。 我是一名探鬼主播,決...
    沈念sama閱讀 38,960評(píng)論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼奕巍,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼吟策!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起的止,我...
    開封第一講書人閱讀 37,719評(píng)論 0 266
  • 序言:老撾萬榮一對(duì)情侶失蹤檩坚,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后诅福,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體匾委,經(jīng)...
    沈念sama閱讀 44,186評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,516評(píng)論 2 327
  • 正文 我和宋清朗相戀三年氓润,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了赂乐。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,650評(píng)論 1 340
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡咖气,死狀恐怖挨措,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情崩溪,我是刑警寧澤浅役,帶...
    沈念sama閱讀 34,329評(píng)論 4 330
  • 正文 年R本政府宣布,位于F島的核電站伶唯,受9級(jí)特大地震影響觉既,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,936評(píng)論 3 313
  • 文/蒙蒙 一瞪讼、第九天 我趴在偏房一處隱蔽的房頂上張望岭参。 院中可真熱鬧,春花似錦尝艘、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,757評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至悬赏,卻和暖如春狡汉,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背闽颇。 一陣腳步聲響...
    開封第一講書人閱讀 31,991評(píng)論 1 266
  • 我被黑心中介騙來泰國打工盾戴, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人兵多。 一個(gè)月前我還...
    沈念sama閱讀 46,370評(píng)論 2 360
  • 正文 我出身青樓尖啡,卻偏偏與公主長得像,于是被迫代替她去往敵國和親剩膘。 傳聞我的和親對(duì)象是個(gè)殘疾皇子衅斩,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,527評(píng)論 2 349

推薦閱讀更多精彩內(nèi)容

  • 轉(zhuǎn)至元數(shù)據(jù)結(jié)尾創(chuàng)建: 董瀟偉,最新修改于: 十二月 23, 2016 轉(zhuǎn)至元數(shù)據(jù)起始第一章:isa和Class一....
    40c0490e5268閱讀 1,690評(píng)論 0 9
  • 我們常常會(huì)聽說 Objective-C 是一門動(dòng)態(tài)語言怠褐,那么這個(gè)「動(dòng)態(tài)」表現(xiàn)在哪呢畏梆?我想最主要的表現(xiàn)就是 Obje...
    Ethan_Struggle閱讀 2,182評(píng)論 0 7
  • 小時(shí)候性格內(nèi)向,交到的好朋友很少奈懒,每天上學(xué)放學(xué)都是獨(dú)自一人回家奠涌。 有一次放學(xué)被幾個(gè)壞孩子圍攻,零食和玩具被搶磷杏,我坐...
    Cc藝知豬閱讀 670評(píng)論 1 5
  • 網(wǎng)頁設(shè)計(jì)發(fā)展很快溜畅,它主要是跟著設(shè)計(jì)潮流以及Web技術(shù)一起演變。從純文字的網(wǎng)頁到FLASH茴丰、然后現(xiàn)在流行的HTML5...
    打豆豆閱讀 3,327評(píng)論 2 70
  • 下雨了达皿,才知道誰會(huì)給你送傘;遇事了贿肩,才知道誰對(duì)你真心峦椰。有些人,只會(huì)錦上添花汰规,不會(huì)雪中送炭汤功;有些人,只會(huì)火上澆油溜哮,不...
    羅掌柜real閱讀 132評(píng)論 0 0