Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-07-2010, 08:39 AM   #1 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,070
scotopia is on a distinguished road
Default Best way to create a very customized keyboard

Hello All,

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 have seen this post: iPhone: Number Pad with a decimal point (OS 3.0, OS 4.0) using public API devedup.com
but I don't think this covers the level of customization I need; everything about the buttons would need to be controllable, layout and dimensions of each button, etc.

Thanks in advance.
scotopia is offline   Reply With Quote
Old 09-07-2010, 03:53 PM   #2 (permalink)
Registered Member
 
kelvinkao's Avatar
 
Join Date: Jul 2009
Location: Los Angeles
Posts: 352
kelvinkao is on a distinguished road
Send a message via AIM to kelvinkao
Default

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.
__________________
My dev blog:
http://www.kelvinkaodev.com
kelvinkao is offline   Reply With Quote
Old 09-07-2010, 05:13 PM   #3 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,070
scotopia is on a distinguished road
Default

Quote:
Originally Posted by kelvinkao View Post
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.
scotopia is offline   Reply With Quote
Old 09-07-2010, 05:20 PM   #4 (permalink)
Registered Member
 
kelvinkao's Avatar
 
Join Date: Jul 2009
Location: Los Angeles
Posts: 352
kelvinkao is on a distinguished road
Send a message via AIM to kelvinkao
Default

I see.

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.
__________________
My dev blog:
http://www.kelvinkaodev.com
kelvinkao is offline   Reply With Quote
Old 09-09-2010, 03:20 PM   #5 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,070
scotopia is on a distinguished road
Default

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:

http://stackoverflow.com/questions/3...board-behavior

Looking into that now..

Last edited by scotopia; 09-09-2010 at 03:24 PM.
scotopia is offline   Reply With Quote
Old 09-09-2010, 03:41 PM   #6 (permalink)
Registered Member
 
kelvinkao's Avatar
 
Join Date: Jul 2009
Location: Los Angeles
Posts: 352
kelvinkao is on a distinguished road
Send a message via AIM to kelvinkao
Default

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.
__________________
My dev blog:
http://www.kelvinkaodev.com
kelvinkao is offline   Reply With Quote
Old 09-09-2010, 04:55 PM   #7 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,070
scotopia is on a distinguished road
Default

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?
scotopia is offline   Reply With Quote
Old 09-11-2010, 02:56 PM   #9 (permalink)
Registered Member
 
kelvinkao's Avatar
 
Join Date: Jul 2009
Location: Los Angeles
Posts: 352
kelvinkao is on a distinguished road
Send a message via AIM to kelvinkao
Default

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.
__________________
My dev blog:
http://www.kelvinkaodev.com
kelvinkao is offline   Reply With Quote
Reply

Bookmarks

Tags
calculator, keyboard, uikeyboard

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 335
11 members and 324 guests
bignoggins, carlandrews, flamingliquid, hzwegjxg, ilmman, jenniead38, linkmx, nadav@webtview.com, stanny, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:50 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0