Skip to content

Commit 5f2b96b

Browse files
committed
swizzleAllViewController移动到load方法中去
1 parent cc4befd commit 5f2b96b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Coding_iOS/Util/OC_Category/UIViewController+Swizzle.m

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ - (void)goBack_Swizzle
6868
{
6969
[self.navigationController popViewControllerAnimated:YES];
7070
}
71+
72+
+ (void)load{
73+
swizzleAllViewController();
74+
}
7175
@end
7276

7377
void swizzleAllViewController()

Coding_iOS/main.m

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ int main(int argc, char * argv[])
1515
{
1616

1717
@autoreleasepool {
18-
swizzleAllViewController();
1918
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
2019
}
2120
}

0 commit comments

Comments
 (0)