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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to