uitableviewcell textlabel too long and push detailtextlabel out of view

Simplest for me was to subclass UITableViewCell and override the layoutSubviews. Couldn’t find a reliable way to calculate the positions from just the label frames so just hardcoded the accessory width for in this case a UITableViewCellStyleValue1 cell with a UITableViewCellAccessoryDisclosureIndicator accessory type. – (void)layoutSubviews { [super layoutSubviews]; CGFloat detailTextLabelWidth = [self.detailTextLabel.text sizeWithFont:self.detailTextLabel.font].width; CGRect detailTextLabelFrame … Read more

UITransitionView and UILayoutContainerView

They are both internal views used by Apple and not published in the SDK. It’s difficult to say exactly what Apple will or won’t do however, adding a view to an undocumented view you retrieve from a superView message is not contentious. What you should not do (or be careful if you do do) is … Read more

Can you add a UITableViewController’s TableView to another View?

You’re on the right track! Here’s what you need to do: Create a standard UIViewController subclass with its accompanying view xib. Add a UITableView in the XIB. Wire everything up. The view controller will be the delegate and the datasource for your table, so you must implement both protocols. In your implementation file, add all … Read more

how to extend a protocol for a delegate in objective C, then subclass an object to require a conforming delegate

The UITextView defines its delegate as @property(nonatomic, assign) id<UITextViewDelegate> delegate meaning it conforms to UITextViewDelegate, and that’s what compiler checks. If you want to use the new protocol, you need to redefine delegate to conform to your protocol: @interface MySubClass : UITextView { } @property(nonatomic, assign) id<MySubClassDelegate> delegate @end The compiler shouldn’t give any more … Read more