yeah, you add the custom toolbar by using the InputAccessory - you'd need to make your own stringelement (copy the one thats there) and add it in when it's created.
If you have ObjC to code change the keyboard, doing it in MonoTouch would be the same - you just need to translate it, which is usually mostly just finding where the names have changed :) On 7 March 2013 14:28, Iki <[email protected]> wrote: > Hi Nic, > > sorry for delay, i really don't like the solution with toolbar above, but > the one that you send link to is really nice! > > For now I started using this: > > stringElement.ReturnKeyType = UIReturnKeyType.Done; > stringElement.ShouldReturn += () => > { > stringElement.ResignFirstResponder(true); > return true; > }; > > How would one start with adding custom toolbar for MonoTouch.Dialog? > When using normal UI text field, I have created transparent UIView, and add > it as a input accessory view to the UITextField. > > I was thinking of adding a subview to the keyboard but I don't know the > proper way of referencing keyboard. > I can do it in Objective-C but can't do it using MonoTouch. > > > > I also never found anything that I would like to keep. My latest try was to > load a transparent view above the keyboard > On Mar 7, 2013, at 11:18 AM, Nic Wise <[email protected]> wrote: > > I think you need to work out how you want to dismiss it, then trigger > off that. View.EndEditing(true) gets rid of the keyboard, but how you > trigger it is up to you. > > The tap gesture isn't too bad, but as you said, it takes over all taps. > > I quite like the scroll one - maybe you could also trigger it off the > scroll event/message on the TableView? > > Putting a toolbar or view on the keyboard can work, too - PlainText > does it quite well: > https://itunes.apple.com/en/app/plaintext-dropbox-text-editing/id391254385?mt=8 > > I've never found a solution I liked enough to keep it in, except the > toolbar one, and even then it was clunkey. > > > > On 7 March 2013 08:51, Iki <[email protected]> wrote: > > Hi guys, > > I know that this is probably asked million of times but I can find a nice > solution to dismiss a keyboard in MonoTouch.Dialog. > > On the internet I have found two solutions, one from Miguel, > > //Gesture recognizer for handling EndEditing of Elements > var tap = new UITapGestureRecognizer (); > tap.AddTarget (() =>{ this.View.EndEditing(true); }); > > this.View.AddGestureRecognizer (tap); > //------------------------------------------------------- > > > and another solution from stack overflow > > //Hide when dragging start > this.TableView.DraggingStarted += (object sender, EventArgs e) => > { > this.View.EndEditing (true); > }; > > The problem with these two is that it will block any action that comes from > tapping other elements > (example. StringElement) so I can't find a way if using these two to display > picker element, or UIAlertView. > > Do you have any ideas? > > Thanks for help! > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
