ile
[self.window makeFirstResponder:self.nextKeyView]
sonraki yanıtlayıcısını ayarlamak dönen
Orada
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector {
BOOL result = NO;
if (commandSelector == @selector(insertTab:)) {
// tab action:
result = NO;
}
return result;
}
(YES'i döndürmeniz gerektiğini unutmayın, yani Tab'i işliyorsunuz demektir) ... tamamen güvenemezsiniz nextKeyView
nextKeyView
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector
{
BOOL result = NO;
if (commandSelector == @selector(insertTab:)) {
// tab action:
// always insert a tab character and don’t cause the receiver to end editing
if ([self.nextKeyView isKindOfClass:[NSTextField class]]) {
[(NSTextField *)self.nextKeyView selectText:self];
result = YES;
} else {
//[textView insertTabIgnoringFieldEditor:self];
result = NO;
}
}
return result;
}
mi
NSTextField
alt sınıfında bu koyun ve bağlantı 'self.nextKeyView' doğru sekme tuşu vurduğunuzda? Geri sekmesi (shift-sekmesi) çalışır mı? – Willekeyup, kesinlikle doğruydu –