I have a control which takes an array of dictionaries to construct it's UI
(as a distinct method).

Now I'd like to add a notification to supply the data as well. I'd like to
pass the data as userInfo.

When constructing the observer method, how do I constuct?

func weHaveData(notification:NSNoticiation){
   let dict = notification.userInfo as Array<Dictionary<String,String>>
   control.loadData(dict)
}

*Can't convert value of type [NSObject:AnyObject]? to
Array<Dictionary<String,String>> in coercion*

I've tried without the cast. Is there an easy work around?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to