public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _updatePostView.NavigationBar  = NavigationController?.NavigationBar;
            _updatePostView.NavigationItem = NavigationItem;
            _updatePostView.SetConfigToolbar();

            _interactor = new InteractorUpdatePost(PostId, new UpdatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost, DataService.NotificationCenter,
                                                                                    DataService.RepositoryController.RepoQc, DataService.RepositoryController.RepositoryPost), DataService.RepositoryController.RepositoryUpdatePost,
                                                   DataService.RepositoryController.RepositoryPost, DataService.RepositoryController.RepositoryUserAuth);

            _presenter = new PresenterUpdatePost(_updatePostView, _interactor, new RouterUpdatePost(this), new UpdatePostStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), Localization.Lang);


            ImagePicker = new ImagePickerDispatcher
            {
                OnGetImageFromGallery = (imageString) =>
                {
                    _presenter.ImageSelected(imageString);
                }
            };

            HideShowKeyboard hideShowKeyboard = new HideShowKeyboard(_updatePostView);

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, hideShowKeyboard.KeyBoardUpNotification);
            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, hideShowKeyboard.KeyBoardDownNotification);
        }
예제 #2
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (resultCode == Result.Ok)
            {
                _presenter.ImageSelected(data.Data.ToString().GetBase64());
            }
        }