Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TalkingJourney/SCIndexView
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.1
Choose a base ref
...
head repository: TalkingJourney/SCIndexView
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 14, 2018

  1. update Snapshots

    TalkingJourney committed Jan 14, 2018
    Copy the full SHA
    c830f83 View commit details
  2. Update README.md

    自由流水 authored Jan 14, 2018
    Copy the full SHA
    66df2a6 View commit details

Commits on Jan 15, 2018

  1. fix bug

    Bug1:修改tableView的frame,indexView的frame不正确;
    Bug2:重新设置indexView数据源,indexView索引位置不正确。
    TalkingJourney committed Jan 15, 2018
    Copy the full SHA
    b779889 View commit details
  2. Update SCIndexView.podspec

    自由流水 authored Jan 15, 2018
    Copy the full SHA
    217e9fb View commit details

Commits on Jan 16, 2018

  1. 循环引用

    lazyycz authored Jan 16, 2018
    Copy the full SHA
    680755b View commit details
  2. Merge pull request #3 from lazyycz/patch-1

    循环引用
    自由流水 authored Jan 16, 2018
    Copy the full SHA
    77b7fb5 View commit details
  3. 注释更正

    TalkingJourney committed Jan 16, 2018
    Copy the full SHA
    6ee02fd View commit details
  4. Update SCIndexView.podspec

    自由流水 authored Jan 16, 2018
    Copy the full SHA
    475833d View commit details

Commits on Jan 17, 2018

  1. v2.0.0

    TalkingJourney committed Jan 17, 2018
    Copy the full SHA
    42b7741 View commit details
  2. add remove indexView

    TalkingJourney committed Jan 17, 2018
    Copy the full SHA
    5545116 View commit details
  3. Merge pull request #4 from TalkingJourney/2.x

    2.x
    自由流水 authored Jan 17, 2018
    Copy the full SHA
    6c8fb12 View commit details
  4. Update README.md

    自由流水 authored Jan 17, 2018
    Copy the full SHA
    13e2822 View commit details

Commits on Jan 18, 2018

  1. fix CGContext error info

    TalkingJourney committed Jan 18, 2018
    Copy the full SHA
    121b5f7 View commit details
  2. Update SCIndexView.podspec

    自由流水 authored Jan 18, 2018
    Copy the full SHA
    de9109d View commit details

Commits on Jan 19, 2018

  1. fix bug : less than iOS11 crash

    TalkingJourney committed Jan 19, 2018
    Copy the full SHA
    5524d3d View commit details

Commits on Jan 22, 2018

  1. Update SCIndexViewController.m

    自由流水 authored Jan 22, 2018
    Copy the full SHA
    251e6cc View commit details

Commits on Jan 23, 2018

  1. add impact feedback generator

    DarrenTemp committed Jan 23, 2018
    Copy the full SHA
    2b0b171 View commit details
  2. Merge pull request #6 from DarrenKong/master

    add impact feedback generator
    自由流水 authored Jan 23, 2018
    Copy the full SHA
    97a0f19 View commit details
  3. Update SCIndexView.podspec

    自由流水 authored Jan 23, 2018
    Copy the full SHA
    0d760b4 View commit details

Commits on Jan 30, 2018

  1. 提示更新

    TalkingJourney committed Jan 30, 2018
    Copy the full SHA
    547810c View commit details

Commits on Feb 25, 2018

  1. add UITableViewIndexSearch type

    TalkingJourney committed Feb 25, 2018
    Copy the full SHA
    20ed08f View commit details

Commits on Mar 23, 2018

  1. fix bug #8

    fix bug:tableView通过约束改变frame,但是indexView位置不会跟随改变
    TalkingJourney committed Mar 23, 2018
    Copy the full SHA
    78d1977 View commit details
  2. fix bug #9

    TalkingJourney committed Mar 23, 2018
    Copy the full SHA
    5a66394 View commit details
  3. Update SCIndexView.podspec

    自由流水 authored Mar 23, 2018
    Copy the full SHA
    6ed8d43 View commit details

Commits on Apr 13, 2019

  1. add ignore tableview sections

    TalkingJourney committed Apr 13, 2019
    Copy the full SHA
    fb374e6 View commit details

Commits on Jun 20, 2019

  1. 添加手动更新indexView的currentSection方法

    TalkingJourney committed Jun 20, 2019
    Copy the full SHA
    90d6863 View commit details
  2. avoid crashing when row data is empty

    TalkingJourney committed Jun 20, 2019
    Copy the full SHA
    1ee3aef View commit details

Commits on Jun 21, 2019

  1. 代码优化

    TalkingJourney committed Jun 21, 2019
    Copy the full SHA
    d4b3c3f View commit details
  2. 优化注释

    TalkingJourney committed Jun 21, 2019
    Copy the full SHA
    3a893c3 View commit details
  3. sectionHeaderView添加渐变效果

    TalkingJourney committed Jun 21, 2019
    Copy the full SHA
    8734312 View commit details

