Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hating swift

  1. chrono1081

    iOS Can someone please explain this Swift syntax to me (NSURL(string...) )

    Hi guys, I'm hung up on some Swift syntax that I'm not sure why it is the way it is: if let url = NSURL(string: "http://www.google.com")! I get that it has a ! because the init method returns an optional, but what is the "string: " for? Is it just an explicit parameter name? I was under the...