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

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to