Latest 0.0.3
Homepage https://github.com/W-v-W/WCollectionAddTitlesView
License MIT
Platforms ios 7.0, requires ARC

MacDown logo

Requirements

  • iOS 7+
  • Xcode 8+

Installation

  • Just include Classes folder in your project.

Usage

    WInteractCV *cv = [[WInteractCV alloc]initWithFrame:CGRectMake(0, 104, w_screen_width, w_screen_height - 20 - 40)];
    WTitleScrollView *titleView = [[WTitleScrollView alloc]initWithFrame:CGRectMake(0, 64, w_screen_width, 40) titles:@[@{@"name":@"Business"},@{@"name":@"Technology"},@{@"name":@"Science"},@{@"name":@"Health"},@{@"name":@"Sports"},@{@"name":@"Entertainment"}]];

//    titleView.titleFont = [UIFont systemFontOfSize:30];
//    titleView.highlightColor = [UIColor blackColor];
//    titleView.normalColor = [UIColor lightGrayColor];
//    [titleView setMarginsLeft:20 center:20 right:20];

    cv.combinedTitleView = titleView;

    __weak typeof(cv)weakCV = cv;

    // Add your content here.
    cv.shouldAddContentBlock = ^(NSUInteger index){
        UILabel *content = [[UILabel alloc]initWithFrame:CGRectMake(20, 200, 300, 50)];
        content.font = [UIFont systemFontOfSize:50];
        content.text = @(index).stringValue;
        [weakCV addContent:content toIndex:index];
    };

    // 
    cv.turnedPageBlock = ^(NSUInteger index){
        NSLog(@"Turned page: %@", @(index));
    };

    [self.view addSubview:titleView];
    [self.view addSubview:cv];

Contact

Email: [email protected]

Latest podspec

{
    "name": "WCollectionAddTitlesView",
    "version": "0.0.3",
    "summary": "A collection view interact with titles in scroll view.",
    "description": "A collection view interact with titles in scroll view.nYou can add your content view in collection cell.",
    "homepage": "https://github.com/W-v-W/WCollectionAddTitlesView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Wz",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/W-v-W/WCollectionAddTitlesView.git",
        "tag": "0.0.3"
    },
    "source_files": "WCollectionAddTitlesView/Classes/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This