Closed kennethmac2000 closed 12 years ago
Agreed for both issues. Please feel free to submit a pull request for these (sans inline comments) and I will merge it.
Hi,
Just to clarify - do you mean both issues contained within issue #24 (ie, points (1) and (2) above)? Or was this also a reference to issue #23?
This is a reference to #24 only I havent had any time to dig into #23.
The closeButton: and actionButton: methods of UAModalPanel both use insertSubview:aboveSubview: to add their respective views to self.contentContainer. The contentView: method on the other hand uses the more basic addSubview: method.
From what I can see, two improvements would make sense here:
1) The insertSubview:aboveSubview: calls in closeButton: and actionButton: should say "aboveSubview:self.contentView" instead of "aboveSubview:self.roundedRectangle", since contentView must be above roundedRectangle for everything to look correct, and, currently (ie, without this change), in situations where the UAModalPanel instance's top and left padding values are small, contentView obscures closeButton due to closeButton being below contentView in the view hierarchy.
2) As an additional enhancement, in the contentView: method, the addSubview: call should be replaced with the following call:
[self.contentContainer insertSubview:contentView aboveSubview:self.roundedRect];
This makes it more clear what is going on and doesn't require one to think about the implicit ordering behaviour that is made use of when calling addSubview:.