I have mac application, I want to display sheet from particular nspoint, I have multiple views with hierarchy, So, I want selected nspoint on (upper level view i.e. sub view of sun view)view, get it in nswindow & present sheet from that point in objective c. How to achieve this?
Asked
Active
Viewed 148 times
1 Answers
0
I got answer : just in upper sub view or any subview in window -> NSPoint point = [self.window.contentView convertPoint:[NSApp currentEvent].locationInWindow fromView:nil]; get mouse clicked point on view.
Post notification from this subview with value of this point , listen notification in its parent window, get same point value. save it.
& in window - use this point to to present sheet, use - willPositionSheet:this method to change presented sheet's frame.

user3581597
- 11
- 8