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 -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -