Textfield in navigation controller not responding to user taps
Textfield in navigation controller not responding to user taps
- Subject: Textfield in navigation controller not responding to user taps
- From: Symadept <email@hidden>
- Date: Mon, 04 Apr 2011 16:25:47 +0800
Hi,
I am having a strange problem in implementing UITextField as a part of
leftBarItem of NavigationController.
my leftBarItem customview, UIView has UIButton and UITextFields as subViews.
{
UIButton *theButton = [UIButton buttonWithType:UIButtonTypeCustom];
[theButton setImage:[UIImage imageNamed:@"button.png"]
forState:UIControlStateNormal];
[theButton setImageEdgeInsets:UIEdgeInsetsMake(0.0f, 6.0f, 0.0f,
0.0f)];
theButton.frame = CGRectMake(26+15.0f, 0.0f, 26.0f, 20.0f);
[theButton addTarget:self action:@selector(buttonClicked:)
forControlEvents:UIControlEventTouchUpInside];
theButton.tag = eOVSBItemButton;
}
CustomSearchBar *searchBar = [[CustomSearchBar alloc] init];
searchBar.tag = eOVSBSearchBar;
searchBar.delegate = self;
searchBar.frame = CGRectMake(26+15+26+15.0f, -5.0f, 134, 26.0f);
[leftButtonView addSubview:searchBar];
[searchBar release];
UIBarButtonItem *leftBarButton = [[UIBarButtonItem alloc]
initWithCustomView:leftButtonView];
rootNavController.navigationBar.topItem.leftBarButtonItem = leftBarButton;
Button responds properly but on Tap SearchBar wont gets activated. If I
implement the same searchbar in anyother view, on tap cursor starts
blinking. What am I missing here?
Regards
symadept
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden