Skip to content

Some of the enhancements we need on a daily basis to be there on UIView.

License

Notifications You must be signed in to change notification settings

cacaosolutions/UIViewAdditions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UIViewAdditions

Some of the enhancements we need on a daily basis to be there on UIView.

How To Use

  • IndexPath ( UITableView / UICollectionView )
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
///// ----- cell code --------- /////

[cell.button addTarget:self action:@selector(myButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[cell.myButton setIndexPath:indexPath];

///// ----- cell code --------- /////
}
  • Later inside myButtonAction:
- (void)myButtonAction:(UIButton *)sender {
NSIndexPath* indexPath = [sender indexPath];
NSLog(@"Button at section %ld row %ld tapped.",(long)indexPath.section, (long)indexPath.row);
}

Pretty easy, right? Have a look at the source files to find out more!

About

Some of the enhancements we need on a daily basis to be there on UIView.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published