UIBarButtonItem: How can I find its frame?

0 votes
1,162 views
asked Nov 19, 2014 in Objective C by admin (8,115 points)

Hi

   I have a button in a toolbar. How can I grab its frame? Do UIBarButtonItems not have a frameproperty?

1 Answer

0 votes
answered Nov 19, 2014 by kalpana (3,995 points)

-(IBAction)actionMenuButtonPressed:(id)sender

{

    UIBarButtonItem *item = sender;

    UIView *view = [item valueForKey:@"view"];

    if(view){

        CGPoint point = view.frame.origin;

        

    }

}

...