Group network operations in one swift file - iOS -
i developing ios app in swift consumes rest services (nsurlsession, nsurlrequest) in view controllers.
i'd group operations in 1 swift class. class has methods such post, get, etc. found makes impossible (to me) update ui using response results calls in async mode. me have use nsurlsession in each view controller. result there duplicate code scattered in view controllers.
i curious how guys handle it?
have tried afnetworking or restkit? both rest services.
afnetworking can make asynchronous requests , handle data synchronously.
restkit, based on afnetworking, made restful web services clients , provides great utils. check out!
Comments
Post a Comment