Swift example using local data (NSUserDefaults)