通过Reactivecocoa绑定UISwitch到NSUserDefault

前端之家收集整理的这篇文章主要介绍了通过Reactivecocoa绑定UISwitch到NSUserDefault前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
RACChannelTerminal *switchTerminal = self.someSwitchrac_newOnChannel; defaultsTerminal [[NSUserDefaults standardUserDefaults] rac_channelTerminalForKey:@"someBoolKey"];[switchTerminal subscribe:defaultsTerminaldefaultsTerminal subscribeswitchTerminal];
参考:
http://stackoverflow.com/questions/23107136/bind-uiswitchs-state-to-nsuserdefaults-with-reactivecocoa

猜你在找的React相关文章