Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3210] iPad: Popover PassThroughViews property exposure

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:01:11.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-10
ComponentsiOS
Labelsfeature, ios, ipad, klist, popover, release-1.7.0, rplist
ReporterRick Blalock
AssigneeRalf Pfeiffer
Created2011-04-15T03:39:32.000+0000
Updated2011-04-17T02:01:11.000+0000

Description

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. http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html"> http://developer.apple.com/library/ios/#documentation/uikit/referen...

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."

Comments

  1. Stephen Tramer 2011-04-15

    Test app code (also checked in to bugtests):

       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();
       
  2. Jeff Haynie 2011-04-15

    (from [dd37db351d2f71afc280536e8909496fb261f4be]) [#3210 state:fixed-in-qa] Addition of setPassthroughViews() function to popover. https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f71afc280536e8909496fb261f4be"> https://github.com/appcelerator/titanium_mobile/commit/dd37db351d2f...

  3. Rick Blalock 2011-04-15

    Tested in two use case scenarios and works.

  4. Natalie Huynh 2011-04-15

    Tested with Titanium SDK version: 1.7.0 (03/08/11 09:53 1df642e) on
    iPad 3.2

JSON Source