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

NavigationItem titleview is null

$
0
0

Hi,

I have a Xamarin Forms project with a page renderer. In this page renderer I want to show a UIPopoverViewcontroller with some content when I tap the title in the navigationBar but when I try to access the titleview it is null.

public class MainPageRenderer : PageRenderer
    {
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var pop = new UIPopoverController(this.ViewController);
            pop.BackgroundColor = UIColor.Red;
            pop.PresentFromRect(new CoreGraphics.CGRect(100, 250, 100, 100), this.NavigationItem.TitleView, UIPopoverArrowDirection.Any, true);
        }
    }

Viewing all articles
Browse latest Browse all 89864

Trending Articles



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