-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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 내부에서 함수를 override할 수 있는지 설명하시오. #23
Labels
Swift
Swift CS 개념 공부
Comments
Extension 내부에서 함수를 override할 수 있는지 설명하시오.
📝 참고 사이트 |
Extension 내부에서 함수를 override가 가능할까
import UIKit
extension UINavigationController {
open override var shouldAutorate: Bool {
return true
}
open override func viewDidLoad() {
super.viewDidLoad()
}
}
참조 |
Extension 내부에서 함수를 override 할 수 없다.
Extension 내부에서 함수를 override 할 수 있는 경우(지양)
출처 |
Extension 내부에서 함수를 override할 수 있는지 설명하시오
extension 내부에서 override를 지양하는 것이 권장된다.extension은 말 그대로 '기능의 수평적 확장'인데 override를 한다는 것은 '확장'이 아닌 '덮어쒸움'에 가깝기 때문에 '수직적인 확장'이라 할 수 있으며, 이는 '수평적인 확장'에 반한다. 📝 참고 사이트 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: