Latest 1.0.3
Homepage https://github.com/ArchieR7/ACSegmentView
License MIT
Platforms ios 10.0
Dependencies RxSwift, RxCocoa
Frameworks UIKit
Authors

CI Status
Version
License
Platform

ACSegmentView

Example

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

Requirement

  • Swift 4.x
  • Xcode 10
  • iOS 10 or above

Installation

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

pod 'ACSegmentView', '~> 1.0.3'

Dependencies

Usage

ACSegmentViewModel provides rx to subscribe with RxSwift.
We can create a ACSegmentViewModel and subscribe it to do something while user select difference index.

Here’s an example, we subscribed ACSegmentViewModel.rx.selectedSegmentIndex and convert to string for UILabel.

viewModel.rx.selectedSegmentIndex.map { (index) -> String in
    return "Select (index)"
}.bind(to: demoLabel.rx.text).disposed(by: disposeBag)

then set ACSegmentViewModel to be ACSegmentView.viewModel.👏👏👏

Author

Archie, [email protected]

License

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

Latest podspec

{
    "name": "ACSegmentView",
    "version": "1.0.3",
    "summary": "A custom segment view with RxSwift / Delegate",
    "description": "A custom SegmentView with RxSwift in master branch, then you can just use delegate branch without it.",
    "homepage": "https://github.com/ArchieR7/ACSegmentView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Archie": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ArchieR7/ACSegmentView.git",
        "tag": "1.0.3"
    },
    "social_media_url": "https://twitter.com/ChangArchie",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "ACSegmentView/Classes/**/*",
    "frameworks": "UIKit",
    "dependencies": {
        "RxSwift": [
            "~> 4.3.1"
        ],
        "RxCocoa": [
            "~> 4.3.1"
        ]
    },
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This