<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanaponchikidun</author_name>
  <author_url>https://blog.hatena.ne.jp/tanaponchikidun/</author_url>
  <blog_title>Object for cutie</blog_title>
  <blog_url>https://tanaponchikidun.hatenadiary.org/</blog_url>
  <categories>
    <anon>objective-c</anon>
  </categories>
  <description>コンビニエンスコンストラクタを実装する時はselfを使う。 (例1) User : NSObjectクラスを初期化するコンビニエンスコンストラクタ + (instancetype)userWithName:(NSString *)inName age:(NSInteger)inAge { // 悪い例 //return [[User alloc] initWithName:inName age:inAge]; // 良い例 return [[self alloc] initWithName:inName age:inAge]; } 悪い例でも動作はするが、 FreeUser : User等継承…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftanaponchikidun.hatenadiary.org%2Fentry%2F20130613%2F1371140443&quot; title=&quot;コンビニエンスコンストラクタの初期化にはselfを使う - Object for cutie&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>2013-06-13 01:20:43</published>
  <title>コンビニエンスコンストラクタの初期化にはselfを使う</title>
  <type>rich</type>
  <url>https://tanaponchikidun.hatenadiary.org/entry/20130613/1371140443</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
