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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -