Tag Archives: Objective C

Keeping Track of Moved TableViewCells

Some tableviews require users to be able to edit the cell’s row position. Easily done by enabling the -(void) tableView:(UITableView *)tableView commitEidtingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath delegate of UITableView.

Read more ...

Customize the UINavigationController pop transition

Here’s the problem: wanted to have crossfade on all transitions to/from a particular view controller.

Read more ...

iCloud Drive added But, Got Grayed-Out Folders

I added iCloud Drive to have my app save templates to iCloud. For a while it didn’t seem to load up to iCloud.

Read more ...

Get the view.tag from a UITapGesturerRecognizer tap

Firstly you create a tap gesture recognizer and then add it to the view dot. UIView dot already has the tag assigned.

UITapGestureRecognizer *tapped = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(gotoZone:)];
[dot addGestureRecognizer:tapped];

Later, the problem in gotoZone: method is how to identify which UIView dot did the user tap? Here’s how we did it.

Setup a comparison and then cast the tap, associate the UIView with that tap, and voila, the row is the tag of that view.

if ([sender isKindOfClass:[UITapGestureRecognizer class]]) {
UITapGestureRecognizer *tap = (UITapGestureRecognizer *)sender;
UIView *view = tap.view;
row = view.tag;
}