How mainBundle() return on object in swift or objective-c? -
i reading book related ios development. , facing problem when reading line let bundle = nsbundle.mainbundle(). book told
this call returns bundle object represents our application.
i know, in swift object created let objname = classname() . please tell how let bundle = nsbundle.mainbundle() create object?
this call not create (instanciate) new object. calls mainbundle class method on nsbundle class, returns singleton, main bundle of app.
similar calls (in obj-c, translatable in swift easily):
[uiapplication sharedapplication][nsnotificationcenter defautcenter]
Comments
Post a Comment