I want to add a overlay text like "Company watermark" on captured video or image programatically in swift. any help will be appreciated.
Asked
Active
Viewed 2,079 times
3
-
Try [this](http://stackoverflow.com/questions/7205820/iphone-watermark-on-recorded-video) for video. – Nikhil Manapure Nov 30 '16 at 10:08
1 Answers
1
// create text Layer
let titleLayer = CATextLayer()
titleLayer.backgroundColor = UIColor.whiteColor().CGColor
titleLayer.string = "Company watermark"
titleLayer.font = UIFont(name: "Helvetica", size: 28)
titleLayer.shadowOpacity = 0.5
titleLayer.alignmentMode = kCAAlignmentCenter
titleLayer.frame = CGRectMake(0, 50, size.width, size.height / 6)
yourView.layer.addSublayer(titleLayer)
Hope it will help you for adding text in video.

Amrit Tiwari
- 922
- 7
- 21