<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Iganin</author_name>
  <author_url>https://blog.hatena.ne.jp/Iganin/</author_url>
  <blog_title>Iganinのブログ</blog_title>
  <blog_url>https://iganin.hatenablog.com/</blog_url>
  <categories>
    <anon>iOS</anon>
    <anon>UIKit</anon>
    <anon>技術</anon>
    <anon>Swift</anon>
  </categories>
  <description>はじめに UIViewをUIImageに変換するというよくあるやつです。 今だとこのやり方が良いのではないかというのが見つかったのでメモがてら記載します。 環境設定 以下の環境を使用しています。 Xcode 11.4.1 Swift 5.2 内容 いかに作成したextensionメソッドを記載します。 UIGraphicsImageRendererを使用することでシンプルに書くことができます。 public extension UIView { func convertToImage() -&gt; UIImage { let imageRenderer = UIGraphicsImageRende…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Figanin.hatenablog.com%2Fentry%2F2020%2F05%2F11%2F070950&quot; title=&quot;【iOS】UIViewをUIImageに変換する - Iganinのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-05-11 07:09:50</published>
  <title>【iOS】UIViewをUIImageに変換する</title>
  <type>rich</type>
  <url>https://iganin.hatenablog.com/entry/2020/05/11/070950</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
