MTCoordinatorView-objc 0.8.1

MTCoordinatorView-objc 0.8.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2016

Maintained by mittsu.



  • By
  • mittsu

img_gif

Introduction

The view coordinate arranged to the scrolling is adjusted.

Usage

// ViewController

#import <CoordinateManager.h>
#import <CoordinateContainer.h>

@interface ViewController ()

@property CoordinateManager *coordinateManager;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    ・・・ 'TableView' and 'Custom Header' are made beforehand. ・・・

    // Manager initialize
    _coordinateManager = [[CoordinateManager alloc]initManager:self scroll:tableView header:headerView];

    // create contents view
    UIImageView *childView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sample-image"]];
    // set start form
    childView.frame = CGRectMake(100, 100, 0, 0);
    // created view is put in the 'CoordinateContainer'
    CoordinateContainer *containerView = [[CoordinateContainer alloc]initView:childView endForm:CGRectMake(100, 100, 50, 50) mode:kSmoothModeFixity completion:^(void){
        // tap event callback.
    }];

    // set views
    [_coordinateManager setContainer:tableView views:containerView, nil];

    // set table view
    [self.view addSubview:table];
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    // catch scroll event to coordinate object
    [_coordinateManager scrolledDetection:scrollView];
}

Installation

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

pod "MTCoordinatorView-objc"

Requirements

  • iOS 8.0+
  • Xcode 8.0

License

MTCoordinatorView-objc is available under the MIT license. See the LICENSE file for more info.