Tag: cocoa touch

Detect the current top cell in a UITableView after scrolling

a simple question but I don’t seem to have the right terminology to search Stackoverflow by it. I have a UITableView with no sections, the user can scroll up and down a long list of data (rows) presented inside this tableview. Question: how can I detect the most top cell row number after the user […]

How to create contacts in address book in iPhone SDK?

How to create contacts in address book in iPhone SDK?

When to use CALayer on the Mac/iPhone?

I’m slightly confused when to use CALayer on the iPhone or Mac and when not to use it? CoreAnimation works just fine on my UIView based objects without having to use CALayer. When is the appropriate time to dig into this class?

How to detect touches on UIImageView of UITableViewCell object in the UITableViewCellStyleSubtitle style

I am using the UITableViewCell object in the UITableViewCellStyleSubtitle style (i.e an image view on the left, text label in bold and under that a detail text label) to create my table. Now I need to detect touches on the UIImageView and also to know the indexpath/cell in which the image view was clicked. I […]

Why do all backgrounds disappear on UITableViewCell select?

My current project’s UITableViewCell behavior is baffling me. I have a fairly straightforward subclass of UITableViewCell. It adds a few extra elements to the base view (via [self.contentView addSubview:…] and sets background colors on the elements to have them look like black and grey rectangular boxes. Because the background of the entire table has this […]

UIPanGestureRecognizer on MKMapView?

I would like to add some logic when user moves with map view i. e. he does a pan touch. But when I add the gesture recognizer and I want to log the touch, nothing happens. When I try it in another view controller and add the recognizer to controller’s view then it works ok. […]

Expand collapse UITableViewCell

Possible Duplicate: UITableView Cell expand on click i need help in UITableViewCell of UITableView.My requirement is below: look at Retweets , list and More when i click retweet following appears you can see that retweet expands and shows other listing and list and more slide below. i want to make the same . Any type […]

Objective-C: How do you access parent properties from subclasses?

If I have this class defined, how do I access the someObject property in subclasses without compiler errors? @interface MyBaseClass // someObject property not declared here because I want it to be scoped // protected. Only this class instance and subclass instances should be // able to see the someObject property. @end // This is […]

When to use a UIView vs. a UIViewController on the iPhone?

I have always sort of wondered when to use a UIView vs. a UIViewController on the iPhone. I understand that you shouldn’t use a UIViewController unless it’s a full-screen view, but what other guidelines are there? For example, I want to build a modal overlay – a screen that will slide into place over the […]

UIMenuController Custom Items

I have created a UIMenuController and have set it a custom menu item like so: UIMenuController *menuController = [UIMenuController sharedMenuController]; UIMenuItem *item1 = [[UIMenuItem alloc] initWithTitle:@”Do This” action:@selector(item1)]; [menuController setMenuItems:[NSArray arrayWithObject:item1]]; But I wanted that object to be the only one to appear so I added this code: – (BOOL)canPerformAction: (SEL)action withSender: (id)sender { BOOL […]