[swift-evolution] Unable to do unnamed binding in swift

Adrian Kashivskyy adrian.kashivskyy at me.com
Mon Feb 8 05:06:55 CST 2016


How can you switch a dictionary?

Regards,
Adrian Kashivskyy
Senior iOS Developer at Netguru

> Wiadomość napisana przez James Campbell via swift-evolution <swift-evolution at swift.org> w dniu 08.02.2016, o godz. 12:01:
> 
> In Swift 2.1 its possible to do the following:
> 
> if let _ = userInfo["msgIdenitifer"] where application.applicationState == .Active {
> 
> //Do something
> 
>  }
> 
> 
> 
> But not:
> 
> 
> 
> switch(userInfo)
> 
> {
> 
> case let _ = userInfo["msgIdenitifer"] where application.applicationState == .Active:
> 
> //do something
> 
> break
> 
> }
> 
> ___________________________________
> 
> James⎥Lead Engineer
> 
> james at supmenow.com <mailto:james at supmenow.com>⎥supmenow.com <http://supmenow.com/>
> Sup
> 
> Runway East
> 
> 
> 10 Finsbury Square
> 
> London
> 
> 
> EC2A 1AF 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160208/c4895cd4/attachment.html>


More information about the swift-evolution mailing list