iphone中的Finite状态机

iphone中的Finite状态机,iphone,ios5,ios6,nsxmlparser,state-machine,Iphone,Ios5,Ios6,Nsxmlparser,State Machine,我想将应用程序开发为基于状态机的概念,但我不知道状态机方法。我有以下代码作为xml格式,如何解析这个或任何教程都是可用的 <scxml initial="idle" name="atm.connRestored" version="0.9" xmlns="http://www.w3.org/2005/07/scxml"> <state id="idle"> <transition event="atm.connected" target="loading">

我想将应用程序开发为基于状态机的概念,但我不知道状态机方法。我有以下代码作为xml格式,如何解析这个或任何教程都是可用的

<scxml initial="idle" name="atm.connRestored" version="0.9" xmlns="http://www.w3.org/2005/07/scxml">
<state id="idle">  
<transition event="atm.connected" target="loading"></transition>
</state>
<state id="loading">
    <transition event="atm.loadSuccess" target="inService"></transition>
    <transition event="atm.connClosed" target="disconnected"></transition>
    <transition event="atm.loadFail" target="outOfService"></transition>
</state>
<state id="inService"> 
   <transition event="atm.shutdown" target="outOfService"</transition>
   <transition event="atm.connLost" target="disconnected"></transition>
</state>
<state id="outOfService">
   <transition event="atm.startup" target="inService"></transition>
   <transition event="atm.connLost" target="disconnected"></transition>
</state>
<state id="disconnected">
   <transition event="atm.connRestored" target="inService"></transition>
</state>
</scxml>

我也在急切地等待答案通过这个链接可能会有帮助通过这个链接可能会有帮助这是怎么投票4次的?显示了研究成果…?@NickBull你知道答案吗?