Skip to content

Scrolling buttons list,一款可滚动的按钮组控件

Notifications You must be signed in to change notification settings

runThor/HTScrollButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HTScrollButton

Show

demoImg

Usage

// ViewController.m

#import "HTScrollButton.h"

HTScrollButton *HTView = [[HTScrollButton alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 50)];
[HTView setCenter:CGPointMake([UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/2)];
HTView.backgroundColor = [UIColor grayColor];
[self.view addSubview:HTView];
    
NSMutableArray *buttonArr = [[NSMutableArray alloc] init];
    
for (int i = 0; i < 13; i++) {
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
    [btn setTitle:[NSString stringWithFormat:@"%d", i + 1] forState:UIControlStateNormal];
    [btn setBackgroundColor:[UIColor colorWithRed:1/255.0 green:174/255.0 blue:202/255.0 alpha:1]];
    [buttonArr addObject:btn];
}
    
[HTView configButtons:buttonArr];

About

Scrolling buttons list,一款可滚动的按钮组控件

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published