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

View Single Post
Old 05-09-2010, 02:58 PM   #41 (permalink)
nacho4d
Registered Member
 
Join Date: Feb 2009
Posts: 9
nacho4d is on a distinguished road
Smile inputView and accessoryInputView

Quote:
Originally Posted by StatCoder View Post
It looks like this method will not work on iPhone OS4 devices. The keyboard is not modified. I guess that means we have probably have about four weeks to modify our apps or they will not work when iPhone OS4 is released to the public. Anyone have any ideas?
Super easy. in iPhone OS 4.0 as same as iPhone 3.2 there is a inputView and accessoryInputView property
@property (readwrite, retain) UIView *inputView
so you can use it like this: (from my head, not tested)

for example override viewDidLoad in your ViewController

Code:
UITextView * textView = [[UITextView alloc] initWithFrame:frame];
MyKeyboard *mykeyboard = [[MyKeyboard alloc] initWithSomething:something];
textView.inputView = myKeyboard;
[myKeyboard release];

[viewController.view addSubview:textView];
[textView release];
[textView becomeFirstResponder]
;

And then you will have your keyboard without all the searching for UIKeyboard view everytime the keyboard will appear. No notifications, nothing. Easy.

If you want to implement more difficult stuff you probably want to look at documentation and look for iPad Programming guide, UITextInput and other new protocols are explained so you can implement your textView and get capabilities like text correction, conversion (in case of japanese, etc.) from the OS.

Cheers.

--> If you want only a dot Button on numeral keyboard, have you tried adding you button to your application.window object?
In theory if you add a view there it should appear above the keyboard. You will have to handle animations to make it look native.

I hope it helps

Last edited by nacho4d; 05-09-2010 at 03:09 PM.
nacho4d is offline   Reply With Quote
 

» Advertisements
» Online Users: 369
13 members and 356 guests
Anonymous Username, Art, bebshol53, benney_swet, eski, Farfalo, hacker073, Kirkout, Kryckter, nmi300, Objective Zero, Oral B, spiderguy84
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,561
Threads: 94,079
Posts: 402,745
Top Poster: BrianSlick (7,990)
Welcome to our newest member, benney_swet
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:04 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.