• This repository has been archived on 18/Sep/2019
  • Stars
    star
    245
  • Rank 165,270 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

You can change tab contents with swipe gesture on middle of UITableView!!

MartyJunior

[![CI Status](http://img.shields.io/travis/Taiki Suzuki/MartyJunior.svg?style=flat)](https://travis-ci.org/Taiki Suzuki/MartyJunior) Version License Platform

You can change tab contents with swipe gesture on middle of UITableView!!

Features

  • Change tab middle of UITableView.
  • Be able to scroll smoothly without two step.
  • Auto fill content space when content size is not enough.
  • Flexible and customizable top content.
  • Customizable tab view.
  • Navigation view.
  • Support Swift3 (If you want to use it in Swift3

Installation

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

  pod "MartyJunior"

Usage

If you install from cocoapods, You have to write import MartyJunior.

Life cycle

viweDidLoad -> viewWillSetupForMartyJunior -> viewDidSetupForMartyJunior

You have to setup delegate, dataSource and so on in viewWillSetupForMartyJunior like this.

override func viewWillSetupForMartyJunior() {
    super.viewWillSetupForMartyJunior()
    delegate = self
    dataSource = self
    registerNibToAllTableViews(ProfileTweetCell.nib, forCellReuseIdentifier: ProfileTweetCell.ReuseIdentifier)
    registerNibToAllTableViews(ProfileUserCell.nib, forCellReuseIdentifier: ProfileUserCell.ReuseIdentifier)

    tabView.delegate = self

    title = "@szk-atmosphere"
}

You have to setup NavigationView and so on in viewDidSetupForMartyJunior like this.

override func viewDidSetupForMartyJunior() {
    super.viewDidSetupForMartyJunior()
    navigationView?.titleLabel.alpha = 0
    navigationView?.rightButton = UIButton(type: .InfoDark)
    navigationView?.rightButton?.tintColor = .white
}

Specific dataSource methods

// Return number of tabs
func mjViewControllerNumberOfTabs(viewController: MJViewController) -> Int

// Return UIView you want to display as top content
func mjViewControllerContentViewForTop(viewController: MJViewController) -> UIView

// Return TabView if you want to display as custom view
optional func mjViewControllerTabViewForTop(viewController: MJViewController) -> UIView

Other dataSource methods

Protocol based on UITableViewDataSource. It has targetIndex parameter to assign applicable tableView.

  • Example
optional func mjViewController(viewController: MJViewController, targetIndex: Int, numberOfSectionsInTableView tableView: UITableView) -> Int

Specific delegate methods

// Celled when selected tab index was changed
optional func mjViewController(viewController: MJViewController, didChangeSelectedIndex selectedIndex: Int)

Other delegate methods

Protocol based on UITableViewDelegate. It has targetIndex or selectedIndex parameter to assign applicable tableView.

  • Example
optional func mjViewController(viewController: MJViewController, targetIndex: Int, tableView: UITableView, didSelectRowAtIndexPath indexPath: IndexPath)
optional func mjViewController(viewController: MJViewController, selectedIndex: Int, scrollViewDidScroll scrollView: UIScrollView)

Requirements

  • Xcode 8 or greater
  • iOS 8.0 or greater
  • MisterFusion (Swift DSL for AutoLayout)
  • UIKit

Other

A sample of this project uses

Author

Taiki Suzuki, [email protected]

License

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

More Repositories

1

ReverseExtension

A UITableView extension that enables cell insertion from the bottom of a table view.
Swift
1,675
star
2

SAHistoryNavigationViewController

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!
Swift
1,569
star
3

iOSDesignPatternSamples

This is Github user search demo app which made by many variety of design patterns. You can compare differences in MVC, MVP, MVVM and Flux.
Swift
690
star
4

URLEmbeddedView

URLEmbeddedView automatically caches the object that is confirmed the Open Graph Protocol.
Swift
650
star
5

SABlurImageView

You can use blur effect and it's animation easily to call only two methods.
Swift
557
star
6

MisterFusion

MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
Swift
314
star
7

SAInboxViewController

UIViewController subclass inspired by "Inbox by google" animated transitioning.
Swift
297
star
8

SACollectionViewVerticalScalingFlowLayout

UICollectionViewLayout that performs scaling up and down automatically on disappearing cells, and applies UIDynamics.
Swift
272
star
9

SAParallaxViewControllerSwift

SAParallaxViewControllerSwift realizes parallax scrolling with blur effect. In addition, it realizes seamless opening transition.
Swift
260
star
10

TheAnimation

Type-safe CAAnimation wrapper. It makes preventing to set wrong type values.
Swift
224
star
11

GitHubSearchWithSwiftUI

SwiftUI and Combine based GitHubSearch example.
Swift
205
star
12

DuctTape

๐Ÿ“ฆ KeyPath dynamicMemberLookup based syntax sugar for Swift.
Swift
175
star
13

HoverConversion

HoverConversion realized vertical paging with UITableView. UIViewController will be paged when reaching top or bottom of UITableView contentOffset.
Swift
163
star
14

NoticeObserveKit

NoticeObserveKit is type-safe NotificationCenter wrapper.
Swift
150
star
15

FluxCapacitor

This is what makes the Flux design pattern possible.
Swift
123
star
16

MSAlertController

MSAlertController has same feature at UIAlertViewController.
Objective-C
117
star
17

Prex

๐Ÿ”Unidirectional data flow architecture with MVP and Flux combination for Swift
Swift
109
star
18

QiitaWithFluxSample

A sample project uses Flux and MVVM features with RxSwift.
Swift
104
star
19

Continuum

NotificationCenter based Lightweight UI / AnyObject binder.
Swift
80
star
20

Ricemill

๐ŸŒพ โ™ป๏ธ ๐Ÿš Unidirectional Input / Output framework with Combine. Supports both of SwiftUI and UIKit.
Swift
63
star
21

PickerButton

PickerButton is subclass of UIButton that presents UIPickerView in UIKeyboard.
Swift
44
star
22

SASecretCommandViewController

You can use secret command with swipe gesture and A, B button. Show a secret mode you want!
Swift
43
star
23

ArtShredder

๐Ÿ“ฑBanksy Shredder for iOS
Swift
42
star
24

SplittableViewKit

A cell of IndexPath(row: 0, section: 0) in UITableView is automatically moved to left view when device rotated.
Swift
37
star
25

UILayoutBuilder

An AutoLayout DSL that intuitive syntax and viewable hierarchy.
Swift
37
star
26

SAWaveToast

Show text with wave animated background and floating animation.
Swift
34
star
27

TicTacToe-SwiftUI

Unidirectional data flow tic-tac-toe sample with SwiftUI.
Swift
23
star
28

SafeAreaExtension

You can handle safeAreaInsets changes of every UIView.
Swift
20
star
29

SABlurImageViewObjc

Objective-C
19
star
30

AnyObservableObject

Swift
18
star
31

ReuseCellConfigure

You can configure ReusableCell without casting!
Swift
17
star
32

GitHubClientTestSample

A GitHub client sample for User Action Logs testing.
Swift
17
star
33

MOAlertController

Objective-C
15
star
34

ConnpassAttendanceChecker

An attendance checking iOS application for https://connpass.com
Swift
14
star
35

SimplestCounterSample

This is simplest Counter App written in many variety of design patterns.
Swift
14
star
36

MyFirstAndroidPractice

I had began learning Android App development since Aug 2021. This is my first Android app project for practice development.
Kotlin
11
star
37

GithubKitForSample

Swift
11
star
38

DiffMVPAndMVVM

MVP and MVVM implementations and test code sample.
Swift
9
star
39

YouTubeSampleWithMVP-DiffableDataSource

This is a YouTube like iOS app sample with the Model-View-Presenter pattern.
Swift
9
star
40

Connpass

Swift
8
star
41

LayoutGuaranteedView

LayoutGuaranteedView is a Phantom Type view holder. It guaranteed that a view had laid out after execute `guaranteeLayout` function.
Swift
8
star
42

Necom

๐Ÿˆ New concept of MVP with Swift
Swift
7
star
43

RxAnyDispatcher

A observer(or observable)-only `Dispatcher` that is used in Flux.
Swift
7
star
44

kmm-with-spm-buildtoolplugin-sample

Kotlin
6
star
45

QiitaApiClient

API client for http://qiita.com/.
Swift
6
star
46

LazyInitializedViewModelInjectionSample

Swift
4
star
47

iOSDC2022LightningTalkSample

Swift
3
star
48

unio-kt

๐Ÿ”„ kProperty based Unidirectional Input / Output framework with Flow.
Kotlin
2
star
49

ReusableView

Swift
1
star
50

LayeredLayout

Swift
1
star
51

ViewIsolatedViewController

Swift
1
star