We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extension UIViewController { class func swizzleMethod() { let origin = #selector(viewWillAppear) let change = #selector(changeViewWillAppear) guard let originMethhod = class_getInstanceMethod(UIViewController.self, origin), let changeMethod = class_getInstanceMethod(UIViewController.self, change) else { print("함수를 찾을 수 없거나 오류 발생") return } method_exchangeImplementations(originMethhod, changeMethod) } @objc func changeViewWillAppear() { print("Change ViewWillAppear SUCCEED") } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Method swizzling
The text was updated successfully, but these errors were encountered: