func takeScreenshot(view: UIView) -> UIImageView {
UIGraphicsBeginImageContext(view.frame.size)
view.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)
return UIImageView(image: image)
}
| |
Thursday, 27 April 2017
screen shot
Subscribe to:
Post Comments (Atom)
Remove bottom line in navigation bar
navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default ) navigat...
-
--> Use this line for getting device name UIDevice.current.name ------------------------------------------------------------------...
-
For Label: labelname.attributedText = NSAttributedString(string: "text " , attributes: [NSUnderlineStyleAttribut...
-
// Reading data from Local Json file instead of Service urls using Alamofire in swift3 func getwordmeaningdata() { ...
No comments:
Post a Comment