TNResourceMaster

public class TNResourceMaster : NSObject

Class to load resources from framework’s bundle

  • Returns a Dictionary or Array object initialized by reading the content of Plist file from resources with given name.

    Declaration

    Swift

    public class func objectFromPlistWithName(_ name: String, inBundle bundle: Bundle) -> AnyObject?

    Parameters

    name

    The name of the plist file.

    inBundle

    Bundle where plist is stored

    Return Value

    A Dictionary or Array object initialized by reading the content of file from resources or nil if the file could not be located..

  • Returns a data object initialized by reading the file from resources with given name and extension.

    Declaration

    Swift

    public class func dataFromFileWithName(_ name: String, ofType type: String, inBundle bundle: Bundle) -> Data?

    Parameters

    name

    The name of the resource file.

    type

    The extension of file.

    bundle

    Bundle where file is stored.

    Return Value

    A data object initialized by reading the file from resources or nil if the file could not be located..

  • Returns a string object initialized by reading the content of file from resources with given name and extension.

    Declaration

    Swift

    public class func stringFromFileWithName(_ name: String, ofType type: String, inBundle bundle: Bundle) -> String?

    Parameters

    name

    The name of the resource file.

    type

    The extension of file.

    bundle

    Bundle where file is stored.

    Return Value

    A strign object initialized by reading the content of file from resources or nil if the file could not be located..