Skip to main content

Posts

Showing posts with the label nsmutablearray

How to tell which rows toggle switch was changed

I have a tableview with the accessoryview of a toggle switch. I specify the section and the row and am having a difficult time determining which row was toggled. I used the toggleSwitch.tag to grab the indexRow but as my indexRow is part of an indexPath.section I am not sure how to tell which row I toggled. Here is the code: - (UITableViewCell *)tableAlert:(SBTableAlert *)tableAlert cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell; Category *cat = [allCategories objectAtIndex:indexPath.section]; Subject *sub = [cat.subjects objectAtIndex:indexPath.row]; cell = [[[SBTableAlertCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease]; UISwitch *toggleSwitch = [[UISwitch alloc] init]; cell.accessoryView = [[UIView alloc] initWithFrame:toggleSwitch.frame]; [cell.accessoryView addSubview:toggleSwitch]; cell.textLabel.text =sub.title; cell.detailTextLabel.text = sub.category_title; if (sub.active==1){ [toggleSwitch setOn:YES]; } e

i WANT to use sharekit to share images from my NSMutablearray [closed]

I am using sharekit to share images, and want to be able to share all the images upon users request not just one image I am using sharekit to share images, and want to be able to share all the images upon users request not just one image // this is the code I have for my share button UIImage *image = [UIImage imageNamed:@"Atoms"]; SHKItem *item = [SHKItem image:image title:@"Look at this picture!"]; // Make the ShareKit action sheet SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item]; // Display the action sheet [actionSheet showInView:self.view]; // this is my array I want it my sharekit will respond to all the items in the array NSMutableArray *images = [[NSMutableArray alloc] initWithObjects:@"Americans.png",@"Approach.png",@"Arianny.png",@"Atoms.png",nil];

sharekit to share multiple images from an NSMUtablearray [closed]

Possible Duplicate: i WANT to use sharekit to share images from my NSMutablearray i am using sharekit to share images, and want to be able to share all the images upon users request not just one image // this is the code I have for my share button UIImage *image = [UIImage imageNamed:@"Atoms"]; SHKItem *item = [SHKItem image:image title:@"Look at this picture!"]; // Make the ShareKit action sheet SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item]; // Display the action sheet [actionSheet showInView:self.view]; // this is my array I want it my sharekit will respond to all the items in the array NSMutableArray *images = [[NSMutableArray alloc] initWithObjects:@"Americans.png",@"Approach.png",@"Arianny.png",@"Atoms.png",nil];