swift - got error on xcode7... I can't use 'new()' on xcode7? -


the error said 'new()' unavailable swift::use object initializers instead. don't know how fix...

   func showimage(notif:nsnotification) {     if let userinfo = notif.userinfo nsdictionary! {           //the code below 1 got error         let photos:nsmutablearray = nsmutablearray.new()          let photo:idmphoto = idmphoto(image: userinfo["img"] as! uiimage!)         photos.addobject(photo)         let browser:idmphotobrowser = idmphotobrowser(photos: photos [anyobject]!)         browser.delegate = self         browser.displayactionbutton = false         self.presentviewcontroller(browser, animated: true, completion: nil)     } } 

simply change nsmutablearray.new() nsmutablearray().


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -