void StyleWebView()
        {
            _webView          = new UIWebView(new CGRect(0, 0, this.View.Frame.Width, this.View.Frame.Height));
            _webView.Delegate = new TEditorViewDelegate(_richTextEditor);

            _webView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth
                                        | UIViewAutoresizing.FlexibleHeight
                                        | UIViewAutoresizing.FlexibleTopMargin
                                        | UIViewAutoresizing.FlexibleBottomMargin;
            _webView.KeyboardDisplayRequiresUserAction = false;
            _webView.ScalesPageToFit    = true;
            _webView.BackgroundColor    = UIColor.White;
            _webView.ScrollView.Bounces = false;

            this.Add(_webView);
            HideFormAccessoryBar.SetHideFormAccessoryBar(true);

            if (IsIpad())
            {
                foreach (var subview in _webView.ScrollView.Subviews)
                {
                    if (subview.Class.Name == "UIWebBrowserView")
                    {
                        contentView = subview;
                    }
                }
                InputAssistantItem.AllowsHidingShortcuts  = false;
                InputAssistantItem.LeadingBarButtonGroups = new[] { new UIBarButtonItemGroup(_uiToolbarItems.ToArray(), null) };
            }
        }
Exemplo n.º 2
0
        void StyleWebView()
        {
            _webView          = new UIWebView(new CGRect(0, 0, this.View.Frame.Width, this.View.Frame.Height));
            _webView.Delegate = new TEditorViewDelegate(_richTextEditor);

            _webView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth
                                        | UIViewAutoresizing.FlexibleHeight
                                        | UIViewAutoresizing.FlexibleTopMargin
                                        | UIViewAutoresizing.FlexibleBottomMargin;
            _webView.KeyboardDisplayRequiresUserAction = false;
            _webView.ScalesPageToFit    = true;
            _webView.BackgroundColor    = UIColor.White;
            _webView.ScrollView.Bounces = false;

            this.Add(_webView);
            HideFormAccessoryBar.SetHideFormAccessoryBar(true);
        }