ios - How to architect 'State Controller' objects being delegates of shared services -


i have uiviewcontroller conforms 'massive view controller' anti-pattern. trying break functionality out 'state controller' objects act controllers each state viewcontroller might in. question regarding services multiple states might need listen to. example 1 state might 'videorecordingstate' , has reference 'filesystem' object owned uiviewcontroller. when recording stops 'videorecordingstate' replaced 'videoreviewstate'. both states interested in listening 'filewritecompleted' event 'filesystem', , file write started 1 state might complete after has been replaced state. so, each state become delegate of 'service' object , swaps out when state changes, or make more sense uiviewcontroller delegate of service , pass notification on current state? or whole design plain wrong begin with?


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -