ios - Non UIViewController Class in Swift -



ios - Non UIViewController Class in Swift -

i m new ios.

i want know how create non uiviewcontroller based class. mean class not extending uiviewcontroller.

i want because want phone call async http url , parse json/xml in non ui class. want them in separate class uiviewcontroller classs.

please help me

create new class without inheritance this:

class jsonobject{ var url: nsurl? internal func parsejson() -> nsarray { // code parse json homecoming [] } }

and can create instance of class elsewhere using this:

var newjsonobject: jsonobject = jsonobject() newjsonobject.url = nsurl(string: "www.somejson.php") newjsonobject.parsejson()

ios class swift uiviewcontroller

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -