zoukankan      html  css  js  c++  java
  • 一个button,一个手势+一个事件(touchupinside)

    - (void)configureArrowButton:(UIButton *)button

                        withText:(NSString *)text

                         fastTap:(SEL)fastTapSel

                         deepTap:(SEL)deepTapSel

    {

       // button.titleLabel.font = [UIFont fontWithName:@"Hiragino Mincho ProN" size:20];

        [button setTitleColor:[UIColordarkGrayColor] forState:UIControlStateNormal];

        [button setTitleColor:[UIColorblackColor] forState:UIControlStateHighlighted];

        [button setTitleShadowColor:[UIColorwhiteColor] forState:UIControlStateNormal];

        //button.titleLabel.shadowOffset = CGSizeMake(0,1);

        //[button setTitle:text forState:UIControlStateNormal];

     

       

        [button addTarget:selfaction:fastTapSel forControlEvents:UIControlEventTouchDown];

        UILongPressGestureRecognizer * deepPress = [[UILongPressGestureRecognizeralloc] initWithTarget:selfaction:deepTapSel];

        deepPress.allowableMovement = 15.0;

        deepPress.cancelsTouchesInView = NO;

        [button addGestureRecognizer:deepPress];

    }

    1,当一个按钮上同时 加事件和 手势,ios5不支持的,

  • 相关阅读:
    csps模拟测试70
    模拟测试66反思
    csps63总结
    csps60爆零记
    csps模拟测试57
    模拟测试52,53反思
    LOJ2542「PKUWC2018」随机游走
    LOJ6300 BZOJ5283 [CodePlus 2018 3 月赛]博弈论与概率统计
    2019暑假集训
    省队二轮集训笔记
  • 原文地址:https://www.cnblogs.com/guligei/p/3068321.html
Copyright © 2011-2022 走看看