Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15361] iOS: View inside popover does not fill available space

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-30T20:59:47.000+0000
Affected Version/sRelease 3.1.3
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.1.4, Release 3.2.0
ComponentsiOS
LabelsSupportTeam, module_popover, qe-testadded, regression, triage
ReporterMostafizur Rahman
AssigneeVishal Duggal
Created2013-09-11T15:37:37.000+0000
Updated2014-02-24T08:15:47.000+0000

Description

Problem Description

A view inside a popover never fills the whole popover view, but leaves a padding on top and bottom of the popover.

Workaround

I have checked this issue. When I set navBarHidden is true, it’s creating extra padding in top and bottom in Popover as like as reporter snapshot. But it is working well if navBarHidden is false.

Testcase

var win = Ti.UI.createWindow({
    backgroundColor : '#fff'
});
 
var popover = Ti.UI.iPad.createPopover({
    width : 350,
    height : 300,
    arrowDirection : Ti.UI.iPad.POPOVER_ARROW_DIRECTION_ANY,
    navBarHidden : true,
});
 
var view = Ti.UI.createView({
    backgroundColor : "#fff",
    top : 0,
    width : Ti.UI.FILL,
    height : Ti.UI.FILL
});
popover.add(view);
 
var aButton = Ti.UI.createButton({
    title : 'aButton',
});
  
aButton.addEventListener('click', function() {
    popover.show({ view : aButton });
});
 
win.add(aButton);
 
win.open();

Attachments

FileDateSize
Schermata 2013-09-11 alle 17.03.54.png2013-09-11T15:37:37.000+000031683

Comments

  1. Thomas Neerup 2013-10-01

    How can this be a priority None? Are You seriously suggesting we release our Apps with this bug? The problem also exists on IOS7. We use the Titanium platform because it's native, but with this bug it don't look very native. I'm sorry but I will be very disappointed if the next update doesn't include a fix for this.
  2. Mario 2013-10-01

    I hope the ticket update is just a mistake. I released my latest App update with an older SDK because of this bug, accepting other problems for the meantime.
  3. Alberto Marcone 2013-10-01

    same thing here, I had to release an update with TiSDK 3.1.2. I can't update to xcode 5 because not all of my modules support it yet. So, until everything will work smooth on xcode 5, I have to stick with xcode 4.
  4. Mauro Parra-Miranda 2013-10-01

    Hey guys, we go from Community bugs to Mobile/Cloud or so. We reset the priority, so Platform will decide which priority should have. Thanks for letting us your concerns about this. Best, Mauro
  5. Alberto Marcone 2013-10-03

    this is what happens when I use your workaround !http://i.imgur.com/aKlRLhM.png! it still doesn't work to me.
  6. Hitesh Sawlani 2013-10-28

    Workaround works on iOS 6 but not on iOS7. This is a high priority for us.
  7. Charles Tran 2013-10-29

    The same for me. It's work good for me on Ti SDK 3.1.2 but fail on version 3.1.3
  8. Vishal Duggal 2013-10-29

    We will fix this for 3.2.0 and back port this to 3_1_X. But be advised that this functionality should be considered to be deprecated. Please use the contentView property of the popover to display content. We plan to migrate the the popover proxy from a view proxy to a plain proxy. So it will not support adding children. See TIMOB-15402 for details. For the current example you would rewrite the code in 3.2.0 to be something like this.
       var win = Ti.UI.createWindow({
           backgroundColor : '#fff'
       });
         
       var view = Ti.UI.createView({
           backgroundColor : "#fff",
           width:350,
           height: 300,
           borderWidth:1,
           borderColor:'red'
       });
       
       var popover = Ti.UI.iPad.createPopover({
           arrowDirection : Ti.UI.iPad.POPOVER_ARROW_DIRECTION_ANY,
           contentView : view
       });
         
       var aButton = Ti.UI.createButton({
           title : 'aButton',
       });
          
       aButton.addEventListener('click', function() {
           popover.show({ view : aButton });
       });
         
       win.add(aButton);
         
       win.open();
       
  9. Vishal Duggal 2013-10-29

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4880
  10. Vishal Duggal 2013-10-29

    Backport to 3_1_X https://github.com/appcelerator/titanium_mobile/pull/4881
  11. Pedro Enrique 2013-10-30

    Merged both PRs.
  12. Pragya Rastogi 2013-11-13

    Tested and Verified fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201311122045 SDK: 3.2.0.v20131112180422 acs:1.0.7 alloy:1.3.0 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 DEVICE: IPAD3 7.0 and iPad Mini 6.0 Simulator- iPhone Retina(3.5-inch) iOS 7.0

JSON Source