dotMorten / MauiEx

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

NSGenericException Reason: Unable to activate constraint with anchors #92

Closed osoba95 closed 1 year ago

osoba95 commented 2 years ago

Description

When I install my app on iOS and click on autosugestbox control, it throws error

Name: NSGenericException Reason: Unable to activate constraint with anchors <NSLayoutYAxisAnchor:0x2828b3780 "UITableView:0x10958a000.top"> and <NSLayoutYAxisAnchor:0x2828b2dc0 "UITextField:0x1123af230.bottom"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.

My line of code where app chrashs autoSuggestBox.ItemsSource = (System.Collections.IList)SortingAlgorithm(autoSuggestBox.Text.ToLower(), stringList);

Application works then chrash (only first time doesn't work),

Steps to Reproduce

  1. Install application (iOS)
  2. AutosugestionBox.ItemSource = _stringList
  3. Chrash

Expected Behavior

App doesn't crash

Actual Behavior

App crash when set autosuggestbox.ItemSource

Basic Information

dotMorten commented 2 years ago

Could you share a sample project that reproduces this behavior?

osoba95 commented 2 years ago

Thanks for your reply,

I attached documet to reproduction the bug

čet, 13. sij 2022. u 23:02 Morten Nielsen @.***> napisao je:

Could you share a sample that reproduces this behavior?

— Reply to this email directly, view it on GitHub https://github.com/dotMorten/XamarinFormsControls/issues/92#issuecomment-1012551183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXJHWNBC6655ZDNIESMNARLUV5DYHANCNFSM5L35HI5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>