1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關咨詢
      選擇下列產品馬上在線溝通
      服務時間:8:30-17:00
      你可能遇到了下面的問題
      關閉右側工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      ios如何實現(xiàn)可拖動按鈕

      這篇文章給大家分享的是有關ios如何實現(xiàn)可拖動按鈕的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

      創(chuàng)新互聯(lián)是一家專業(yè)的成都網(wǎng)站建設公司,我們專注網(wǎng)站設計制作、成都網(wǎng)站建設、網(wǎng)絡營銷、企業(yè)網(wǎng)站建設,買鏈接廣告投放為企業(yè)客戶提供一站式建站解決方案,能帶給客戶新的互聯(lián)網(wǎng)理念。從網(wǎng)站結構的規(guī)劃UI設計到用戶體驗提高,創(chuàng)新互聯(lián)力求做到盡善盡美。

      代碼:

      - (UIButton *)panButton {
       if (!_panButton) {
        UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)];
        _panButton = [[UIButton alloc] init];
        _panButton.backgroundColor = [UIColor blueColor];
        _panButton.layer.borderWidth = 1.f;
        _panButton.layer.borderColor = [UIColor greenColor].CGColor;
        [_panButton setTitle:@"清除緩存" forState:UIControlStateNormal];
        _panButton.titleLabel.font = [UIFont systemFontOfSize:9];
        [_panButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
        [_panButton addGestureRecognizer:panGesture];
       }
       return _panButton;
      }
      - (void)panAction:(UIPanGestureRecognizer *)recognizer {
       CGPoint translationPoint = [recognizer translationInView:self.view];
       CGPoint center = recognizer.view.center;
       recognizer.view.center = CGPointMake(center.x + translationPoint.x, center.y + translationPoint.y);
       [recognizer setTranslation:CGPointZero inView:self.view];
      }
      -(void)buttonAction:(UIButton *)sender
      {
       NSLog(@"煩人,點我干啥~");
      }

      感謝各位的閱讀!關于“ios如何實現(xiàn)可拖動按鈕”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!


      本文名稱:ios如何實現(xiàn)可拖動按鈕
      文章源于:http://www.ef60e0e.cn/article/gceisc.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        台南县| 彩票| 黄陵县| 漳浦县| 佛坪县| 大安市| 板桥市| 阜康市| 兰西县| 德惠市| 洛阳市| 赤壁市| 昭通市| 合水县| 务川| 广州市| 如东县| 永清县| 休宁县| 教育| 巩义市| 兰坪| 盘锦市| 茶陵县| 华宁县| 龙门县| 龙泉市| 刚察县| 鹤山市| 从江县| 准格尔旗| 库伦旗| 临邑县| 青川县| 榆社县| 文安县| 鄂伦春自治旗| 饶平县| 德令哈市| 黔东| 天祝|