Giter VIP home page Giter VIP logo

Comments (5)

tianliangyihou avatar tianliangyihou commented on August 22, 2024

跟最后一个差不多,你在前面给个占位的空文字,然后放一个按钮。

from headlinenews.

yanchaoGan avatar yanchaoGan commented on August 22, 2024

理解了。加一个不用的。 怎么在其他拖动的时候,他不能被移动?

可以添加个协议?,针对哪个item能不能拖动,返回bool 确认。可支持全部位置?

from headlinenews.

tianliangyihou avatar tianliangyihou commented on August 22, 2024

我好像理解错了,你说的是我的频道里面,点击编辑按钮后,拖动交换按钮的位置是吗?
要是这样的话,我也不知道该怎么给你说清楚
你看看HNChannelView这个类吧

from headlinenews.

yanchaoGan avatar yanchaoGan commented on August 22, 2024
  • (void)newLocationTagForBtn:(HNButton )moveBtn locationBlock:(void(^)(HNChannelModel targetModel))locationBlock {
    HNChannelModel *moveBtnModel = moveBtn.model;
    CGPoint moveBtnCenter = moveBtn.center;
    dispatch_async(_queue, ^{
    NSMutableArray *models = [[NSMutableArray alloc]initWithArray:self.datas];
    for (HNChannelModel *model in models) {
    if (model == moveBtnModel) {
    continue;
    }
    if (!model.isMyChannel) {
    continue;
    }
    if ([model.name isEqualToString:@"推荐"]) {
    continue;
    }

          if (CGRectContainsPoint(model.frame,moveBtnCenter)) {
              locationBlock(model);
          }
      }
    

    });
    }

from headlinenews.

yanchaoGan avatar yanchaoGan commented on August 22, 2024

加个continue 似乎就可以了??

from headlinenews.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.