iphone
GLKView set drawable properties
If you want to get kEAGLDrawablePropertyRetainedBacking in a GLKView, add the following category to your project. @interface CAEAGLLayer (Retained) @end @implementation CAEAGLLayer (Retained) – (NSDictionary*) drawableProperties { return @{kEAGLDrawablePropertyRetainedBacking : @(YES)}; } @end Setting the drawableProperties on the CAEAGLLayer maintained by the GLKView doesn’t work because the GLKView overwrites those properties when it binds its … Read more
Is there an iPhone equivalent to the NSTokenField control?
Venmo just open sourced their token field. https://github.com/venmo/VENTokenField.git
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