Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
iOS で純粋な JS コード (外部フレームワークなし) を使用して JS ネイティブ ブリッジを作成する方法は知っていますが、Backbone.js を使用すると何かが変わるのでしょうか? はいの場合、誰か説明してください。
これらの行に沿って何かを使用できます:
yourBackboneObject.on('all', function(eventName) { var args = Array.prototype.slice.call(arguments); args.shift(); NativeBridge.call(eventName, args); });
そしてオブジェクトで:
this.trigger('someiOSfunction', someArg, someOtherArg);