<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>umadash</author_name>
  <author_url>https://blog.hatena.ne.jp/umadash/</author_url>
  <blog_title>エンジニアうまの日記</blog_title>
  <blog_url>https://umadash.hatenadiary.jp/</blog_url>
  <categories>
  </categories>
  <description>Swift2.0でも当然シングルトンが書きたい。 [環境]iOS SDK 9.0, Xcode7.0.1 シングルトンの書き方 参考: http://krakendev.io/blog/the-right-way-to-write-a-singleton class Singleton { static let sharedInstance = Singleton() private init() {} } 検証 初期化メソッドのinitがprivateになっているので、クラス内でしかインスタンスが生成できません。 以下のようにインスタンスを生成すると、当然警告が出て作れません。 let si…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fumadash.hatenadiary.jp%2Fentry%2F2015%2F10%2F17%2F215642&quot; title=&quot;Swiftでシングルトン - エンジニアうまの日記&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>2015-10-17 21:56:42</published>
  <title>Swiftでシングルトン</title>
  <type>rich</type>
  <url>https://umadash.hatenadiary.jp/entry/2015/10/17/215642</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
