Learn Swift Fundamentals by preparing for Job Interview, Questions 76 ~ 78 For Advanced OOP
I have a lot more to say about today’s topic, but I’ve picked out the most important ones. Enjoy the questions!
76) What is Abstraction? How to achieve it?
- Abstraction is the process of hiding unnecessary functionality and exposing necessary functionality.
- Abstraction can be achieved using Access Specifiers.
77) Does swift support multiple inheritances?
- No, Use protocols to achieve Multiple Inheritance.
78) How to call a method with some delay?
- self.perform(#selector(methodName), with nil, afterDelay: 5.0)