Code Monkey home page Code Monkey logo

scindexview's Introduction

scindexview's People

Contributors

lazyycz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scindexview's Issues

页面循环引用

因为 UITableView+SCIndexView.h 中声明了 sc_indexViewDelegate 是 weak 的,sc_indexViewDataSource 是 copy 的,在 .m 中第141行应该用 OBJC_ASSOCIATION_ASSIGN, 166行用 OBJC_ASSOCIATION_COPY_NONATOMIC

swift

出一个swift版本的

iPhone X显示问题

iPhone X上不会默认选中第一个,但是demo运行没有问题,对比demo和我写的代码,没发现有啥特别之处导致会出现这样的问题
IMG_76CDD0A95E5B-1

数据少时最下面几个索引无法点击选中状态

当所有数据不足当前页面展示时,无法选中最后面几个索引,可否支持也能选中状态,类似微信如果数据到最底部时,最后几个索引也可以点击选中状态。(数据足够多的时候,但最后几个分区数据不足一屏时,划到最低部时,最后几个索引也是无法选中状态)

TableViewStyle问题

当tableviewStyle为group类型的时候,第一个索引随滑动会闪烁,plain没问题

关于SCIndexView创建后,tableView位置变化的问题

假设有如下代码在viewDidLoad里执行,1秒后,SCIndexView的位置就有点尴尬了,有没有提供什么方法调整呢?(我目前只能用注释里的那种方法来达到执行SCIndexView的initWithTableview从而让它重新获取tableView.frame的效果)

snipaste_2018-03-07_14-18-27

tableView位置变化后:

image

[UITableView(SCIndexView) SCIndexView_layoutSubviews] (UITableView+SCIndexView.m:)

UIKitCore -[UITableView _updateFocusAfterLoadingCellsWithFocusedView:viewType:] + 200
11 UIKitCore -[UITableView _endUpdatingVisibleCells:originalContentOffset:focusedView:focusedViewType:] + 172
12 UIKitCore -[UITableView _updateVisibleCellsNow:] + 3460
13 UIKitCore -[UITableView layoutSubviews] + 356
14 DUApp -[UITableView(SCIndexView) SCIndexView_layoutSubviews] (UITableView+SCIndexView.m:50)
15 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2500

把sectionitem

-[SectionItem isEqualToString:]: unrecognized selector sent to instance 0x280eba040
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.

底层是scrollView,上面4个subview为tableView时(横向滑动切换界面),如果第一个tableView使用SCIndexView,第二个tableView部分界面会被第一个tableView的SCIndexView遮挡,导致第二个tableView的部分cell无法点击.

底层是scrollView,上面4个subview为tableView时(横向滑动切换界面模式),如果第一个tableView使用SCIndexView,第二个tableView部分界面会被第一个tableView的SCIndexView遮挡,导致第二个tableView的部分cell无法点击.IndexView的frame应该超过了tableView的frame.

我临时的解决办法是把使用SCIndexView了的tableView再加一层底view,这样SCIndexView超出的部分不会影响其他tableView.

支持tableHeaderview和第一个索引位置

如果有tableHeaderView的话,如果再最上面添加一个图片
类似微信最上面是个搜索框,索引第一个是一个🔍的图片
第一个数据源的话会导致数据里有+1这种代码来重新计算数据源并不是一个好的方式。。。

崩溃

运行SCIndexViewDemo项目 , 选择“指向型类型- V2.x”和“中心提示弹层-V2.x” push到相应的控制器, 然后返回回到“选择索引类型”的主界面, 出现崩溃 还望及时更新

真机调试 6sPlus 系统 10.3.2

崩溃信息
'NSInternalInconsistencyException', reason: 'An instance 0x10107dc00 of class UITableView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x174223160>

自动布局情况下 toast模式下 指示器的中心会显示在左上角

用masonry 初始化的时候frame为0的,所以先显示的 这个方法里面要加一个判断
加上这两行代码 就OK了
if (self.configuration.indexViewStyle == SCIndexViewStyleCenterToast){
_indicator.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);
}

  • (void)showIndicator:(BOOL)animated
    {
    if (!self.indicator.hidden || self.currentSection < 0 || self.currentSection >= (NSInteger)self.subTextLayers.count) return;

    CATextLayer *textLayer = self.subTextLayers[self.currentSection];
    if (self.configuration.indexViewStyle == SCIndexViewStyleDefault) {
    self.indicator.center = CGPointMake(self.bounds.size.width - self.indicator.bounds.size.width / 2 - self.configuration.indicatorRightMargin, textLayer.position.y);
    }else if (self.configuration.indexViewStyle == SCIndexViewStyleCenterToast){
    _indicator.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);
    }
    self.indicator.text = textLayer.string;

    if (animated) {
    self.indicator.alpha = 0;
    self.indicator.hidden = NO;
    [UIView animateWithDuration:kAnimationDuration animations:^{
    self.indicator.alpha = 1;
    }];
    } else {
    self.indicator.alpha = 1;
    self.indicator.hidden = NO;
    }
    }

当通过present时,右侧索引视图滑动失效.

当通过presentviewcontroller到tableview页面后(系统大于ios 13),右侧的索引视图滑动时会失效,只能通过点击进行与tableview的互动,而无法通过正常滑动进行.
尝试将scindexview的demo中push改为present后该问题也在示例demo中出现.是否有较好的解决办法?感谢回复!

- (NSUInteger)sectionOfTableViewDidScroll:(UITableView *)tableView 重写

  • (NSUInteger)sectionOfTableViewDidScroll:(UITableView *)tableView
    如何重写,如何知道section 是多少。因为自己估算满足不了新需求,因为。A前面还有其他section,比如”我的企业“,但是”我的企业“section是不用出现在索引中的。

这样的话,不重写,原来默认的索引计算就满足不了了。老是超前一个。在A的时候就显示B,D的时候显示E

希望给点建议

SCIndexView实例添加到页面的位置

因为业务的关系,需要在tableview上动态遮盖一层view,数据会自动通过网络获取,导致本来隐藏在下面遮盖下的索引显示到了上面

自动偏移

你好 ,我的怎么自动往上偏移 一位啊, 选择了 B ,他自动到 A 上面去了

索引不会自动校验

联系人最后索引位 y z #
通过索引移动到 # 后,因为#下数据较少,移动一下列表索引会选中到Y,微信的处理是触摸事件结束会更正一次索引位置

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.