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 04-16-2010, 05:23 PM   #38 (permalink)
0x5A
Registered Member
 
Join Date: Apr 2010
Posts: 1
0x5A is on a distinguished road
Default

Hi everybody,

I found out there is something new in the iPhone SDK 3.2 which is (UITextField class) :

inputView: The custom input view to display when the text field becomes the first responder. If the value in this property is nil, the text field displays the standard system keyboard when it becomes first responder. Assigning a custom view to this property causes that view to be presented instead. The default value of this property is nil.

inputAccessoryView: The custom accessory view to display when the text field becomes the first responder. The default value of this property is nil. Assigning a view to this property causes that view to be displayed above the standard system keyboard (or above the custom input view if one is provided) when the text field becomes the first responder. For example, you could use this property to attach a custom toolbar to the keyboard.


This would allow us to implement our own keyboard but still having the cursor, cut-copy-past, etc... Unfortunately, iPhone OS 3.2 is iPad only ...


Quote:
Originally Posted by StatCoder View Post
Also, be aware that Apple is flagging apps that use "keyboardDidShow:" as an undocumented API.
I dont' see how "keyboardDidShow:" can be an undocumented API, it's just a method that could be given another name =/. It just answers to the UIKeyboardWillShowNotification notification which is public.

If Apple's warning is about the use of UIKeyboard then I think we can completely hide the window containing the keyboard so we don't make any calls to a UIKeyboard object :

Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
	
	// ...
}

- (void)keyboardWillShow:(NSNotification *)note
{
	// To hide the keyboard you can hide the window
	// that contains the keyboard (description starts
	// by "<UITextEffectsWindow") or hide the keyboard
	// itself (description starts by "<UIKeyboard" or
	// "<UIPeripheralHostView" on the iPad").
	
	NSArray* windows = [[UIApplication sharedApplication] windows];
	NSUInteger windowCount = [windows count];
	
	
	// Going through each window of our application
	for (NSUInteger i = 0; i < windowCount; i++)
	{
		/* Hidding the window containing the keyboard */
		
		UIWindow* currentWindow = [windows objectAtIndex:i];
		
		if ([[currentWindow description] hasPrefix:@"<UITextEffectsWindow"])
		{
			[currentWindow setHidden:YES];
		}
		
		/* Print some information (windows & their subviews) ... */
		
		NSArray* currentWindowSubviews = [currentWindow subviews];
		NSUInteger subViewCount = [currentWindowSubviews count];
		
		
		NSLog(@"Window #%u : %@", i, currentWindow);
		
		for (NSUInteger j = 0; j < subViewCount; j++)
		{
			NSLog(@"  View #%u : %@", j, [currentWindowSubviews objectAtIndex:j]);
		}
	}
}
Do you think this would be rejected ?


Thanks .
0x5A is offline   Reply With Quote
 

» Advertisements
» Online Users: 357
12 members and 345 guests
AdamL, baja_yu, bignoggins, deloisig73, Duncan C, HemiMG, heshiming, hussain1982, ilmman, jbro, krisk, mediaspree
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,558
Threads: 94,079
Posts: 402,741
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Garros1990
Powered by vBadvanced CMPS v3.1.0

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