Orion98MC/miOStuff — Issue #1: contentView & buttonView overlap in iOS 5.0
Author: NukemHill
Created: 2012-01-24 21:45:27+00:00
State: open

I have incorporated CustomAlertView into my app, and it looks very nice < iOS 5.0. However, in iOS 5.0, the contentView and buttonView views overlap. I've dug around in the code a bit, and compared frames and bounds between iOS 4.3 and 5.0, and it appears to be two things in layoutSubviews that are messed up:
1) viewFrame in 4.3 has a frame of:

(CGRect) $4 = {
(CGPoint) origin = {
(CGFloat) x = 3.8
(CGFloat) y = 187.25
}
(CGSize) size = {
(CGFloat) width = 312.4
(CGFloat) height = 126.5
}
}

Whereas in 5.0 it is:

(CGRect) $9 = {
(CGPoint) origin = {
(CGFloat) x = 0
(CGFloat) y = -1
}
(CGSize) size = {
(CGFloat) width = 284
(CGFloat) height = 62
}
}

2) This if-statement does not execute in 5.0:

if ([[[view class]description]isEqualToString:@"UIThreePartButton"]) {
buttonsFrame = CGRectUnion(buttonsFrame, view.frame);
[bottomViews addObject:view];
}

I'm really not sure how to fix this. I've tried a couple of things, but sometimes view manipulation just doesn't make sense to me. Why would the initial viewFrame be different for the different OS's?

The result isn't horrible for 5.0, but I'd love to clean it up. If you can either take a look, or give me a sense of how to fix it myself, I'd really appreciate it.

Thanks.