美文网首页
ios按钮禁止高亮状态

ios按钮禁止高亮状态

作者: summerTa | 来源:发表于2018-09-18 14:54 被阅读0次

_button = [UIDragButton buttonWithType:UIButtonTypeCustom];

    _button.backgroundColor = [UIColor colorWithRed:0.0/255 green:199.0/255 blue:100.0/255 alpha:1];

    // 按钮图片伸缩充满整个按钮

    _button.imageView.contentMode = UIViewContentModeScaleToFill;

    _button.frame = CGRectMake(0, 0, floatSize, floatSize);

    // 按钮点击事件

    // 初始选中状态

    _button.selected=NO;

    // 禁止高亮

    _button.adjustsImageWhenHighlighted = NO;

    _button.rootView = self.view.superview;

    _button.btnDelegate = self;

    _button.imageView.alpha = 0.8;

相关文章

网友评论

      本文标题:ios按钮禁止高亮状态

      本文链接:https://www.haomeiwen.com/subject/ygxpnftx.html