<div dir="ltr">In Swift 2.1 its possible to do the following:<div><br></div><div>
<p class=""><span class="">if</span><span class=""> </span><span class="">let</span><span class=""> </span><span class="">_</span><span class=""> = userInfo[</span><span class="">"msgIdenitifer"</span><span class="">] </span><span class="">where</span><span class=""> application.</span><span class="">applicationState</span><span class=""> == .</span><span class="">Active</span><span class=""> {</span></p>
<p class="">//Do something</p>
<p class=""><span class=""> }</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">But not:</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">switch(userInfo)</span></p><p class=""><span class="">{</span></p><p class=""><span class="">case </span><span class="">let</span><span class=""> </span><span class="">_</span><span class=""> = userInfo[</span><span class="">"msgIdenitifer"</span><span class="">] </span><span class="">where</span><span class=""> application.</span><span class="">applicationState</span><span class=""> == .</span><span class="">Active:</span></p><p class=""><span class="">//do something</span></p><p class=""><span class="">break</span></p><p class=""><span class="">}</span></p><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">
<p><b><font color="#cc0000">___________________________________</font></b></p><p><b>James⎥Lead Engineer</b></p><p><b><font color="#cc0000"><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a>⎥<a href="http://supmenow.com" target="_blank">supmenow.com</a></font></b></p><p><b><font size="2">Sup</font></b></p><p><b><font size="2">Runway East
</font></b></p><p><b><font size="2">10 Finsbury Square</font></b></p><p><b><font size="2">London</font></b></p><p><b><font size="2">
EC2A 1AF </font></b></p></div></div></div></div></div>
</div></div>