Created
December 21, 2016 16:00
-
-
Save DonMag/6977e2c8cce00af69d6996932ead02b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in Today2ViewController... | |
| // add this func.... | |
| func shareEvent(event:EKEvent) -> Void { | |
| let cView = ShareEventView.init(frame: CGRect(x: 0, y: 0, width: 600, height: 200)) | |
| cView.lblDate.text = "Your format.... \(event.startDate)" | |
| cView.lblTitle.text = event.title | |
| cView.lblOther.text = event.calendar.title | |
| let snap2 = cView.takeSnapshot() | |
| self.shareCell("textImage", image: snap2, event: event) | |
| } | |
| //--- in tableView didSelectRow, change | |
| dispatch_async(dispatch_get_main_queue()) {() -> Void in | |
| self.shareEvent(event) | |
| // let ccl = tableView.cellForRowAtIndexPath(indexPath) | |
| // if let snap1 = ccl?.takeSnapshot() { | |
| // self.shareCell("textImage", image: snap1, event: event) | |
| // } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment