How to deselect a selected UITableView cell?

I am working on a project on which I have to preselect a particular cell. I can preselect a cell using -willDisplayCell, but I can’t deselect it when the user clicks on any other cell. – (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath { AppDelegate_iPad *appDelegte = (AppDelegate_iPad *)[[UIApplication sharedApplication] delegate]; if ([appDelegte.indexPathDelegate row] == [indexPath row]) { [cell … Read more

How to load a UIView using a nib file created with Interface Builder

I’m trying to do something a bit elaborate, but something that should be possible. So here is a challenge for all you experts out there (this forum is a pack of a lot of you guys 🙂 ). I’m creating a Questionnaire “component”, which I want to load on a NavigationContoller (my QuestionManagerViewController). The “component” … Read more

“Unknown class in Interface Builder file” error at runtime

Even though Interface Builder is aware of a MyClass, I get an error when starting the application. This happens when MyClass is part of a library, and does not happen if I compile the class directly in the application target. 46 Answers 46 Despite the “Unknown class MyClass in Interface Builder file.” error printed at … Read more

Could not insert new outlet connection: Could not find any information for the class named

This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. I got an error on Xcode saying that there was no information about the view controller. Could not insert new outlet connection: Could not find any information for the class named Why … Read more

How to use Auto Layout to move other views when a view is hidden?

I have designed my custom Cell in IB, subclassed it and connected my outlets to my custom class. I have three subviews in cell content which are: UIView (cdView) and two labels (titleLabel and emailLabel). Depending on data available for each row, sometimes I want to have UIView and two labels displayed in my cell … Read more

Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get rid of all of this: – (void)viewDidUnload { // … self.button = nil; // … } Are there any problems doing this? The templates are using … Read more