Why can it run normally in the iOS7 simulator and not in the iOS8 simulator? . .

  ios, question

Xcode6.2, OSX 10.10.3beta, why can it run normally in the iOS7.1 simulator, and is invalid in the simulator above iOS8. . .

- (void)titleButtonClick:(XXTitleButton *)titleButton {
 UIImage *down = [UIImage imageWithName:@"navigationbar_arrow_down"];
 UIImage *up = [UIImage imageWithName:@"navigationbar_arrow_up"];
 if (titleButton.currentImage == down) {
 [titleButton setImage:up forState:UIControlStateNormal];
 [self.view addSubview:self.titleMenu];
 }else {
 [titleButton setImage:down forState:UIControlStateNormal];
 [self.titleMenu removeFromSuperview];
if (titleButton.currentImage == down)

This judgment cannot be used. it is recommended to set pictures for two States of button, for example: normal->up, selected->down, and then use titleButton.selected to judge the current state of button