11#import "EditFlagTableViewCell.h"
15@synthesize label = _label, toggle = _toggle;
17- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
19 self = [
super initWithStyle:style reuseIdentifier:reuseIdentifier];
27- (void)setSelected:(BOOL)selected animated:(BOOL)animated
29 [
super setSelected:selected animated:animated];
37 [
super layoutSubviews];
42 CGRect bounds = [[
self contentView] bounds];
43 UIEdgeInsets margins = [[
self contentView] layoutMargins];
44 CGSize sw = [_toggle frame].size;
46 [_toggle setFrame:CGRectMake(CGRectGetMaxX(bounds) - margins.right - sw.width,
47 (bounds.size.height - sw.height) / 2.0, sw.width, sw.height)];
51 CGRect lf = [_label frame];
52 lf.origin.x = margins.left;
53 lf.origin.y = (bounds.size.height - lf.size.height) / 2.0;
54 lf.size.width = CGRectGetMinX([_toggle frame]) - margins.left - 8.0;