|
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...
-
I have had luck by disconnecting my iPhone from my mac, and then Analyzing (Shift + Command + B or Product -> Analyze). After that I ...
-
--> Use this line for getting device name UIDevice.current.name ------------------------------------------------------------------...
-
let twoDecimalPlaces = String ( format : "%.2f" , 10.426123 )
No comments:
Post a Comment