Commits on Jun 23, 2019

  1. 删除debug代码

    TalkingJourney committed Jun 23, 2019
    Copy the full SHA
    0716560 View commit details
  2. fix bug:#20

    ScrollView嵌套多个TableView,滑动到其他TableView时,点击cell失效
    TalkingJourney committed Jun 23, 2019
    Copy the full SHA
    e00803b View commit details
  3. version 2.2.1

    TalkingJourney committed Jun 23, 2019
    Copy the full SHA
    9241104 View commit details

Commits on Jun 24, 2019

  1. fix bug:#27

    TalkingJourney committed Jun 24, 2019
    Copy the full SHA
    4615a17 View commit details

Commits on Oct 24, 2019

  1. fix bug: #29

    TalkingJourney committed Oct 24, 2019
    Copy the full SHA
    65d05e6 View commit details
  2. fix bug: #33

    TalkingJourney committed Oct 24, 2019
    Copy the full SHA
    da0a9f8 View commit details
  3. fix bug: #28

    TalkingJourney committed Oct 24, 2019
    Copy the full SHA
    51d50b9 View commit details

Commits on Oct 26, 2019

  1. fix bug: #36

    TalkingJourney committed Oct 26, 2019
    Copy the full SHA
    c77593c View commit details

Commits on Oct 29, 2019

  1. Update SCIndexView.podspec

    TalkingJourney committed Oct 29, 2019
    Copy the full SHA
    ddd140f View commit details

Commits on Dec 3, 2020

  1. fix bug:#41

    TalkingJourney committed Dec 3, 2020
    Copy the full SHA
    33620b5 View commit details

Commits on Jan 5, 2021

  1. 索引添加设置字体属性

    TalkingJourney committed Jan 5, 2021
    Copy the full SHA
    7b38373 View commit details
  2. Update SCIndexView.podspec

    TalkingJourney committed Jan 5, 2021
    Copy the full SHA
    c327757 View commit details
Showing with 1,222 additions and 201 deletions.
  1. +32 −3 README.md
  2. +12 −17 SCIndexView.podspec
  3. +11 −3 SCIndexView/SCIndexView.h
  4. +263 −101 SCIndexView/SCIndexView.m
  5. +6 −16 SCIndexView/SCIndexViewConfiguration.h
  6. +10 −1 SCIndexView/SCIndexViewConfiguration.m
  7. +45 −0 SCIndexView/UITableView+SCIndexView.h
  8. +193 −0 SCIndexView/UITableView+SCIndexView.m
  9. +33 −3 SCIndexViewDemo/SCIndexViewDemo.xcodeproj/project.pbxproj
  10. +8 −0 SCIndexViewDemo/SCIndexViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  11. +8 −0 ...xViewDemo/SCIndexViewDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  12. +174 −0 SCIndexViewDemo/SCIndexViewDemo/IgnoreSectionsIndexes.plist
  13. +1 −1 SCIndexViewDemo/SCIndexViewDemo/Info.plist
  14. +2 −1 SCIndexViewDemo/SCIndexViewDemo/SCIndexViewController.h
  15. +63 −33 SCIndexViewDemo/SCIndexViewDemo/SCIndexViewController.m
  16. +16 −0 SCIndexViewDemo/SCIndexViewDemo/SCIndexViewHeaderView.h
  17. +113 −0 SCIndexViewDemo/SCIndexViewDemo/SCIndexViewHeaderView.m
  18. +10 −0 SCIndexViewDemo/SCIndexViewDemo/SCTableViewsController.h
  19. +160 −0 SCIndexViewDemo/SCIndexViewDemo/SCTableViewsController.m
  20. +0 −7 SCIndexViewDemo/SCIndexViewDemo/SectionItem.h
  21. +0 −7 SCIndexViewDemo/SCIndexViewDemo/SectionItem.m
  22. +62 −8 SCIndexViewDemo/SCIndexViewDemo/ViewController.m
  23. BIN SCIndexViewDemo/Snapshots/demo_center_toast.PNG
  24. BIN SCIndexViewDemo/Snapshots/demo_center_toast.gif
  25. BIN SCIndexViewDemo/Snapshots/demo_default.gif
  26. BIN SCIndexViewDemo/Snapshots/demo_default.png
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# SCIndexView
SCIndexView provide a index view like Wechat.

