public override bool WillFinishLaunching(UIApplication application, NSDictionary launchOptions)
        {
            dataSource = new DataSource();
            UIApplication.RegisterObjectForStateRestoration(dataSource, "DataSource");

            PrimaryViewController.DataSource = dataSource;

            Window.MakeKeyAndVisible();

            return(true);
        }
Example #2
0
        public override bool WillFinishLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window.TintColor = UIColor.LightGray;

            dataSource = new DataSource();

            UIApplication.RegisterObjectForStateRestoration(dataSource, "DataSource");

            var navigationController = (UINavigationController)Window.RootViewController;

            navigationController.NavigationBar.BarStyle    = UIBarStyle.Black;
            navigationController.NavigationBar.Translucent = true;

            var viewController = (CollectionViewController)navigationController.ViewControllers [0];

            viewController.DataSource = dataSource;

            Window.MakeKeyAndVisible();

            return(true);
        }
        static ImageFilter CreateFilter(string key, bool setDefaults)
        {
            ImageFilter filter = null;

            if (key == BlurFilter.Key)
            {
                filter = new BlurFilter(setDefaults);
            }
            else if (key == ModifyFilter.Key)
            {
                filter = new ModifyFilter(setDefaults);
            }
            else
            {
                throw new NotImplementedException();
            }

            UIApplication.RegisterObjectForStateRestoration(filter, key);
            filter.Dirty           = false;
            filter.RestorationType = typeof(DetailViewController);
            return(filter);
        }
 static void Register(ImageFilter filter, string key)
 {
     UIApplication.RegisterObjectForStateRestoration(filter, key);
     filter.RestorationType = typeof(DetailViewController);
 }