Salut

voici ma situation,j'ai crée un tabBarController,et en cliquant sur un tabBarItem une alerte s'affiche permettant l'authentification.
L'alerte fonctionne mais le clavier virtuelle m'empèche de taper dans les textfield et je voudrai bien le masquer.
Quelqu'un peut m'aider stp
voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#import "AlertPrompt.h"

																	

@implementation AlertPrompt



@synthesize textFieldP;
@synthesize textField;
@synthesize enteredText;

- (id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okayButtonTitle textfieldPosY:(CGFloat)posY {
	
	if (self = [super initWithTitle:title message:[NSString stringWithFormat:@"%@\n\n\n\n\n\n", message] delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:okayButtonTitle, nil])
	{  {
		UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 120.0, 260.0, 25.0)];
		[theTextField setBackgroundColor:[UIColor whiteColor]];
		[theTextField setPlaceholder:@"Username"];
		[self addSubview:theTextField];
		//self.textField = theTextField;
		//[theTextField release];
		}
		
		{
			UITextField *theTextFieldP = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 150.0, 260.0, 25.0)];
		[theTextFieldP setBackgroundColor:[UIColor whiteColor]];
		[theTextFieldP setPlaceholder:@"Password"];
		[theTextFieldP setSecureTextEntry:YES];
		[self addSubview:theTextFieldP];
		//self.textFieldP = theTextFieldP;
		//[theTextFieldP release];
		
		
		
		
		//CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0);
		//[self setTransform:translate];
	
	}
	}
	return self;
}

- (BOOL)textFieldShouldReturn:(UITextField *)textfield {
	if(textfield == textField|| textfield == textFieldP) {
		//Permet la rétractation du clavier virtuel
		[textfield resignFirstResponder];
	}
	return YES;
}



- (void)dismissKeyboard {
	/
	[textField resignFirstResponder];
	[textFieldP resignFirstResponder];
}
/*
- (void)show {
	[super show];
	[textField becomeFirstResponder];
}
*/
- (NSString *)enteredText {
	return textFieldP.text;
	return textField.text;
}


- (void)dealloc {
	[textFieldP release];
	[textField release];
	[super dealloc];
}

@end