Can we create dynamic classes in objective c? If yes, explain how to create with a valid use case?



Can we create dynamic classes in objective c? If yes, explain how to create with a valid use case?..

Answer / Atif

Yes, we can create dynamic classes in Objective-C using runtime functionality. To do this, we can allocate memory for the class structure and set the isa pointer of the allocated structure to the metaclass of the superclass. A common use case would be creating subclasses at runtime based on user preferences or data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

How do you write an objective statement?

1 Answers  


Is c++ objective c?

1 Answers  


What is a delegation protocol?

1 Answers  


Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?

1 Answers  


What is difference between method and constructor?

1 Answers  


What are the different types of protocols?

1 Answers  


How would I make a static strategy?

1 Answers  


Can I write some c++ function in same .m file?

1 Answers  


Is there function overloading in objective-c?

1 Answers  


What is difference between c and objective c?

1 Answers  


Does objective c have garbage collection?

1 Answers  


How do I create an objective c class in xcode?

1 Answers  


Categories