public override string GetSubjectForActivity(UIActivityViewController activityViewController, NSString activityType)
        {
            if (activityType != null && activityType.Contains(new NSString("instagram")))
            {
                return(null);
            }

            return(subject);
        }
        public override NSObject GetItemForActivity(UIActivityViewController activityViewController, NSString activityType)
        {
            if (activityType != null && activityType.Contains(new NSString("instagram")))
            {
                return(null);
            }

            return(item);
        }
        public void CheckNetworkConnection()
        {
            NSString urlString = new NSString("https://captive.apple.com");

            NSUrl url = new NSUrl(urlString);

            NSUrlRequest request = new NSUrlRequest(url, NSUrlRequestCachePolicy.ReloadIgnoringCacheData, 3);

            NSData data = NSUrlConnection.SendSynchronousRequest(request, out NSUrlResponse response, out NSError error);

            NSString result = NSString.FromData(data, NSStringEncoding.UTF8);

            if (result.Contains(new NSString("Success")))
            {
                IsConnected = true;
            }

            else
            {
                IsConnected = false;
            }
        }