viezel / TiSocial.Framework

iOS6+ Social.Framework. Appcelerator apps are able to share content to Facebook and Twitter.
MIT License
259 stars 102 forks source link

ipad Popover, position beside nested view #162

Open intellirolf opened 8 years ago

intellirolf commented 8 years ago

Hi there, I'm having a problem with the positioning of a popover using Social.activityPopover().

Everything works fine, but as soon as the views are nested, the popover doesn't pop up beside the right view. Here's some code to reproduce the issue:

`var win = Ti.UI.createWindow({ backgroundColor : 'white' });

var contentContainer = Ti.UI.createScrollView({ layout : "vertical", backgroundColor : '#ff0' });

var content1 = Ti.UI.createView({ width : '50%', height : 100, backgroundColor : '#f90' });

var content2 = Ti.UI.createView({ width : '50%', height : 100, top : 100, backgroundColor : '#f9c' }); var content2Inner = Ti.UI.createView({ width : '50%', height : 100, backgroundColor : '#fcc' });

contentContainer.add(content1);

content2.add(content2Inner); contentContainer.add(content2);

var Social = require('dk.napp.social'); contentContainer.addEventListener("click", function(e) { if (Social.isActivityViewSupported()) {//min iOS6 required Social.activityPopover({ text : "share like a king!", image : "pin.png", // removeIcons:"print,sms,copy,contact,camera,mail", view : content2Inner //source button }); } else { //implement fallback sharing.. } });

win.add(contentContainer); win.open(); `

There is a View 'contentContainer' with 2 views inside (content1, content2). Inside 'content2' there is another view 'content2Inner'.

When I use 'view : content1' (or 'content2') as the source view, it works. When I set the source view to 'content2Inner' the Popover appears on top of the Window, not beside 'content2Inner'.

nuno commented 7 years ago

Fixed here https://github.com/viezel/TiSocial.Framework/pull/167 can you test?