You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func testCallback(){letexpert=expectation(description:"Example")lettodo=AVObject(className:"SwiftTodo")todo["foo"]="bar"
todo.save().onExecuted(completion:{(object)in
expert.fulfill()}){(error)inXCTFail("Expected getSandwiches to succeed, but it failed. ?")}waitForExpectations(timeout:10, handler:nil)}
This is the reason why Swift is much better than Objective-C and Java, of course , Rx concept gives another magic point of view to migrate from traditional callback.
The text was updated successfully, but these errors were encountered:
利用 extension 机制对 Observable 对象进行拓展
使用传统回调方式的代码
The text was updated successfully, but these errors were encountered: