void __cdecl
-
[DetailViewController viewDidLoad](DetailViewController
*
self
, SEL a2)
{
/
/
定义变量
DetailViewController
*
v2;
/
/
x19
void
*
v3;
/
/
x0
__int64 v4;
/
/
x21
void
*
v5;
/
/
x0
void
*
v6;
/
/
x22
__int64 v7;
/
/
x1
__int64 v8;
/
/
x2
__int64 v9;
/
/
x3
void
*
v10;
/
/
x0
void
*
v11;
/
/
x21
void
*
v12;
/
/
x0
__int64 v13;
/
/
x22
void
*
v14;
/
/
x0
void
*
v15;
/
/
x24
void
*
v16;
/
/
x0
void
*
v17;
/
/
x24
void
*
v18;
/
/
x0
__int64 v19;
/
/
x23
void
*
v20;
/
/
x0
void
*
v21;
/
/
x19
DetailViewController
*
v22;
/
/
[xsp
+
0h
] [xbp
-
60h
]
__objc2_class
*
v23;
/
/
[xsp
+
8h
] [xbp
-
58h
]
v2
=
self
;
v22
=
self
;
v23
=
&OBJC_CLASS___DetailViewController;
/
/
[
super
viewDidLoad];
objc_msgSendSuper2(&v22,
"viewDidLoad"
,
self
, &OBJC_CLASS___DetailViewController);
/
/
v3
=
[UIColor whiteColor];
v3
=
objc_msgSend(&OBJC_CLASS___UIColor,
"whiteColor"
);
/
/
v4
=
v3;
v4
=
objc_retainAutoreleasedReturnValue(v3);
/
/
v5
=
self
.view; 或 v5
=
[
self
view];
v5
=
objc_msgSend(v2,
"view"
);
/
/
v6
=
v5;
v6
=
(void
*
)objc_retainAutoreleasedReturnValue(v5);
/
/
[v6 setBackgroundColor:v4];
objc_msgSend(v6,
"setBackgroundColor:"
, v4);
/
/
内存释放
objc_release(v6);
objc_release(v4);
/
/
创建UILabel对象 v10
=
[UILabel alloc];
v10
=
(void
*
)objc_alloc(&OBJC_CLASS___UILabel, v7, v8, v9);
/
/
初始化 v11
=
[v10 init];
v11
=
objc_msgSend(v10,
"init"
);
/
/
设置坐标 [v11 setFrame:CGRect(x, y ,width, height)]; 有些伪代码会造成误解,看不明白时,切到汇编看看
objc_msgSend(v11,
"setFrame:"
,
0.0
);
/
/
[v11 setText:@
"这是详情页"
];
objc_msgSend(v11,
"setText:"
, CFSTR(
"这是详情页"
));
/
/
v12
=
[UIColor redColor];
v12
=
objc_msgSend(&OBJC_CLASS___UIColor,
"redColor"
);
/
/
v13
=
v12;
v13
=
objc_retainAutoreleasedReturnValue(v12);
/
/
给label设置颜色 [v11 setTextColor:v13];
objc_msgSend(v11,
"setTextColor:"
, v13);
/
/
以后遇到这种,直接忽略
objc_release(v13);
/
/
v14
=
[
self
view];
v14
=
objc_msgSend(v2,
"view"
);
/
/
v15
=
v14;
v15
=
(void
*
)objc_retainAutoreleasedReturnValue(v14);
/
/
[v15 addSubview:v11]; 将label添加到当前页面
objc_msgSend(v15,
"addSubview:"
, v11);
objc_release(v15);
/
/
v16
=
[UIButton buttonWithType:
0
];
v16
=
objc_msgSend(&OBJC_CLASS___UIButton,
"buttonWithType:"
,
0LL
);
/
/
v17
=
v16;
v17
=
(void
*
)objc_retainAutoreleasedReturnValue(v16);
/
/
[v17 setFrame:CGRect(x, y, width, height)];
objc_msgSend(v17,
"setFrame:"
,
0.0
,
150.0
,
80.0
,
40.0
);
/
/
[v17 setTitle:@
"登录"
forState:
0
]; 给按钮设置标题
objc_msgSend(v17,
"setTitle:forState:"
, CFSTR(
"登录"
),
0LL
);
/
/
v18
=
[UIColor blackColor];
v18
=
objc_msgSend(&OBJC_CLASS___UIColor,
"blackColor"
);
/
/
v19
=
v18;
v19
=
objc_retainAutoreleasedReturnValue(v18);
/
/
[v17 setTitleColor:v19 forState:
0
]; 给按钮的标题设置颜色
objc_msgSend(v17,
"setTitleColor:forState:"
, v19,
0LL
);
objc_release(v19);
/
/
给按钮添加一个方法,点击时会触发
/
/
[v17 addTarget:
self
action:@SEL(loginButtonDidClick:) forControlEvents: click];
objc_msgSend(v17,
"addTarget:action:forControlEvents:"
, v2,
"loginButtonDidClick:"
,
64LL
);
/
/
v20
=
self
.view 当前控制器的视图
v20
=
objc_msgSend(v2,
"view"
);
/
/
v21
=
v20;
v21
=
(void
*
)objc_retainAutoreleasedReturnValue(v20);
/
/
[v21 addSubview:v17];
objc_msgSend(v21,
"addSubview:"
, v17);
objc_release(v21);
objc_release(v17);
objc_release(v11);
}