> Design Patterns > State > State Design Pattern In Objective C

State Design Pattern In Objective C

State design pattern in Objective C to change the behavior of object based on current state of object.


State design pattern In Objective C

Output

ConcreteStateA::Handle()
Inside Context::State .. State Changed
ConcreteStateB::Handle()
Inside Context::State .. State Changed


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books C In Depth, Data Structures Through C In Depth. He has 18+ years experience in industry and worked on architecture and design of multiple products. This article State Design Pattern In Objective C is from his Design Patterns course.