All Projects → Light413 → SwiftTTPageController

Light413 / SwiftTTPageController

Licence: MIT license
最常见的标签控制器,仿今日头条首页、网易新闻首页 ,实现多个ViewController列表切换(更新适配Swift5)

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to SwiftTTPageController

Harbour
Docker/Portainer management app for iOS
Stars: ✭ 210 (+707.69%)
Mutual labels:  swift5
XYColor
An easy way to adapter dark mode on CALayer. iOS 快速适配夜间模式
Stars: ✭ 76 (+192.31%)
Mutual labels:  swift5
tags
HTML tags in Go
Stars: ✭ 50 (+92.31%)
Mutual labels:  tags
FlowLayout
Android流式布局实现热门标签效果
Stars: ✭ 65 (+150%)
Mutual labels:  tags
bootstrap5-tags
Replace select[multiple] with nices badges for Bootstrap 5
Stars: ✭ 58 (+123.08%)
Mutual labels:  tags
FireSnapshot
A useful Firebase-Cloud-Firestore Wrapper with Codable.
Stars: ✭ 56 (+115.38%)
Mutual labels:  swift5
FlowlayoutTags
具有标签功能的流式布局,接口简单。可多选单选,可记住选择状态,状态切换有过渡动画。
Stars: ✭ 78 (+200%)
Mutual labels:  tags
phppimaco
Biblioteca para geração de Etiquetas PIMACO
Stars: ✭ 61 (+134.62%)
Mutual labels:  tags
material-chip-view
Material Chip view. Can be used as tags for categories, contacts or creating text clouds
Stars: ✭ 1,300 (+4900%)
Mutual labels:  tags
adversaria
Typeclass interfaces to access user-defined Scala annotations
Stars: ✭ 22 (-15.38%)
Mutual labels:  tags
awesome-ios
A collaborative list of awesome for iOS developers. Include quick preview.
Stars: ✭ 1,329 (+5011.54%)
Mutual labels:  swift5
additional tags
Redmine Plugin for adding tags functionality to issues and wiki pages.
Stars: ✭ 25 (-3.85%)
Mutual labels:  tags
SimpleToast
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or MacOS applications in SwiftUI. Because of the flexibility to show any content it is also possible to use the library for showing simple modals.
Stars: ✭ 131 (+403.85%)
Mutual labels:  swift5
VideoTimelineView
Video timeline UI for iOS Apps
Stars: ✭ 103 (+296.15%)
Mutual labels:  swift5
react-native-element-textinput
A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.
Stars: ✭ 28 (+7.69%)
Mutual labels:  tags
preact-token-input
🔖 A text field that tokenizes input, for things like tags.
Stars: ✭ 57 (+119.23%)
Mutual labels:  tags
RichEditorView
Rich Text Editor in Swift. Newly Featured Code and Swift 5 compatible of cjwirth/RichEditorView.
Stars: ✭ 105 (+303.85%)
Mutual labels:  swift5
MMActionSheet
An actionSheet view implement with pure swift
Stars: ✭ 25 (-3.85%)
Mutual labels:  swift5
iOS-SwiftUI-Firebase-Login-Example
Complete Sign up and Sign in Process for iOS SwiftUI - using Firebase Email and Password Authentication.
Stars: ✭ 37 (+42.31%)
Mutual labels:  swift5
svg-tag-mode
A minor mode for Emacs that replace keywords with nice SVG labels
Stars: ✭ 314 (+1107.69%)
Mutual labels:  tags

SwiftTTPageController

仿网易新闻、头条等首页列表切换效果,实现多个ViewController列表切换;

  • Swift 5.0+ ,Xcode 11.4

效果如下:

TTTagListController

安装

pod 'SwiftTTPageController'

应用

  • 创建HeadView
let titles = ["新闻","视频","最新","新闻","视频","最新","军事","头条"]
        
let headView = TTHeadView (frame: CGRect (x: 0, y: 0, width: UIScreen.main.bounds.width, height: 30), titles: titles, delegate: self)
        
navigationItem.titleView = headView;
        
  • 创建列表控制器,并添加到父控制器之上
let vcs = [TableViewController(),TableViewController(),TableViewController(),TableViewController(),TableViewController(),TableViewController(),TableViewController(),TableViewController(),]
        
let frame = CGRect (x: 0, y: 0, width: view.frame.width, height: view.frame.height)

let pagevc = TTPageViewController.init(controllers: vcs, frame: frame, delegate: self)
        
self.addChildViewController(pagevc)
self.view.addSubview(pagevc.view)
        
  • 遵守协议TTHeadViewDelegate,TTPageViewControllerDelegate 实现代理方法,处理事件
    /////Delegate methods
    func tt_headViewSelectedAt(_ index: Int) {
        pagevc.scrollToPageAtIndex(index)
    }
    
    func tt_pageControllerSelectedAt(_ index: Int) {
        headView.scrollToItemAtIndex(index)
    }

License

See LICENSE file for details

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].