Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

AwakeFromNib not being called on OnElementChanged

$
0
0

I migrated my project to .Net Standard but I'm having an issues with an iOS rendered. The code base is the same but it fails on the .Net Standard 2.0 with the newest xamarin.forms

I have this Rendered

public partial class ImagesView : PageRenderer {
        protected override void OnElementChanged(VisualElementChangedEventArgs e)
        {
            base.OnElementChanged(e);
            ((ImageGalleryPage)Element).CallToNativeMethod += (sender, i) =>
            {
                //code here
            };
        }
 public override void ViewDidLoad()
        {
        //code here
    }
}

And I have a UIColletionView with an awake from nib that should be fired up when calling the OnElementChanged on the ImagesView. This works on my old project but not on the updated one.

public partial class ImageCollectionView : UICollectionView
    {
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            // Initialize
        }
    }

any idea why it would not fire up?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>