Comments (5)
跟最后一个差不多,你在前面给个占位的空文字,然后放一个按钮。
from headlinenews.
理解了。加一个不用的。 怎么在其他拖动的时候,他不能被移动?
可以添加个协议?,针对哪个item能不能拖动,返回bool 确认。可支持全部位置?
from headlinenews.
我好像理解错了,你说的是我的频道里面,点击编辑按钮后,拖动交换按钮的位置是吗?
要是这样的话,我也不知道该怎么给你说清楚
你看看HNChannelView这个类吧
from headlinenews.
-
(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.
加个continue 似乎就可以了??
from headlinenews.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headlinenews.