<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.iOS%E3%81%AEUIView%E6%B4%BE%E7%94%9F%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7GestureRecognizer%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E3%81%A8%E3%81%8D</id>
	<title>Xamarin.iOSのUIView派生クラスでGestureRecognizerが動かないとき - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.iOS%E3%81%AEUIView%E6%B4%BE%E7%94%9F%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7GestureRecognizer%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E3%81%A8%E3%81%8D"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.iOS%E3%81%AEUIView%E6%B4%BE%E7%94%9F%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7GestureRecognizer%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E3%81%A8%E3%81%8D&amp;action=history"/>
	<updated>2026-06-05T17:53:33Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=Xamarin.iOS%E3%81%AEUIView%E6%B4%BE%E7%94%9F%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7GestureRecognizer%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E3%81%A8%E3%81%8D&amp;diff=13969&amp;oldid=prev</id>
		<title>Administrator: ページの作成:「UIViewのUserInteractionEnabledプロパティをtrueにするとGestureRecognizerが動き出す。  &lt;source lang=&quot;csharp&quot;&gt; class CustomView : UIView {     // GestureRec…」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.iOS%E3%81%AEUIView%E6%B4%BE%E7%94%9F%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%A7GestureRecognizer%E3%81%8C%E5%8B%95%E3%81%8B%E3%81%AA%E3%81%84%E3%81%A8%E3%81%8D&amp;diff=13969&amp;oldid=prev"/>
		<updated>2020-12-25T03:06:20Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「UIViewのUserInteractionEnabledプロパティをtrueにするとGestureRecognizerが動き出す。  &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; class CustomView : UIView {     // GestureRec…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;UIViewのUserInteractionEnabledプロパティをtrueにするとGestureRecognizerが動き出す。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
class CustomView : UIView&lt;br /&gt;
{&lt;br /&gt;
    // GestureRecognizerはフィールド変数にしておいてUIView破棄時に&lt;br /&gt;
    // 明示的にDisposeしないとメモリリークする模様。&lt;br /&gt;
    UITapGestureRecognizer doubleTapGesture;&lt;br /&gt;
&lt;br /&gt;
    void Setup() &lt;br /&gt;
    {&lt;br /&gt;
        // GestureRecognizerを生成&lt;br /&gt;
        doubleTapGesture = new UITapGestureRecognizer( () =&amp;gt; {&lt;br /&gt;
            Console.WriteLine(&amp;quot;double tap&amp;quot;);&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        // GestureRecognizerをダブルタップに設定&lt;br /&gt;
        doubleTapGesture.NumberOfTapsRequired = 2;&lt;br /&gt;
&lt;br /&gt;
        // UIViewにGestureRecognizerを追加&lt;br /&gt;
        this.AddGestureRecognizer(doubleTapGesture);&lt;br /&gt;
&lt;br /&gt;
        // これ重要&lt;br /&gt;
        // UIViewでGestureRecognizerを有効にする&lt;br /&gt;
        this.UserInteractionEnabled = true;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category: Xamarin.iOS]]&lt;/div&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
</feed>