In Xcode 6 beta 7, I cannot put UIImage in AnyObject Array:
var objects = [pizzaImage.image, title, ingredients.text]
error: Cannot convert the expression type 'Array' to type 'ArrayLiteralConvertible
no problem in beta 6
EDIT is the complete code, tried everything but no luck:
var objects = [pizzaImage.image!, title, ingredients.text!]] var act = UIActivityViewController(activityItems: objects, applicationActivities: nil) self.presentViewController(act, animated: true, completion: nil)
Enlil source share