You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by Adam Feng <cx...@gmail.com> on 2017/03/30 03:14:28 UTC

Re: [jira] [Created] (WEEX-19)Weex(iOS),If want to let the frame adjust content's height, you need set frame(0, 0, width, NAN), but it sometime will crash

Please attach some crash logs.

And pull request is welcome.


Thanks.
Adam Feng

On 2017年3月30日 +0800 AM11:10, yuedong (JIRA) <ji...@apache.org>, wrote:
> yuedong created WEEX-19:
> ---------------------------
>
> Summary: Weex(iOS),If want to let the frame adjust content's height, you need set frame(0, 0, width, NAN), but it sometime will crash
> Key: WEEX-19
> URL: https://issues.apache.org/jira/browse/WEEX-19
> Project: Weex
> Issue Type: Bug
> Environment: iOS
> Reporter: yuedong
>
>
> - (void)setFrame:(CGRect)frame
> {
> if (!CGRectEqualToRect(frame, _frame)) {
> _frame = frame;
> WXPerformBlockOnMainThread(^{
> if (_rootView) {
> _rootView.frame = frame;
> WXPerformBlockOnComponentThread(^{
> [self.componentManager rootViewFrameDidChange:frame];
> });
> }
> });
> }
> }
>
> if the _rootView is not nil, the frame(0, 0, width, NAN) will direct set to _rootView, then will crash.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.15#6346)

Re: [jira] [Created] (WEEX-19)Weex(iOS),If want to let the frame adjust content's height, you need set frame(0, 0, width, NAN), but it sometime will crash

Posted by Adam Feng <cx...@gmail.com>.
Setting instance’s frame to NAN can adjust content’s height by layout,  and I have tried in playground, it’s ok and did not crash.  So maybe it’s relevant to your native environment,  I need more information about the crash(e.g. the crash log, the init code.)

Thanks.
Adam Feng

On 2017年3月30日 +0800 PM12:01, 宁栗 <ni...@gmail.com>, wrote:
> So good , I also met this problem . Sometimes, I use the weex view as part
> of page, but the instance frame need to adjust content's height,so I do
> not know how to handle this case.
>
> 2017-03-30 11:14 GMT+08:00 Adam Feng <cx...@gmail.com>:
>
> > Please attach some crash logs.
> >
> > And pull request is welcome.
> >
> >
> > Thanks.
> > Adam Feng
> >
> > On 2017年3月30日 +0800 AM11:10, yuedong (JIRA) <ji...@apache.org>, wrote:
> > > yuedong created WEEX-19:
> > > ---------------------------
> > >
> > > Summary: Weex(iOS),If want to let the frame adjust content's height, you
> > need set frame(0, 0, width, NAN), but it sometime will crash
> > > Key: WEEX-19
> > > URL: https://issues.apache.org/jira/browse/WEEX-19
> > > Project: Weex
> > > Issue Type: Bug
> > > Environment: iOS
> > > Reporter: yuedong
> > >
> > >
> > > - (void)setFrame:(CGRect)frame
> > > {
> > > if (!CGRectEqualToRect(frame, _frame)) {
> > > _frame = frame;
> > > WXPerformBlockOnMainThread(^{
> > > if (_rootView) {
> > > _rootView.frame = frame;
> > > WXPerformBlockOnComponentThread(^{
> > > [self.componentManager rootViewFrameDidChange:frame];
> > > });
> > > }
> > > });
> > > }
> > > }
> > >
> > > if the _rootView is not nil, the frame(0, 0, width, NAN) will direct set
> > to _rootView, then will crash.
> > >
> > >
> > >
> > > --
> > > This message was sent by Atlassian JIRA
> > > (v6.3.15#6346)
> >

Re: [jira] [Created] (WEEX-19) Weex(iOS),If want to let the frame adjust content's height, you need set frame(0, 0, width, NAN), but it sometime will crash

Posted by 宁栗 <ni...@gmail.com>.
So good , I also met this problem . Sometimes, I use the weex view as part
of page, but  the instance frame need to adjust content's height,so I do
not know how to handle this case.

2017-03-30 11:14 GMT+08:00 Adam Feng <cx...@gmail.com>:

> Please attach some crash logs.
>
> And pull request is welcome.
>
>
> Thanks.
> Adam Feng
>
> On 2017年3月30日 +0800 AM11:10, yuedong (JIRA) <ji...@apache.org>, wrote:
> > yuedong created WEEX-19:
> > ---------------------------
> >
> > Summary: Weex(iOS),If want to let the frame adjust content's height, you
> need set frame(0, 0, width, NAN), but it sometime will crash
> > Key: WEEX-19
> > URL: https://issues.apache.org/jira/browse/WEEX-19
> > Project: Weex
> > Issue Type: Bug
> > Environment: iOS
> > Reporter: yuedong
> >
> >
> > - (void)setFrame:(CGRect)frame
> > {
> > if (!CGRectEqualToRect(frame, _frame)) {
> > _frame = frame;
> > WXPerformBlockOnMainThread(^{
> > if (_rootView) {
> > _rootView.frame = frame;
> > WXPerformBlockOnComponentThread(^{
> > [self.componentManager rootViewFrameDidChange:frame];
> > });
> > }
> > });
> > }
> > }
> >
> > if the _rootView is not nil, the frame(0, 0, width, NAN) will direct set
> to _rootView, then will crash.
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.3.15#6346)
>