huangxuan518 / hxtagsview Goto Github PK
View Code? Open in Web Editor NEWHXTagsView是一款支持自动布局的标签tag 演示地址:https://appetize.io/app/f9a5kn2tnfe0kade2zy7g2mja
HXTagsView是一款支持自动布局的标签tag 演示地址:https://appetize.io/app/f9a5kn2tnfe0kade2zy7g2mja
在计算tag 标签大小的时候,frame.size.width + _tagAttribute.tagSpace;,为何要添加上这个间距,如果 frame.size.width 正好 == maxSize.width,则会给出警告
The behavior of the UICollectionViewFlowLayout is not defined because: the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values. Please check the values returned by the delegate.
collectionView.collectionViewLayout = _layout;
大佬,你的cocoapods如此马虎的,刚刚给你一个star,正在考虑是否撤销,请大佬更新cocoapods。
您好,感谢提供框架!
使用中遇到问题想咨询下.
@Property (nonatomic,assign) CGFloat tagSpace;//标签内部左右间距(标题距离边框2边的距离和)
这个属性可以设置一个标签内部的左右间距,请问上下间距该如何设置呢
能不能抽空指导一下,或者方便留个QQ?
博主你好,看了一下demo好像并没有实现默认选中的功能。能否加一个默认选中第几个的功能,谢谢。
你好,在使用过程中发现多行平铺,tags数组如果有相同的元素,tagsView不能显示出来。另外使用多个tagsView和其他多控件,布局结合Masonry使用发现tagsView的位置不能很好控制。
- (NSArray *)disposeTags:(NSArray *)ary {
NSMutableArray *disposeTags = [NSMutableArray new];//纵向数组
NSMutableArray *subTags = [NSMutableArray new];//横向数组
float originX = _tagOriginX;
float maxFrameWidth = self.frame.size.width-_tagOriginX*2;
for (NSString *tagTitle in ary) {
NSUInteger index = [ary indexOfObject:tagTitle];
NSLog(@"index === %lu",(unsigned long)index);
NSUInteger index = [ary indexOfObject:tagTitle];
这个是传一个字符串,找他在数组中的位置,那么问题就来了,如果一个数组里好多个一样的字符串。如,一个数组为:1,1,1,1,1,1
那么遍历时传入字符串,他返回的index永远是1啊。
so,it's a bug.
嘿嘿~~~
如何设置 多行不滚啊? 你的demo好复杂。
我是多个TableView Cell 里面都添加了一个 HXTagsView 子控件。 多行单选 不能滚动,
我选中了一个TAG 变成选中状态。 只要我 一滚动 就会出现 collectionView重用问题 tag 变成默认颜色
collectionView section设置多行只显示一行
the behavior of the UICollectionViewFlowLayout is not defined because:
2016-08-03 17:15:54.596 HXTagsView[8803:216791] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
查了下
错误原因:
UICollectionViewFlowLayout的itemSize的宽或者高设置的有问题!它的size必须在父容器的范围之内!
,看看能不能修改下吧
UICollectionView received layout attributes for a cell with an index path that does not exist:
重复的class导致编译报错 duplicate symbol OBJC_IVAR$_AppDelegate._window in: 。。。。。
希望作者可以从pods中移除AppDelegate 和 Main文件。
希望能给一个tableview的demo
cell加载HXTagsView,当多行时怎么保证只选择一个,也就是说整个tableView只有一个标签是选中状态,麻烦指教,谢谢
就是点击某个按钮,变按钮背景颜色,表示选中。
然后点击其他按钮的时候,其他按钮变背景颜色,恢复刚才那个按钮的背景颜色。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.