Permalink
Browse files

Merge branch 'master' of https://github.com/kgn/InAppSettings

  • Loading branch information...
kgn committed Jan 17, 2013
2 parents 3c4359a + fef69a5 commit bda5c44d67b06ebd6c115d58fa60dabee6871b37
Showing with 8 additions and 0 deletions.
  1. +8 −0 InAppSettings/Cells/InAppSettingsPSToggleSwitchSpecifierCell.m
@@ -79,5 +79,13 @@ - (void)setupCell{
[self.contentView addSubview:self.valueSwitch];
}
+- (void)layoutSubviews{
+ [super layoutSubviews];
+
+ CGRect valueSwitchFrame = self.valueSwitch.frame;
+ valueSwitchFrame.origin.y = (CGFloat)round(CGRectGetMidY(self.contentView.bounds)-CGRectGetMidY(self.valueSwitch.bounds))-InAppSettingsOffsetY;
+ valueSwitchFrame.origin.x = (CGFloat)round(CGRectGetWidth(self.contentView.bounds)-CGRectGetWidth(self.valueSwitch.bounds))-InAppSettingsCellPadding;
+ self.valueSwitch.frame = valueSwitchFrame;
+}
@end

0 comments on commit bda5c44

Please sign in to comment.