UITableView didSelectRowAtIndexPath: not being called on first tap

I’m having an issue with UITableView’s didSelectRowAtIndexPath. My table is setup so that when I select row it initializes a new view controller and pushes it. The first time I tap any row in the table, the method does not get called. Once I select another row, it begins to work as normal. I have … Read more

How do you add multi-line text to a UIButton?

I have the following code… UILabel *buttonLabel = [[UILabel alloc] initWithFrame:targetButton.bounds]; buttonLabel.text = @”Long text string”; [targetButton addSubview:buttonLabel]; [targetButton bringSubviewToFront:buttonLabel]; …the idea being that I can have multi-line text for the button, but the text is always obscured by the backgroundImage of the UIButton. A logging call to show the subviews of the button shows … Read more

How to get the screen width and height in iOS?

How can one get the dimensions of the screen in iOS? Currently, I use: lCurrentWidth = self.view.frame.size.width; lCurrentHeight = self.view.frame.size.height; in viewWillAppear: and willAnimateRotationToInterfaceOrientation:duration: The first time I get the entire screen size. The second time i get the screen minus the nav bar. 18 s 18 How can one get the dimensions of the … Read more

UITableViewCell, show delete button on swipe

How do I get the delete button to show when swiping on a UITableViewCell? The event is never raised and the delete button never appears. 19 s 19 During startup in (-viewDidLoad or in storyboard) do: self.tableView.allowsMultipleSelectionDuringEditing = false Override to support conditional editing of the table view. This only needs to be implemented if … Read more