1:簡單的將Ui更新相關的操作封裝到 ViewController中,在MainActivity中只需要調(diào)用相應的方法。2:自定義接口的回調(diào),將接口定義在ViewController內(nèi)部類中,具體代碼如下: