Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-3210

iPad: Popover PassThroughViews property exposure

    Details

      Description

      {html}<div><p>There is a passThroughViews property in the Apple documentation
      that allows the developer to pass a view / UI object that can be
      interacted with with a popover open. <a href=
      "http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html">
      http://developer.apple.com/library/ios/#documentation/uikit/referen...</a></p>
      <p>Specifically: "When a popover is active, interactions with other
      views are normally disabled until the popover is dismissed.
      Assigning an array of views to this property allows taps outside of
      the popover to be handled by the corresponding views."</p></div>{html}

        Activity

        Hide
        Stephen Tramer added a comment -
        {html}<div><p>Test app code (also checked in to bugtests):</p>
        <pre>
        <code>var win = Ti.UI.createWindow({backgroundColor:'white'});

        var view1 = Ti.UI.createView({ right:10, top:300, width:150, height:150, backgroundColor:'green' });
        view1.addEventListener('click', function(e) {
        Ti.UI.createAlertDialog({ title:"Popover interaction", message:"You can interact with me while the popover is open!" }).show();
        });
        var label1 = Ti.UI.createLabel({ width:'auto', height:'auto', text:"Interaction allowed" });
        view1.add(label1);

        var view2 = Ti.UI.createView({ right:10, top:450, width:150, height:150, backgroundColor:'red' });
        view2.addEventListener('click', function(e) {
        Ti.UI.createAlertDialog({ title:"No popover interaction", message:"You can't interact with me while the popover is open!" }).show();
        });
        var label2 = Ti.UI.createLabel({ width:'auto', height:'auto', text:"Interaction disallowed" });
        view2.add(label2);

        var button = Ti.UI.createButton({ title:"Display popover", width:200, height:60, left:100 });
        button.addEventListener('click', function() {
        var popover = Ti.UI.iPad.createPopover({ width:200, height:300, title:"POP'N OVER" });

        popover.setPassthroughViews([view1]);

        var dismiss = Ti.UI.createButton({ title:"Dismiss", width:160, height:60 });
        dismiss.addEventListener('click', function(e) {
        popover.hide({animated:true});
        });
        popover.add(dismiss);

        popover.show({ view:button, animated:true });
        });

        win.add(view1);
        win.add(view2);
        win.add(button);
        win.open();</code>
        </pre></div>{html}
        Show
        Stephen Tramer added a comment - {html}<div><p>Test app code (also checked in to bugtests):</p> <pre> <code>var win = Ti.UI.createWindow({backgroundColor:'white'}); var view1 = Ti.UI.createView({ right:10, top:300, width:150, height:150, backgroundColor:'green' }); view1.addEventListener('click', function(e) { Ti.UI.createAlertDialog({ title:"Popover interaction", message:"You can interact with me while the popover is open!" }).show(); }); var label1 = Ti.UI.createLabel({ width:'auto', height:'auto', text:"Interaction allowed" }); view1.add(label1); var view2 = Ti.UI.createView({ right:10, top:450, width:150, height:150, backgroundColor:'red' }); view2.addEventListener('click', function(e) { Ti.UI.createAlertDialog({ title:"No popover interaction", message:"You can't interact with me while the popover is open!" }).show(); }); var label2 = Ti.UI.createLabel({ width:'auto', height:'auto', text:"Interaction disallowed" }); view2.add(label2); var button = Ti.UI.createButton({ title:"Display popover", width:200, height:60, left:100 }); button.addEventListener('click', function() { var popover = Ti.UI.iPad.createPopover({ width:200, height:300, title:"POP'N OVER" }); popover.setPassthroughViews( [view1] ); var dismiss = Ti.UI.createButton({ title:"Dismiss", width:160, height:60 }); dismiss.addEventListener('click', function(e) { popover.hide({animated:true}); }); popover.add(dismiss); popover.show({ view:button, animated:true }); }); win.add(view1); win.add(view2); win.add(button); win.open();</code> </pre></div>{html}
        Hide
        Jeff Haynie added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/dd37db351d2f71afc280536e8909496fb261f4be"
        title=
        "Changeset [dd37db351d2f71afc280536e8909496fb261f4be]">[dd37db351d2f71afc280536e8909496fb261f4be]</a>)
        [<a href="/projects/32238/tickets/3210" title=
        "Ticket #3210">#3210</a> state:fixed-in-qa] Addition of
        setPassthroughViews() function to popover. <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f71afc280536e8909496fb261f4be">
        https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f...</a></p></div>{html}
        Show
        Jeff Haynie added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/dd37db351d2f71afc280536e8909496fb261f4be" title= "Changeset [dd37db351d2f71afc280536e8909496fb261f4be] "> [dd37db351d2f71afc280536e8909496fb261f4be] </a>) [<a href="/projects/32238/tickets/3210" title= "Ticket #3210">#3210</a> state:fixed-in-qa] Addition of setPassthroughViews() function to popover. <a href= "https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f71afc280536e8909496fb261f4be"> https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f ...</a></p></div>{html}
        Hide
        Rick Blalock added a comment -
        {html}<div><p>Tested in two use case scenarios and works.</p></div>{html}
        Show
        Rick Blalock added a comment - {html}<div><p>Tested in two use case scenarios and works.</p></div>{html}
        Hide
        Natalie Huynh added a comment -
        {html}<div><p>Tested with Titanium SDK version: 1.7.0 (03/08/11 09:53 1df642e)
        on<br>
        iPad 3.2</p></div>{html}
        Show
        Natalie Huynh added a comment - {html}<div><p>Tested with Titanium SDK version: 1.7.0 (03/08/11 09:53 1df642e) on<br> iPad 3.2</p></div>{html}

          People

          • Assignee:
            Ralf Pfeiffer
            Reporter:
            Rick Blalock
          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development