Set the alpha value of the NavigationItem parameter

I am trying to set the alpha value of a navigation element to animate the right pane, but I cannot force it to change the value. Any suggestions?

self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] 
                                  initWithTitle:@"Avbryt" 
                                  style:UIBarButtonItemStyleBordered
                                  target:self action:@selector(cancelEditing)] autorelease];

self.navigationItem.rightBarButtonItem.customView.alpha = 0.5;
+5
source share
1 answer

In your code you are trying to set alphafor rightBarButtonItem customView, but your rightBarButton element does not contain any custom view. Is not it?

UIBarButtonItem item UIBarItem, , , NSObject. , alpha . alpha customView, , customView; -)

+7

All Articles