void ReleaseDesignerOutlets() { if (ActivityInProgressView != null) { ActivityInProgressView.Dispose(); ActivityInProgressView = null; } if (SDKVersionLabel != null) { SDKVersionLabel.Dispose(); SDKVersionLabel = null; } if (ChannelNameEdit != null) { ChannelNameEdit.Dispose(); ChannelNameEdit = null; } if (ConnectingLabel != null) { ConnectingLabel.Dispose(); ConnectingLabel = null; } if (ConnectionImage != null) { ConnectionImage.Dispose(); ConnectionImage = null; } if (EncryptionKeyEdit != null) { EncryptionKeyEdit.Dispose(); EncryptionKeyEdit = null; } if (JoinButton != null) { JoinButton.Dispose(); JoinButton = null; } if (OpacityLayerView != null) { OpacityLayerView.Dispose(); OpacityLayerView = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); AgoraDelegate = new AgoraRtcQualityDelegate(this); AgoraKit = AgoraRtcEngineKit.SharedEngineWithAppIdAndDelegate(AgoraTestConstants.AgoraAPI, AgoraDelegate); AgoraKit.EnableWebSdkInteroperability(true); ChannelNameEdit.Text = AgoraSettings.Current.RoomName; EncryptionKeyEdit.Text = AgoraSettings.Current.EncryptionPhrase; UserNameLabel.Text = RtmService.Instance.UserName; ChannelNameEdit.SetRoundCorners(); ChannelNameEdit.SetAttributedPlaceholder("Room Name"); AgoraVersionLabel.Text = string.Format(AgoraVersion, AgoraRtcEngineKit.SdkVersion); NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIImage.FromBundle("ic_share"), UIBarButtonItemStyle.Plain, ShareButtonCliked); NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIImage.FromBundle("ic_settings"), UIBarButtonItemStyle.Plain, SettingsButtonCliked); View.SetupKeyboardHiding(ChannelNameEdit); }
void ReleaseDesignerOutlets() { if (AgoraVersionLabel != null) { AgoraVersionLabel.Dispose(); AgoraVersionLabel = null; } if (ChannelNameEdit != null) { ChannelNameEdit.Dispose(); ChannelNameEdit = null; } if (ConnectingLabel != null) { ConnectingLabel.Dispose(); ConnectingLabel = null; } if (ConnectionImage != null) { ConnectionImage.Dispose(); ConnectionImage = null; } if (EncryptionKeyEdit != null) { EncryptionKeyEdit.Dispose(); EncryptionKeyEdit = null; } if (JoinButton != null) { JoinButton.Dispose(); JoinButton = null; } if (UserNameLabel != null) { UserNameLabel.Dispose(); UserNameLabel = null; } }
private void SetupKeyboardHiding() { UITapGestureRecognizer singleTapRecognizer = new UITapGestureRecognizer(() => { ChannelNameEdit.ResignFirstResponder(); }); singleTapRecognizer.NumberOfTouchesRequired = 1; singleTapRecognizer.CancelsTouchesInView = false; View.AddGestureRecognizer(singleTapRecognizer); }