I am trying to create an array which elements are dictionaries which keys are strings and values are AnyObject. This is my code:
var informationOfRows: Array<Dictionary<String, AnyObject>> = [
["title": "Mis Promos", "icon": FontAwesome.Money, "segue": "myPromoSegue"],
["title": "Mis Marcas", "icon": FontAwesome.Briefcase, "segue": "myBrandSegue"],
["title": "Editar Perfil", "icon": FontAwesome.Edit, "segue": "editUserProfileSegue"],
["title": "Invitar Amigo", "icon": FontAwesome.EnvelopeO, "segue": "inviteFriendSegue"],
["title": "Quejas y Sugerencias", "icon": FontAwesome.LightbulbO, "segue": "suggestionSegue"]
]
However, I am getting an error message that states: Type of expression is ambiguous without more context.
How can I solve this issue?
Thanks in advance
P.S.: Fontawesome is a library which contains a bunch of icons.
FontAwesomehere?public enum FontAwesome: String.Stringis a value type, not object type, so it doesn't conform toAnyObject. Swift 1.2 gave a better error message than 2.0 on this. Change your dictionary to<String, Any>instead.