For an app I am working on I require the need of a very customized keyboard (involves some unusual math symbols) and I am curious if there is any way to modify the UIKeyboard this heavily, or if I need to make my own custom calculator object.
I say make your own view and set the textInputView and maybe textInputAccessoryView too for your text field or text view. This is supported in 3.2 and up.
I say make your own view and set the textInputView and maybe textInputAccessoryView too for your text field or text view. This is supported in 3.2 and up.
Thanks For the reply. I am reasonably sure I can figure out how to have my "keyboard" update a textview no problem; what I am more concerned with is how to make a custom keyboard that still "feels" like a default one. For instance if you roll over the keys one the standard keyboard they know to highlight in turn as you roll over them; if I just made my own view of UIButtons as the keys, I don't think they behave this way, etc.
If I fully customize everything and write the touch handling code myself for every little button view; I can get the behavior I'm looking for; I am just hoping there is a cleaner solution using existing UI elements. Thanks.
Yeah, I have only done this for the iPad, where the keyboard behaves more like a bunch of UIButtons than on the iPhone. From the stuff I've seen during my research, I haven't seen any easy way to do it without implementing a bunch of things from scratch, but who knows, maybe you can find something if you dig around some more.
Hmm, is there any type of UIButton or configuration of UIButton that gives the "rollover" highlight of the keyboard buttons (not even the popup letter, but the fact that it actually highlights on "rolling in" to it)? Also a potential solution may be similar to this thread:
I don't quite understand this notion of "rollover" since you don't have a mouse and you can't exactly hover over the button. I am not quite sure what you are referring to. However, UIButton does have states like UIControlStateNormal, UIControlStateHighlighted, UIControlStateDisabled, UIControlStateSelected, etc. that you can play with.
Open up the standard UIKeyboard on your phone and "roll" your finger across multiple keys. The behavior your see here is different than if you did the same over a bunch of UIButtons lined up next to each other; see what I am talking about?
Yeah, it makes sense. I just don't have a good solution for you since I haven't really tried to do something like this.
If I were to do this, I might try one of two things.
1) Use UIButtons defined as custom views. That way you can set it to draw differently depending on the state. I didn't try this out though, so I am not sure how much it allows you to draw out of bounds without causing trouble.
2) Define a view for a keyboard (but don't add any views as subviews). And when it's touched, depending on where in the view is touched, you draw the images of the keys accordingly (whether it's regular size, or "rolled over", so to speak).
But I have not tried these out. These are just thoughts that I don't know whether will work or not.