# 效果
微信效果图:
![defalut style.gifo动](https://github.com/TalkingJourney/SCIndexView/blob/master/SCIndexViewDemo/Snapshots/demo_default.gif)
toast效果图:
![center toast style.gifo动](https://github.com/TalkingJourney/SCIndexView/blob/master/SCIndexViewDemo/Snapshots/demo_center_toast.gif)

# 功能及优点
主要功能及优点如下:
1. 当滑动UITableView列表时,索引视图的索引位置会跟着移动;
2. UITableView和SCIndexView之间手势和事件不冲突,操作其中一个视图,另一个视图失效;
3. 当滑动索引视图时,会有指示器或者toast提示当前索引位置;
4. 索引视图可以从sc_startSection开始,忽略前面section;
5. 可以任意定制指示器、toast、索引视图的大小,文字颜色大小,间距等UI样式;
6. 当第一个数据为UITableViewIndexSearch时,自动添加放大镜图标。

# 使用方法
可以通过CocoaPods导入,支持iOS7及以上。

pod 'SCIndexView'

1. 创建SCIndexViewConfiguration对象,这个对象用来控制索引的UI样式;
2. 设置UITableView对象的 sc_translucentForTableViewInNavigationBar 和 sc_indexViewConfiguration;
3. 再设置UITableView对象的索引数据源。
不用再关心SCIndexView视图本身,直接在UITableView上设置即可。

```
SCIndexViewConfiguration *indexViewConfiguration = [SCIndexViewConfiguration configuration];
tableView.sc_indexViewConfiguration = indexViewConfiguration;
tableView.sc_translucentForTableViewInNavigationBar = YES;
tableView.sc_indexViewDataSource = indexViewDataSource;
```

# 结束
如果大家有什么想法的话,可以向我反馈。如果大家喜欢的话,也可以通过star来鼓励下我,感谢大家捧场。
29 changes: 12 additions & 17 deletions SCIndexView.podspec
Original file line number Diff line number Diff line change
@@ -8,22 +8,17 @@

Pod::Spec.new do |s|

s.name = "SCIndexView"
s.version = "1.1.1"
s.summary = "SCIndexView provide a index view."
s.description = "SCIndexView provide a index view like Wechat. It is very easy."

s.homepage = "https://github.com/TalkingJourney/SCIndexView"
s.license = { :type => 'MIT', :file => 'LICENSE' }

s.author = { "TalkingJourney" => "https://github.com/TalkingJourney" }

s.platform = :ios, "7.0"

s.source = { :git => "https://github.com/TalkingJourney/SCIndexView.git", :tag => "1.1.1" }

s.source_files = "SCIndexView/**/*.{h,m}"
s.public_header_files = "SCIndexView/**/*.h"
s.requires_arc = true
s.name = "SCIndexView"
s.summary = "SCIndexView provide a index view."
s.description = "SCIndexView provide a index view like Wechat. It is very easy."
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.homepage = "https://github.com/TalkingJourney/SCIndexView"
s.author = { "TalkingJourney" => "https://github.com/TalkingJourney" }
s.platform = :ios, "7.0"
s.requires_arc = true
s.version = "2.2.4"
s.source = { :git => "https://github.com/TalkingJourney/SCIndexView.git", :tag => s.version }
s.source_files = "SCIndexView/**/*.{h,m}"
s.public_header_files = "SCIndexView/**/*.h"

end
14 changes: 11 additions & 3 deletions SCIndexView/SCIndexView.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@
- (void)indexView:(SCIndexView *)indexView didSelectAtSection:(NSUInteger)section;

/**
当滑动tableView时,索引位置改变,你需要自己返回索引位置时,实现此方法
当滑动tableView时,索引位置改变,你需要自己返回索引位置时,实现此方法。
不实现此方法,或者方法的返回值为 SCIndexViewInvalidSection 时,索引位置将由控件内部自己计算。
@param indexView 索引视图
@param tableView 列表视图
@@ -29,20 +30,27 @@

@interface SCIndexView : UIControl

@property (nonatomic, strong) id<SCIndexViewDelegate> delegate;
@property (nonatomic, weak) id<SCIndexViewDelegate> delegate;

// 索引视图数据源
@property (nonatomic, copy) NSArray<NSString *> *dataSource;

// 当前索引位置
@property (nonatomic, assign) NSInteger currentSection;

// tableView在shangNavigationBar上是否半透明
// tableView在NavigationBar上是否半透明
@property (nonatomic, assign) BOOL translucentForTableViewInNavigationBar;

// tableView从第几个section开始使用索引 Default = 0
@property (nonatomic, assign) NSUInteger startSection;

// 索引视图的配置
@property (nonatomic, strong, readonly) SCIndexViewConfiguration *configuration;

// SCIndexView 对 tableView 进行 weak 引用
- (instancetype)initWithTableView:(UITableView *)tableView configuration:(SCIndexViewConfiguration *)configuration;

// 手动更新IndexView的CurrentSection
- (void)refreshCurrentSection;

@end
Loading