Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Subclass UIWindow - Application windows are expected to have a root view controller ...

$
0
0

To sub-class UIWindow, we just have to override getter method for property "window" if we use Objective C ( I have used this earlier) But when using Xamarin, I used story boards, when doing the same thing i.e overriding getter method, I get the above error "Application windows are expected to have a root view controller at the end of application launch"

public override UIWindow Window { get{ return new CSUIWindow ();} set{ Window = value;} // get; // set;

    }

Why should I be setting the RootViewController, if I just want to use custom UIWindow,

CSUIWindow has no code. public class CSUIWindow : UIWindow { public CSUIWindow () :base(UIScreen.MainScreen.Bounds) {

    }
}

Viewing all articles
Browse latest Browse all 204402

Trending Articles



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