johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 566 forks source link

injection just call -(void)injected #249

Open zkhCreator opened 6 years ago

zkhCreator commented 6 years ago

I installed injectionIII, and ran a new project.When I press command + s, the method -(void)injected called, but viewdidload are not called.How can I reload all code?

johnno1962 commented 6 years ago

Have you added the required lines to AppDelegate.swift?

zkhCreator commented 6 years ago

I add load bundle in AppDelegate.m

johnno1962 commented 6 years ago

You have to code a call to viewDidLoad in your injected method.

zkhCreator commented 6 years ago

If the reason is it isn't support objc? And what can I do if I wan't to call viewWillAppear and viewDidAppear after viewDidload? Only call these method in injected method?