GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - joinhonor/THSegmentedPager: Simple plugin-sample using the HMSegmentedControl and a UIPageViewController to show Tabs

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

40 Commits
40 Commits

Folders and files

NameName
Last commit message
Last commit date
Screenshots
Screenshots
 
 
THSegmentedPager
THSegmentedPager
 
 
THSegmentedPagerExample
THSegmentedPagerExample
 
 
.gitignore
.gitignore
 
 
.slather.yml
.slather.yml
 
 
.travis.yml
.travis.yml
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
THSegmentedPager.podspec
THSegmentedPager.podspec
 
 

Repository files navigation

THSegmentedPager

Build Status Pod Version Pod Platform Pod License Coverage Status

This control combines the great HMSegmentedControl with a UIPageviewController that takes care of showing the right page when clicking on the HMSegmentedControl and updating the selection when the UIPageviewController scrolls.

Screenshots

iPhone Portrait iPhone Landscape

Installation

CocoaPods

Install with CocoaPods by adding the following to your Podfile:

platform :ios, '7.0'
pod 'THSegmentedPager', '~> 1.1.3'

Note: We follow http://semver.org for versioning the public API.

Manually

Or copy the THSegmentedPager/ directory from this repo into your project.

Dependencies

If you prefer the manual approach be aware that you'll need to import the dependencies which in this case are

  • HMSegmentedControl

This will cause some errors with imports not found correctly which you'll need to solve manually too

Features

V1.1.X

  • Pull Request thx to JaxGit
  • Fixed issue #12
  • With this version we switch back to the original HMSegmentedControl and as he's dropping support for iOS6 we'll need to follow

V1.0.X

  • If it is used in a UINavigationController it will show the same Viewcontroller when it comes back
  • Pull Request thx to noelrocha
  • The control is now able to allocate viewcontrollers from the actual storyboard by just knowing a list of identifiers

Usage

This is a sample initialization taken from the ExampleProject.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    THSegmentedPager *pager = (THSegmentedPager *)self.window.rootViewController;
    NSMutableArray *pages = [NSMutableArray new];
    for (int i = 1; i < 4; i++) {
        // Create a new view controller and pass suitable data.
        SamplePagedViewController *pagedViewController = [pager.storyboard instantiateViewControllerWithIdentifier:@"SamplePagedViewController"];
        [pagedViewController setViewTitle:[NSString stringWithFormat:@"Page %d",i]];
        [pagedViewController.view setBackgroundColor:[UIColor colorWithHue:((i/8)%20)/20.0+0.02 saturation:(i%8+3)/10.0 brightness:91/100.0 alpha:1]];
        [pages addObject:pagedViewController];
    }
    [pager setPages:pages];
    return YES;
}

#Contributions

...are really welcome. If you have an idea just fork the library change it and if its useful for others and not affecting the functionality of the library for other users I'll insert it

###Contributors

Victor Ilyukevich

  • Added automated Tests
  • Added Travis CI and Coverall.io support

JaxGit

License

Source code of this project is available under the standard MIT license. Please see the license file.

About

Simple plugin-sample using the HMSegmentedControl and a UIPageViewController to show Tabs

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

5 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.