<?xml version="1.0" encoding="UTF-8"?>
<article>
  <body>Objective-C&#12391;Method&#12398;IMP&#12434;&#21462;&#24471;&#12375;&#12390;&#21628;&#12403;&#20986;&#12377;&#22580;&#21512;&#12395;&#12289;
&#27491;&#12375;&#12356;&#38306;&#25968;&#12503;&#12525;&#12488;&#12479;&#12452;&#12503;&#12398;&#38306;&#25968;&#12509;&#12452;&#12531;&#12479;&#12395;&#12461;&#12515;&#12473;&#12488;&#12377;&#12427;&#24517;&#35201;&#12364;&#12354;&#12426;&#12414;&#12377;&#12364;&#12289;
typedef&#12394;&#12393;&#12434;&#20351;&#12431;&#12378;&#12395;&#12381;&#12398;&#22580;&#12391;&#30446;&#30340;&#12398;&#38306;&#25968;&#12509;&#12452;&#12531;&#12479;&#22411;&#12395;&#12461;&#12515;&#12473;&#12488;
&#12377;&#12427;&#26041;&#27861;&#12434;&#32057;&#20171;&#12375;&#12414;&#12377;&#12290;

objective-c&gt;&gt;
SEL selector = @selector(drawRect:);
Method method = class_getInstanceMethod([UISearchBar class], selector);
IMP drawRect = method_getImplementation(method);
((void(*)(id, SEL, CGRect))drawRect)(self, selector, rect);
&lt;&lt;--

&#12371;&#12435;&#12394;&#24863;&#12376;&#12395;&#12377;&#12428;&#12400;Ok&#12391;&#12377;&#12290;</body>
  <cached-tag-list>objective-c memo tips</cached-tag-list>
  <comments-count type="integer">0</comments-count>
  <created-at type="datetime">2008-11-13T01:15:40+00:00</created-at>
  <daily-archive-id type="integer">874</daily-archive-id>
  <filter-type>blue_stole</filter-type>
  <id type="integer">1027</id>
  <monthly-archive-id type="integer">109</monthly-archive-id>
  <pdf-digest nil="true"></pdf-digest>
  <permalink nil="true"></permalink>
  <published-at type="datetime">2008-11-13T01:12:00+00:00</published-at>
  <secret>152f4915-ccba-4051-98f1-392dfa810c39</secret>
  <title>&#12381;&#12398;&#22580;&#12391;&#38306;&#25968;&#12509;&#12452;&#12531;&#12479;&#22411;&#12395;&#12461;&#12515;&#12473;&#12488;&#12377;&#12427;&#26041;&#27861;</title>
  <updated-at type="datetime">2008-11-13T01:15:40+00:00</updated-at>
  <user-id type="integer">1</user-id>
</article>
