Composer() : base(null, null) { // Navigation Bar navigationBar = new UINavigationBar(new RectangleF(0, 0, 320, 44)); navItem = new UINavigationItem(""); var close = new UIBarButtonItem(Locale.GetText("Close"), UIBarButtonItemStyle.Plain, CloseComposer); navItem.LeftBarButtonItem = close; sendItem = new UIBarButtonItem(Locale.GetText("Send"), UIBarButtonItemStyle.Plain, PostCallback); navItem.RightBarButtonItem = sendItem; navigationBar.PushNavigationItem(navItem, false); // Composer composerView = new ComposerView(ComputeComposerSize(RectangleF.Empty), this, CameraTapped); composerView.LookupUserRequested += delegate { PresentModalViewController(new UserSelector(userName => { composerView.Text += ("@" + userName + " "); }), true); }; // Add the views NSNotificationCenter.DefaultCenter.AddObserver("UIKeyboardWillShowNotification", KeyboardWillShow); View.AddSubview(composerView); View.AddSubview(navigationBar); }
Composer() : base(null, null) { // Navigation Bar navigationBar = new UINavigationBar (new RectangleF (0, 0, 320, 44)); navItem = new UINavigationItem (""); var close = new UIBarButtonItem (Locale.GetText ("Close"), UIBarButtonItemStyle.Plain, CloseComposer); navItem.LeftBarButtonItem = close; sendItem = new UIBarButtonItem (Locale.GetText ("Send"), UIBarButtonItemStyle.Plain, PostCallback); navItem.RightBarButtonItem = sendItem; navigationBar.PushNavigationItem (navItem, false); // Composer composerView = new ComposerView (ComputeComposerSize (RectangleF.Empty), this, CameraTapped); composerView.LookupUserRequested += delegate { PresentModalViewController (new UserSelector (userName => { composerView.Text += ("@" + userName + " "); }), true); }; // Add the views NSNotificationCenter.DefaultCenter.AddObserver ("UIKeyboardWillShowNotification", KeyboardWillShow); View.AddSubview (composerView); View.AddSubview (navigationBar); }