, 파란색 retangle이 이미지처럼, 첫 번째 응답자가되는 NSTextField있는 객체 외부에 나타납니다 :
link for Normal CaseNSTextField 외부의 파란색 초점 링이 누락 되었습니까? 보통의 경우
는 그러나, 나는 밖에있는 파란색 테두리가없는 NSTextField있는 있어요. 왜 그런가요?
다음은 어떻게 작동하는지입니다.
> 일반적인 MAC OS 응용 프로그램을 만듭니다.
2> 해당보기의 addSubview : 및 removeFromSuperview 메서드를 호출하여 앱의 하위보기를 전환합니다.
3> 하나의 서브 뷰 (실제로 위에서 언급 한 이미지 임)에서 "Next"버튼을 클릭합니다. 그 조치는 (하위 뷰의 컨트롤러하는 .m 파일에 정의)이 같은 것입니다 :
- (IBAction)actionNextClicked:(id)sender{
//_hdlThreadNext is a NSThread object
[[_hdlThreadNext alloc] initWithTarget:self [email protected](threadNext:) object:nil];
[_hdlThreadNext start];
}
을 그리고 스레드가 같은 수 있습니다 : 또 하나
가- (void)threadNext:(id)sender{
@autoreleasepool{
BOOL success;
[CATransation begin];
/* send username and password and decrypt responce */
... // balabala... and set "success"
if (success){
[[self view] removeFromSuperview];
[self sendMessageToSuperview:@"Add Next View"]; // Superview's method, telling superview to call addSubview: to add another subview
}
else{
/* Nothing special to do */
}
[CATransation commit];
}
}
4> 하위 뷰 스위치. 그 콤보 뷰는 괜찮은 것 같습니다 : image for combo view
그러나 다른 NSTextView의 파란색 테두리는 더 이상 나타나지 않을 것입니다!
어떤 사람이 내가 잘못했는지 알고 있습니까? 고마워요!