//接收Double时间戳返回对应的Date类型 internal func timeStampToDate (timestamp: Double) -> NSDate { var date = NSDate(timeIntervalSince1970: timestamp) println("timeStampToDate:\(date)") return date } //根据色值返回颜色 class func UIColorFromrGB(rgbValue: UInt) -> UIColor { return UIColor( red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,blue: CGFloat(rgbValue & 0x0000FF) / 255.0,alpha: CGFloat(1.0) ) }