ios5 special handling of notice height removed because it resultet in a higher view than else so that success and notice height differed on ios6

This commit is contained in:
Troels Richter
2013-01-05 22:16:01 +01:00
parent bb47295f5f
commit c06f1d29f5

View File

@@ -59,21 +59,16 @@
r.origin.y = self.titleLabel.frame.origin.y + self.titleLabel.frame.size.height;
float noticeViewHeight = 0.0;
double currOsVersion = [[[UIDevice currentDevice]systemVersion]doubleValue];
if (currOsVersion >= 6.0f) {
noticeViewHeight = messageLabelHeight;
} else {
// Now we can determine the height of one line of text
r.size.height = self.messageLabel.frame.size.height * numberOfLines;
r.size.width = viewWidth - 70.0;
self.messageLabel.frame = r;
// Calculate the notice view height
noticeViewHeight = 10.0;
if (numberOfLines > 1) {
noticeViewHeight += ((numberOfLines - 1) * messageLabelHeight);
}
}
// Now we can determine the height of one line of text
r.size.height = self.messageLabel.frame.size.height * numberOfLines;
r.size.width = viewWidth - 70.0;
self.messageLabel.frame = r;
// Calculate the notice view height
noticeViewHeight = 10.0;
if (numberOfLines > 1) {
noticeViewHeight += ((numberOfLines - 1) * messageLabelHeight);
}
// Add some bottom margin for the notice view
noticeViewHeight += 30.0;