Sha256: c902c7d1091b949fcea2fd7e62c7569178087e1438a4e1091a36b7528be842c6
Contents?: true
Size: 459 Bytes
Versions: 7
Compression:
Stored size: 459 Bytes
Contents
class NSData # converts NSData into an NSString using any encoding, default is UTF8 # @return [NSString] def nsstring(encoding=nil) if encoding NSString.stringWithCString(self.bytes, encoding:encoding) else NSString.stringWithUTF8String(self.bytes) end end # @return [UIImage] def uiimage(scale=nil) if scale UIImage.imageWithData(self, scale:scale) else UIImage.imageWithData(self) end end end
Version data entries
7 entries across 7 versions & 1 rubygems