I could use a standard gradient strip and stretch it to the height of the window, but that would mean the gradient would appear to peak at different heights on different sized windows. Too sloppy. Instead I created a fixed size gradient strip about the same height as the one you see on the standard annotation window .. I chose 26 points. When loading my custom annotation window I build two background views: upperView and lowerView. The upperView is 26 points high and uses the gradient strip as it's tiled background. The lowerView is the remaining height of the view (self.bounds.size.height - 26) and has a solid color the same as the ending color of the gradient. This produces a satisfying and consistent annotation window regardless of the overall height.
This is a simple solution to my problem. Got your own ideas about how to solve this? Leave me a note and tell me what you think.
No comments:
Post a Comment