This file contains 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
func takeScreenshot(view: UIView) -> UIImageView { | |
UIGraphicsBeginImageContext(view.frame.size) | |
view.layer.renderInContext(UIGraphicsGetCurrentContext()) | |
let image = UIGraphicsGetImageFromCurrentImageContext() | |
UIGraphicsEndImageContext() | |
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) | |
return UIImageView(image: image) | |
} |
This file contains 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
// | |
// NetworkEndpoint.swift | |
// Medinternet | |
// | |
// Created by VAndrJ on 6/10/18. | |
// Copyright © 2018 VAndrJ. All rights reserved. | |
// | |
import Foundation |