Пример #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var service    = ServiceLocator.Instance.Resolve <IPersistantStorage>();
            var designType = service.GetDesignType();

            FlyingObjects = new FlyingObjectsView(View.Frame);
            FlyingObjects.StartAnimationLoop(FlyingObjectsView.AnimationDirection.left, designType, 20, 100, 1);
            View.InsertSubview(FlyingObjects, 0);
        }
Пример #2
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            WillEnterForgroundToken = NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.WillEnterForegroundNotification, (obj) =>
            {
                var service    = ServiceLocator.Instance.Resolve <IPersistantStorage>();
                var designType = service.GetDesignType();
                FlyingObjects.StartAnimationLoop(FlyingObjectsView.AnimationDirection.left, designType, 20, 100, 1);
            });

            DidEnterBackgroundToken = NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidEnterBackgroundNotification, (obj) =>
            {
                FlyingObjects.EndAnimation(FlyingObjectsView.AnimationEnding.collapse, 10);
            });
        }
 }
        public override void ViewWillLayoutSubviews()
        {
            base.ViewWillLayoutSubviews();

            if (FlyingObjects != null)
                FlyingObjects.Frame = View.Frame;
        }
        void StartFlyingObjectsView()
 {
            var service = ServiceLocator.Instance.Resolve<IPersistantStorage>();
            var designType = service.GetDesignType();
            FlyingObjects.StartAnimationLoop(FlyingObjectsView.AnimationDirection.left, designType, 20, 100, 1);

        }