Skip to content

Instantly share code, notes, and snippets.

@matsuyoro
Created July 9, 2015 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsuyoro/f8cced238dee521f747c to your computer and use it in GitHub Desktop.
Save matsuyoro/f8cced238dee521f747c to your computer and use it in GitHub Desktop.
swift NSURLをstringで手軽に作る ref: http://qiita.com/matsuyoro/items/991d06d407fffa70bd4d
// アプリバージョンをStringで
let version: String! = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as? String
// 指定URLと文字連結
var myUrlStr:String = "http://hooogeee.com?v=" + version
// NSURL型に変換するなら
var myUrl:NSURL = NSURL(string:myUrlStr)!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment