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
Post a Comment