GUI questions?

Discussion in 'Mac Programming' started by cpuin, Mar 15, 2013.

  1. macrumors member

    Joined:
    Feb 3, 2013
    #1
    Hi,

    i see a lot of applications that use custom user interface.Custom colours, windows, buttons etc.It results very difficult to me to do it.Is there some easier approach to do that, bot only by subclassing.....?
     
  2. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #2
    Do you have any specific applications you can name to show what you mean?
     
  3. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    Implement custom drawRect: methods in your view subclasses if you'd like a really unique look.

    If you just want to tint standard UI elements, a lot of them have a tint property for easily changing colors.
     
  4. thread starter macrumors member

    Joined:
    Feb 3, 2013
    #4
    Clean My Mac 2

    Clean My Mac 2
    for instance
     
  5. macrumors 68000

    Sydde

    Joined:
    Aug 17, 2009
    #5
    Custom windows can be done rather easily, but you have to create the window programmatically, using settings that exclude normal window elements, though you will probably have to subclass NSView in order to draw any special elements and have them respond in predictable ways.

    Buttons are even easier: you just make a button that has no borders or image and underlay it with the image you want for it, no subclassing involved.

    Most of the customized interface stuff does require a fair bit of work, because Apple prefers that you use standard elements as much as possible so that the UI remains consistent – getting too unique for no particularly good reason other than uniqueness really serves only to confuse or annoy the user.
     
  6. macrumors member

    Joined:
    Mar 24, 2013
    Location:
    Enschede, Netherlands
    #6
    In the past I have done this with Windows and OS/2 Warp, making custom controls, and I find the drawing hard to debug and I agree with Sydde.

    I made custom buttons, custom listboxes and custom menu items.
     
  7. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #7
    It is worth remembering that custom stuff might get broken by new OS updates. Using the standard stuff, there will be descriptions on how to upgrade. Example might be the retina resolution Macs that arrived rather recently, where apps had to be fixed.

    //Gunnar
     

Share This Page