All Projects → cillyfly → Mxscroll

cillyfly / Mxscroll

Licence: mit
Easier with scroll

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Mxscroll

Hvscrollview
这不是框架,只是3个示例程序,给大家提供一个实现这种布局的思路
Stars: ✭ 584 (+267.3%)
Mutual labels:  scrollview, segment
Jxpagelistview
高仿闲鱼、转转、京东、中央天气预报等主流APP列表底部分页滚动视图
Stars: ✭ 377 (+137.11%)
Mutual labels:  scrollview, segment
Jxsegmentedview
A powerful and easy to use segmented view (segmentedcontrol, pagingview, pagerview, pagecontrol, categoryview) (腾讯新闻、今日头条、QQ音乐、网易云音乐、京东、爱奇艺、腾讯视频、淘宝、天猫、简书、微博等所有主流APP分类切换滚动视图)
Stars: ✭ 1,905 (+1098.11%)
Mutual labels:  scrollview, segment
Sppagemenu
分页菜单,功能非常齐全,满足绝大多数APP,简书地址:
Stars: ✭ 402 (+152.83%)
Mutual labels:  scrollview, segment
Jxcategoryview
A powerful and easy to use category view (segmentedcontrol, segmentview, pagingview, pagerview, pagecontrol) (腾讯新闻、今日头条、QQ音乐、网易云音乐、京东、爱奇艺、腾讯视频、淘宝、天猫、简书、微博等所有主流APP分类切换滚动视图)
Stars: ✭ 5,561 (+3397.48%)
Mutual labels:  scrollview, segment
Pull To Refresh
ESPullToRefresh is developed and maintained by Vincent Li. If you have any questions or issues in using ESPullToRefresh, welcome to issue. If you want to contribute to ESPullToRefresh, Please submit Pull Request, I will deal with it as soon as possible.
Stars: ✭ 1,591 (+900.63%)
Mutual labels:  scrollview
React Native Directed Scrollview
UNMAINTAINED- see below. A natively implemented scrollview component which lets you specify different scroll directions for child content.
Stars: ✭ 139 (-12.58%)
Mutual labels:  scrollview
Tkdotsegment
TKDotSegment is a segment with dot animation
Stars: ✭ 103 (-35.22%)
Mutual labels:  segment
Bouncescrollview
🔥🔥 An Android costomized ScrollView which likes UIScrollView over-scrolling effect in iOS.
Stars: ✭ 93 (-41.51%)
Mutual labels:  scrollview
Observablescrollview
高仿美团APP页面滑动标题栏渐变效果
Stars: ✭ 153 (-3.77%)
Mutual labels:  scrollview
Tangram Ios
Tangram is a modular UI solution for building native page dynamically, including Tangram for Android, Tangram for iOS and even backend CMS. This project provides the sdk on iOS platform.
Stars: ✭ 1,800 (+1032.08%)
Mutual labels:  scrollview
Swift project
原OC项目用swift实现,纯swift项目,可作为学习swift的demo,包含多个自定义控件,并且进行封装网络请求库,结构清晰。
Stars: ✭ 133 (-16.35%)
Mutual labels:  segment
Gse
Go efficient multilingual NLP and text segmentation; support english, chinese, japanese and other. Go 高性能多语言 NLP 和分词
Stars: ✭ 1,695 (+966.04%)
Mutual labels:  segment
Piecewise linear fit py
fit piecewise linear data for a specified number of line segments
Stars: ✭ 141 (-11.32%)
Mutual labels:  segment
Consecutivescroller
ConsecutiveScrollerLayout是Android下支持多个滑动布局(RecyclerView、WebView、ScrollView等)和普通控件(TextView、ImageView、LinearLayou、自定义View等)持续连贯滑动的容器,它使所有的子View像一个整体一样连续顺畅滑动。并且支持布局吸顶功能。
Stars: ✭ 1,383 (+769.81%)
Mutual labels:  scrollview
Analytics React
[DEPRECATED AND UNSUPPORTED] The hassle-free way to integrate analytics into your React application.
Stars: ✭ 146 (-8.18%)
Mutual labels:  segment
Rdgliderviewcontroller Swift
Control for a floating view gliding over a ViewController Edit
Stars: ✭ 102 (-35.85%)
Mutual labels:  scrollview
Widgetlayout
自定义ViewGroup的集合(有 kotlin 实现分支):提高编写效率和 UI 绘制性能,少嵌套,易用易扩展。
Stars: ✭ 130 (-18.24%)
Mutual labels:  scrollview
Wormtabstrip
🐛 WormTabStrip ViewPager for iOS written in Swift, which gives continuous feedback to the user when scrolling
Stars: ✭ 145 (-8.81%)
Mutual labels:  scrollview
Evergreen
🌲 Evergreen React UI Framework by Segment
Stars: ✭ 11,340 (+7032.08%)
Mutual labels:  segment

banner

MXScroll

Version License Platform

MXScroll is a framework that lets you create mix scroll view easier. you can just provide the datasource and do not need to consider the page composition. the datasource can be provided by storyboard or programmatically.

Structure

structure

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

WKWebView UIScrollView UIView
wkwebview UIScrollView UIView

Requirements

  • Xcode 9+
  • Swift 4.0+
  • iOS 10.0+

Installation

Swift compatibility

To work with Swift 4.0 use MXScroll v.0.1.0.

To work with Swift 4.1 use MXScroll v.0.1.2.

To work with Swift 5.0 use MXScroll v.0.1.3

Cocoapods

MXScroll is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MXScroll'

Usage

Simple

1. First you should
import MXScroll
2. Prepare Header
let header = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "HeaderViewController")

if WKWebView , UIWebView or UIScrollView is in HeaderVC, you should implement MXViewControllerViewSource.

extension HeaderViewController:MXViewControllerViewSource{
      func headerViewForContentOb() -> UIView? {
          return webView
      }
}
3. Prepare Content
let child1 = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "ChildViewController")

if UITableView or UIScrollView is in ContentVC, you should implement MXViewControllerViewSource

extension ChildViewController:MXViewControllerViewSource{
       func viewForMixToObserveContentOffsetChange() -> UIView {
           return self.tableView
       }
}
4. Prepare Segment

You can use the MSSegmentControl provide by MXScroll

  let segment = MSSegmentControl(sectionTitles: ["1", "2"])
5. Mix
let header = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "HeaderViewController")
        
let child1 = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "ChildViewController")
        
let child2 = UIStoryboard(name: "Main", bundle: Bundle.main).instantiateViewController(withIdentifier: "SecondViewController")
        
let segment = MSSegmentControl(sectionTitles: ["1", "2"])
        
let mx = MXViewController<MSSegmentControl>.init(headerViewController: header, segmentControllers: [child1, child2], segmentView: segment)
navigationController?.pushViewController(mx, animated: true)

Segment

If you want to use the custom Segment,Just implementMXSegmentProtocol

extension MSSegmentControl: MXSegmentProtocol {
    // segment change to tell vc
    public var change: ((Int) -> Void) {
        get {
            return self._didIndexChange
        }
        set {
            self._didIndexChange = newValue
        }
    }
    
    // vc change callback method
    public func setSelected(index: Int, animator: Bool) {
        self.setSelected(forIndex: index, animated: animator, shouldNotify: true)
    }
}

Author

cillyfly, [email protected]

License

MXScroll is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].