Xcode6.2,OSX 10.10.3beta,为什么在iOS7.1模拟器中可以正常运行,在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];
    }
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不能用这样的判断,建议为button的两种状态设置图片,比如:normal->up, selected->down,然后使用titleButton.selected来判断当前button的状态
你应该检查下
XXTitleButton中是否存在不兼容的情况