바보 같은 일로 곤란을 겪고 있습니다. 탐색 표시 줄과 테이블보기가있는보기가 있습니다. 내 탐색 바에 "검색"왼쪽 버튼이 있습니다. 사용자가이 "검색"버튼을 누르면 표보기가 내려 가고 탐색 전용의 새보기가 내 탐색 막대와 표보기 사이에 오게됩니다.addsubview + commitAnimations 후에 UITextfield가 응답하지 않습니다.
나는 단지의 UITextField를 구현하는 뷰 컨트롤러를 가지고있다 :
#import <UIKit/UIKit.h> @interface serachBox : UIViewController <UITextFieldDelegate> { IBOutlet UITextField *kWTextField; } @end
내 다른 뷰 컨트롤러 내 요소 (탐색 바, 테이블 바 ...)이 있습니다. 여기에 내 검색 버튼을 눌러에서 사용하는 기능은 다음과 같습니다
- (void) pressSearchBtn:(id)sender{ [searchBox.view setFrame:CGRectMake(0, -100, 320, 100)]; CGRect theFrame = self.view.frame; [UIView beginAnimations:@"frame" context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationDelegate:self]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; theFrame.origin.y = 100; [self.view addSubview:searchBox.view]; self.view.frame = theFrame; [UIView commitAnimations]; }
내 문제는 내 검색 창보기는 잘 보이지만 그녀의 텍스트 필드 나던 응답 때 나는 그것을 클릭합니다. 나는 (애니메이션 물건을 수행하지 않고) 간단한 서브 뷰 추가를 테스트했다.
무엇이 문제입니까?
기술적으로 말하면이 솔루션은 좋지만 내 앱을 사용하는 사용자 환경에서는 올바르게 사용할 수 없습니다. – Mat