Skip to content

doRun ,is an elegant lightweight swift framework, multi-threaded network can be executed sequentially, refresh the UI after execution. Multi-level cycle operation.

License

Notifications You must be signed in to change notification settings

guo-pf/DoRun-master

Repository files navigation

DoRun

pod 'DoRun',’~> 0.0.4'

let doNow = DoNow()
 doNow.doRun("") { (classType,parameter,index) in 
   if sucess {
   //Perform some action, or send a value
     doNow.transfer(value: "")
   }else {
   //Jump to the main thread and send the value
     doNow.jumpToEnd(value: "")
   }
 }.doRunLoop(index: 10)          //Cycle to the previous step
 .doEnd("") { (classType, parameter, result) in  
  //Return to main thread Refresh UI
 }

or:

doNow.doRun(pams) { (classType,parameter,index) in
  if sucess {
  //Perform some action, or send a value
    doNow.transfer(value: "")
  }else {
  //Jump to the main thread and send the value
    doNow.jumpToEnd(value: "")
  }
}.doNext("") { (classType, parameter, result) in
 if sucess {
    doNow.transfer(value: "")
  }else {
    doNow.jumpToEnd(value: "")
  }
}.doNext("") { (classType, parameter, result) in
  if sucess {
    doNow.transfer(value: "")
  }else {
    doNow.jumpToEnd(value: "")
  }
}.doEnd(nil) { (classType, parameter, result) in
  //Return to main thread Refresh UI
}

About

doRun ,is an elegant lightweight swift framework, multi-threaded network can be executed sequentially, refresh the UI after execution. Multi-level cycle operation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published