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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -