Skip to content

cczallen/ALTableViewLight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ALTableViewLight

TableView Using Block

##Use##

screen

- (void)viewDidLoad
{
    [super viewDidLoad];
	
	
	//data
	NSArray * dataArray = @[@"aaaa",@"bbbb",@"cccc"];
	
	//init
	ALTableViewLight * tableview = [ALTableViewLight tableViewWithDataArray:dataArray didSelectBlock:^(NSInteger index, id dataObj) {
		[[[UIAlertView alloc] initWithTitle:@"Select:" message:[NSString stringWithFormat:@"%@" , dataObj] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
	}];
	[tableview.tableView setBackgroundColor:[UIColor scrollViewTexturedBackgroundColor]];
	[self.view addSubview:tableview];
	NSLog(@"LOG:  tableview: %@",tableview);
	
	//frame
	CGRect rect;
	if (isIPadUI) {
		rect = CGRectMake(200, 300, 400, 500);
	}else	{
		rect = CGRectInset(self.view.frame, 20, 155);
	}
	[tableview setFrame:rect];
}

About

TableView Using Block

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published