objective c - How to find absolute NSView frame position in window -
i have complicated hierarchy of nsviews, how can find frame of view in window or able check if point in window in views frame?
i tried this
nspoint windoworigin = [[window contentview] convertpoint:nsmakepoint(0,0) fromview:myview];
send convertrect:toview:
second argument set nil:
nsrect viewframeinwindowcoords = [myview convertrect: [myview bounds] toview: nil];
on second thought, if need perform hit testing, might want opposite:
nsview *viewunderpoint = [[window contentview] hittest: locationinwindow];
Comments
Post a Comment