0

I have UIToolbar which I am initialising with Nib using following statement.

UIToolbar *toolbar = [[[NSBundle mainBundle] loadNibNamed:@"MyToolbar" owner:self options:nil] objectAtIndex:0] // this is an instance variable.

In nib it is having two buttons for actions which I am setting actions like this.

 [(UIButton *)[toolBar viewWithTag:1234] addTarget:self action:@selector(goalTapped:) forControlEvents:UIControlEventTouchUpInside];
    [(UIButton *)[toolBar viewWithTag:12345] addTarget:self action:@selector(rewardsTapped:) forControlEvents:UIControlEventTouchUpInside];

These actions are triggering on iOS 11 even when I built with Xcode 8.3.3

But these actions are not triggering when i am building the application with XCode 9.

what could be the reason?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
AppleBee
  • 1,199
  • 12
  • 26

1 Answers1

0

I don't know the reason but when I changed from UIToolBar to UIView it started working.

Issue is specific to Xcode 9 and iOS 11 SDK.

AppleBee
  • 1,199
  • 12
  • 26