Skip to content

Instantly share code, notes, and snippets.

@MaximKeegan
Created April 26, 2013 07:44
Show Gist options
  • Save MaximKeegan/5465583 to your computer and use it in GitHub Desktop.
Save MaximKeegan/5465583 to your computer and use it in GitHub Desktop.
RIButtonItem *cancelItem = [RIButtonItem item];
cancelItem.label = NSLocalizedString(@"Cancel",@"Cancel");
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Subscribe", @"Subscribe")
message:nil
cancelButtonItem:cancelItem
otherButtonItems:nil];
for (DPSProduct *dpsProduct in productsSet) {
RIButtonItem *purchaseItem = [RIButtonItem item];
purchaseItem.label = [[dpsProduct product] localizedTitle];
purchaseItem.action = ^
{
[self startSubscribeWithProductIdentifier:dpsProduct.productID];
};
[alertView addButtonItem:purchaseItem];
[alertView addButtonItem:purchaseItem];
[alertView addButtonItem:purchaseItem];
}
[alertView show];
[alertView release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment