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 04-11-2010, 03:07 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 26
ipoduplink is on a distinguished road
Post Creating a custom keyboard

I've spent hours looking for a solution to this problem, but to no avail. All I want to do is add a decimal point to the usual number pad keyboard. I have tried adding a key was a subview to the UIKeyboard, but that didnt seem to work. So basically what im doing is having my own keyboard made of UIButons. What i want to do is intersept the keyboard before it shows, and keep it from apperaring. I want to use
Code:
[[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(stopKeyboard:) 
                                                 name:UIKeyboardWillShowNotification
                                               object:nil];
But i have no idea what to do in
Code:
-(void)stopKeyboard {//intercept and stop keyboard}
Any ideas?
ipoduplink is offline   Reply With Quote
Old 04-11-2010, 12:04 PM   #2 (permalink)
Elegance is Infinite
iPhone Dev SDK Supporter
 
TapTouchClick's Avatar
 
Join Date: Jan 2010
Location: Bay Area, CA
Posts: 677
TapTouchClick is on a distinguished road
Send a message via AIM to TapTouchClick Send a message via Skype™ to TapTouchClick
Default

There was a thread on here with a solution to this. Try searching around for decimal and number pad. HTH
__________________
Our website
TapTouchClick is offline   Reply With Quote
Old 04-11-2010, 12:34 PM   #3 (permalink)
iPhone SDK learner
 
Join Date: Feb 2010
Location: Illinois, USA
Posts: 421
Batman is on a distinguished road
Default

http://www.iphonedevsdk.com/forum/ip...-keyboard.html
Batman is offline   Reply With Quote
Old 04-11-2010, 12:54 PM   #4 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 26
ipoduplink is on a distinguished road
Post

Hi and thanks for your responses. I read through that thread, and it seems to be saying that this method will result in a warning email from Apple waking you to take your app down. All I want to do is know how to keep the keyboard from appearing so that I can show my own.
ipoduplink is offline   Reply With Quote
Old 04-12-2010, 01:33 PM   #5 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 26
ipoduplink is on a distinguished road
Default

Ok I sort of solved this. What I had to do was keep the text field from returning true when textFieldShouldBeginEditing is called. Then I used beginAnimations:context: to scroll my keyboard onto the screen. All the buttons on the keyboard called a method that added their character to the active UITextField, which I changed whenever the user clicked on a new one. The one drawback to this way is that the textfield is never editing, so you dont get the little blinking bar. I just changed the background color whenever the user clicked on one. Hope this helps someone else.
ipoduplink is offline   Reply With Quote
Old 06-17-2010, 10:01 PM   #6 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 1
stonebreaker is on a distinguished road
Default

Quote:
Originally Posted by ipoduplink View Post
Ok I sort of solved this. What I had to do was keep the text field from returning true when textFieldShouldBeginEditing is called. Then I used beginAnimations:context: to scroll my keyboard onto the screen. All the buttons on the keyboard called a method that added their character to the active UITextField, which I changed whenever the user clicked on a new one. The one drawback to this way is that the textfield is never editing, so you dont get the little blinking bar. I just changed the background color whenever the user clicked on one. Hope this helps someone else.
I would really appreciate a sample project with this code. Do you have one? Thanks.
stonebreaker is offline   Reply With Quote
Old 06-17-2010, 10:10 PM   #7 (permalink)
Physician developer
 
StatCoder's Avatar
 
Join Date: Aug 2008
Location: Austin, TX
Posts: 221
StatCoder is on a distinguished road
Default

I used this solution to add a decimal point to the numeric keypad. It's pretty simple and it works:

iPhone: Number Pad with a decimal point (OS 3.0, OS 4.0) using public API devedup.com
StatCoder is offline   Reply With Quote
Old 08-06-2010, 03:02 PM   #8 (permalink)
cye
14 Year Old App Developer
 
Join Date: Mar 2010
Location: Texas
Posts: 242
cye is on a distinguished road
Default

try this:
Code:
- (void)viewDidLoad {

	CGRect accessFrame = CGRectMake(0.0, 0.0, 0.0, 0.0);
	dumbView = [[UIView alloc] initWithFrame:accessFrame];
	text.inputView = dumbView;
	[textview becomeFirstResponder];
    [super viewDidLoad];
}
that should stop the defualt keyboard from showing up
__________________
14 year old app developer!

Type Faster and More Accurately With Easy Typing

"Like" me on facebook!

A+ FlashCards currently #6 Free Education app


Confidence is contagious. So is lack of confidence.
-- Vince Lombardi
cye is offline   Reply With Quote
Reply

Bookmarks

Tags
custom, 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: 318
15 members and 303 guests
chemistry, Domele, Fstuff, givensur, heshiming, HowEver, iAppDeveloper, iphonedevshani, jbro, JoeRCruso, kapps11, newDev, SLIC, stanny, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,874
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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