Wednesday 15 September 2010

ios - Info button as UIBarButtonItem doesn't respond to taps -


I am trying to add the program and the info button in my app's navigation. However, this does not take any such action which I am recording it.

  UIBarButtonItem * infoButton = [[UIBarButtonItem alloc] initWithCustomView: [UIButton with button type: UIButtonTypeInfoLight]]; [Info button set goal: self]; [InfoButton setAction: @selector (InfoButtonTapped)];   

The button appears in my navbar bar, but clicking on it does not enter information.

Add Target / Action Bar Button item to UIButton behaves differently when it is set from UIButton.

  UIButton * button = [UIButton buttonWithType: UIButtonTypeInfoLight]; [Button addTarget: Self-action: @Selector (InfoButtonTapped) forControlEvents: UIControlEventTouchUpInside]; UIBarButtonItem * infoButton = [[UIBarButtonItem alloc] initWithCustomView: button];    

No comments:

Post a Comment