Dock location in Objective-C

Discussion in 'Mac Programming' started by XnavxeMiyyep, Dec 8, 2008.

  1. XnavxeMiyyep macrumors 65816

    XnavxeMiyyep

    Joined:
    Mar 27, 2003
    Location:
    Washington
    #1
    In Objective-C, how would I detect what side the Dock is on (bottom, left, right)? I looked all over and couldn't find it.
     
  2. XnavxeMiyyep thread starter macrumors 65816

    XnavxeMiyyep

    Joined:
    Mar 27, 2003
    Location:
    Washington
    #2
    Actually, the solution came to me in a dream last night.

    Set an NSRect to the [NSScreen visibleFrame] and compare the x, width, and height to that of an NSRect of the [NSScreen frame].

    (Obviously you could check for multiple monitors and such, but that's the gist of it)
     

Share This Page