Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
Use the whole line width for the value of Title/MultiValue elements w…
Browse files Browse the repository at this point in the history
…ithout label
  • Loading branch information
Ortwin Gentz committed Mar 12, 2010
1 parent 8a81bca commit bd5ce36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.h
@@ -1,10 +1,8 @@
//
// IASKPSTitleValueSpecifierViewCell.h
// InAppSettingsKitSampleApp
//
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2010:
// Copyright (c) 2010:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
Expand Down
7 changes: 3 additions & 4 deletions InAppSettingsKit/Views/IASKPSTitleValueSpecifierViewCell.m
@@ -1,10 +1,8 @@
//
// IASKPSTitleValueSpecifierViewCell.m
// InAppSettingsKitSampleApp
//
// http://www.inappsettingskit.com
//
// Copyright (c) 2009-2010:
// Copyright (c) 2010:
// Luc Vandal, Edovia Inc., http://www.edovia.com
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
// All rights reserved.
Expand Down Expand Up @@ -38,7 +36,8 @@ - (void)layoutSubviews {

// set the left title label frame
CGFloat labelWidth = [self.textLabel sizeThatFits:CGSizeZero].width;
labelWidth = MIN(labelWidth, viewSize.width - kIASKMinValueWidth - kIASKPaddingLeft - kIASKSpacing -kIASKPaddingRight);
CGFloat minValueWidth = (self.detailTextLabel.text.length) ? kIASKMinValueWidth + kIASKSpacing : 0;
labelWidth = MIN(labelWidth, viewSize.width - minValueWidth - kIASKPaddingLeft -kIASKPaddingRight);
CGRect labelFrame = CGRectMake(kIASKPaddingLeft, 0, labelWidth, viewSize.height -2);
self.textLabel.frame = labelFrame;

Expand Down

0 comments on commit bd5ce36

Please sign in to comment.