<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>KishikawaKatsumi</author_name>
  <author_url>https://blog.hatena.ne.jp/KishikawaKatsumi/</author_url>
  <blog_title>24/7 twenty-four seven</blog_title>
  <blog_url>https://blog.kishikawakatsumi.com/</blog_url>
  <categories>
    <anon>iPhone</anon>
    <anon>Objective-C</anon>
  </categories>
  <description>↓ 例えばこんなふうに UIImageView に 'Aspect Fit' を指定して表示させたときの領域を知りたいことってありますよね。 がんばって計算してもいいのですが、AVFoundation.framework の次の関数で簡単に取得できます。 CGRect AVMakeRectWithAspectRatioInsideRect(CGSize aspectRatio, CGRect boundingRect); ドキュメントによると、ムービーを CALayer に表示するときに領域にフィットさせるのに便利ということですが、画像に使っても便利です。 上記の画像だと UIImageVie…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.kishikawakatsumi.com%2Fentry%2F20130524%2F1369329430&quot; title=&quot;UIImageView で &amp;#39;Aspect Fit (UIViewContentModeScaleAspectFit)&amp;#39; を指定したときの画像サイズを取得する - 24/7 twenty-four seven&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>http://cdn-ak.f.st-hatena.com/images/fotolife/K/KishikawaKatsumi/20130524/20130524020123.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-05-24 02:17:10</published>
  <title>UIImageView で 'Aspect Fit (UIViewContentModeScaleAspectFit)' を指定したときの画像サイズを取得する</title>
  <type>rich</type>
  <url>https://blog.kishikawakatsumi.com/entry/20130524/1369329430</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
