void SetupSendMessageAction()
        {
            SendMessageImageView.Image = UIImage.FromBundle("message");

            // UIImageView doesn't accept touch events by default, so we have to explcitly enable user interaction
            SendMessageImageView.UserInteractionEnabled = true;

            SendMessageImageView.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                // we're using the Messaging plugin from Carel Lotz here (included as a NuGet)
                var smsTask = MessagingPlugin.SmsMessenger;
                if (smsTask.CanSendSms && IsRealDevice)
                {
                    smsTask.SendSms(Acquaintance.Phone, "");
                }
                else
                {
                    DisplaySimulatorNotSupportedErrorAlertView("Messaging is not supported in the iOS simulator.");
                }
            }));
        }
Example #2
0
        void ReleaseDesignerOutlets()
        {
            if (CityLabel != null)
            {
                CityLabel.Dispose();
                CityLabel = null;
            }

            if (CompanyNameLabel != null)
            {
                CompanyNameLabel.Dispose();
                CompanyNameLabel = null;
            }

            if (DetailInfoHorizontalStackView != null)
            {
                DetailInfoHorizontalStackView.Dispose();
                DetailInfoHorizontalStackView = null;
            }

            if (DetailInfoVerticalStackView != null)
            {
                DetailInfoVerticalStackView.Dispose();
                DetailInfoVerticalStackView = null;
            }

            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (JobTitleLabel != null)
            {
                JobTitleLabel.Dispose();
                JobTitleLabel = null;
            }

            if (MainStackView != null)
            {
                MainStackView.Dispose();
                MainStackView = null;
            }

            if (MapViewContainer != null)
            {
                MapViewContainer.Dispose();
                MapViewContainer = null;
            }

            if (PhoneLabel != null)
            {
                PhoneLabel.Dispose();
                PhoneLabel = null;
            }

            if (ProfilePhotoImageView != null)
            {
                ProfilePhotoImageView.Dispose();
                ProfilePhotoImageView = null;
            }

            if (StateAndPostalLabel != null)
            {
                StateAndPostalLabel.Dispose();
                StateAndPostalLabel = null;
            }

            if (StreetLabel != null)
            {
                StreetLabel.Dispose();
                StreetLabel = null;
            }

            if (_MainStackView != null)
            {
                _MainStackView.Dispose();
                _MainStackView = null;
            }

            if (DetailInfoStackView != null)
            {
                DetailInfoStackView.Dispose();
                DetailInfoStackView = null;
            }

            if (MapView != null)
            {
                MapView.Dispose();
                MapView = null;
            }

            if (GetDirectionsImageView != null)
            {
                GetDirectionsImageView.Dispose();
                GetDirectionsImageView = null;
            }

            if (SendMessageImageView != null)
            {
                SendMessageImageView.Dispose();
                SendMessageImageView = null;
            }

            if (DialNumberImageView != null)
            {
                DialNumberImageView.Dispose();
                DialNumberImageView = null;
            }

            if (SendEmailImageView != null)
            {
                SendEmailImageView.Dispose();
                SendEmailImageView = null;
            }
        }