|
134 | 134 | if (!item) { |
135 | 135 | CGFloat windowBottom =CGRectGetMinY([viewwindow].frame); |
136 | 136 | CGFloat lowestMenuPoint = windowBottom + position.y - [menusize].height; |
137 | | - CGFloat screenBottom =CGRectGetMinY([viewwindow].screen.frame); |
| 137 | + CGFloat screenBottom =CGRectGetMinY([viewwindow].screen.visibleFrame); |
138 | 138 | CGFloat distanceFromBottom = lowestMenuPoint - screenBottom; |
139 | 139 | if (distanceFromBottom <0) |
140 | 140 | position.y = position.y - distanceFromBottom +4; |
|
143 | 143 | // Place the menu left of cursor if it is overflowing off right of screen. |
144 | 144 | CGFloat windowLeft =CGRectGetMinX([viewwindow].frame); |
145 | 145 | CGFloat rightmostMenuPoint = windowLeft + position.x + [menusize].width; |
146 | | - CGFloat screenRight =CGRectGetMaxX([viewwindow].screen.frame); |
| 146 | + CGFloat screenRight =CGRectGetMaxX([viewwindow].screen.visibleFrame); |
147 | 147 | if (rightmostMenuPoint > screenRight) |
148 | 148 | position.x = position.x - [menusize].width; |
149 | 149 |
|
|