Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Friday, September 12, 2014

Check out Riffle Raffle

This is a simple Raffle app designed to allow you to make and save your own raffles.  This is on the iOS App Store, for iPhone and iPad.

Riffle Raffle



Wednesday, September 3, 2014

Scroll Index localized NSHipster

This is freaking sweet:

- (NSString *)tableView:(UITableView *)tableView
titleForHeaderInSection:(NSInteger)section
{
    return [[[UILocalizedIndexedCollation currentCollation] sectionTitles] objectAtIndex:section];
}

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
    return [[UILocalizedIndexedCollation currentCollation] sectionIndexTitles];
}

- (NSInteger)tableView:(UITableView *)tableView
sectionForSectionIndexTitle:(NSString *)title
               atIndex:(NSInteger)index
{
    return [[UILocalizedIndexedCollation currentCollation] sectionForSectionIndexTitleAtIndex:index];
}

This is freaking sweet:

Localized scroll index that shows up on the right of a tableview.  No need to create all the different arrays of localized sections.

Here's some code to make this a little more complete:

    self.tableView.sectionIndexColor = [UIColor colorWithWhite:.5 alpha:1.0];
    self.tableView.sectionIndexTrackingBackgroundColor = [UIColor colorWithWhite:.4 alpha:.2];

Got this from NSHipster