dotMorten / MauiEx

A set of .NET MAUI controls
Apache License 2.0
224 stars 55 forks source link

Error on IOS 13 #60

Closed LuisCabCac closed 4 years ago

LuisCabCac commented 4 years ago

Hello, i find a error on IOS13.

I´m using the autosuggest calling some API and assigning into a viewModel the new Items. This funtionallity was running OK, but on IOS 13 i have this error, i´m update to 1.0.0 version but the error continue, can´t you help me?.

Unable to activate constraint with anchors because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal

Thanks for all.

dotMorten commented 4 years ago

AFAIK I fixed that specific bug in 1.0.0, but I wouldn't rule out there's more. Could you provide a simple app that reproduces the problem? There's really nothing above to go on, but a repro makes it easy/quick for me to fix (I've tested on both 12 and 13 and works ok for me in the scenarios I've tested)

LuisCabCac commented 4 years ago

Hi, i´m try to reproduce in a simple application, and it´s complicted, on same code it´s running, I think that depends of the view., the full message is this.

Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x600003445540 "UITableView:0x7f97489c5c00.top"> and <NSLayoutYAxisAnchor:0x600003445bc0 "UITextField:0x7f9745775d60.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal. Native stack trace: 0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48 2 Foundation 0x00007fff258f0438 -[NSLayoutConstraint setActive:] + 0

LuisCabCac commented 4 years ago

Hello, i see why the component break, in the main project if change this line, the project run.

I think that in the component, try to modify the mainpage always ?

image

dotMorten commented 4 years ago

Sorry this still isn't enough to go on. From the error I know where it's throwing and that happens because it's hit too soon. What I don't know is why, and without a repro any fix would be pure guesswork

LuisCabCac commented 4 years ago

Thanks for all, i change the mode that open the View with the component and the error don´t continue. I think that try to put item in diferent view, it is when show the component in the four View, if i change the open mode in some of the 4 views the error don´t show it.

Close this Issue, if i have some time and reproduce the error in a test App, i´ll open other issue and sent you the error.

federicojoselucia commented 4 years ago

Im having a simmilar problem on ios when I click on the text entry.

Objective-C exception thrown. Name: NSGenericException Reason: Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x600002e60fc0 "UITableView:0x7ff7646cb800.top"> and <NSLayoutYAxisAnchor:0x600002e61540 "UITextField:0x7ff763cc1be0.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.