Resolved Cone Shaped Buttons

Discussion in 'iOS Programming' started by newtoiphonesdk, Apr 10, 2012.

  1. newtoiphonesdk, Apr 10, 2012
    Last edited: Apr 12, 2012

    newtoiphonesdk macrumors 6502a

    Joined:
    Jul 30, 2010
    #1
    I am working on a design to where each button is a cone shaped, and they fit together to make a pie chart. I use IB and the issue I have is that the Round Rect Button doesn't conform to the image, and I keep getting some overlap of all of the buttons. How can I properly do this?
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    if you use the "custom" buttons, and insert an image, and use the command + function to get them properly automatically shaped.
    Or create your shapes with hand, but i think you should go with option 1 ;)
     
  3. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    You could also make a single graphic for your pie chart of buttons, and then layer some invisible buttons on top to handle recognizing touches in the different segments.

    Or, make it a single button with the pie chart graphic and then make it recognize where the touch is within the graphic, and calculate the angle it's at to determine which segment it's in.
     
  4. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #4
    Haven't heard of this is it documented somewhere? Searching the dev docs so far has turned up nothing.
     
  5. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #5
    Look, you have your cone buttons in images right?
    just set the option of the button from UIRectButton to Custom, set the Background of the Button to your image.. And Command + is just an shortcut for it to fit your image..
     
  6. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #6
    OK I misunderstood, I was thinking that you were saying that the Cmd + would make the button area conform to the shape of the image. So you still have the button overlap issue with this.
     
  7. seepel macrumors 6502

    seepel

    Joined:
    Dec 22, 2009
    #7
    I second this approach, seems to bethe simplest nd clear solution.
     
  8. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #8
    Excuses, this is indeed not what I meant, I had the issue of overlapping buttons too, but my buttons were big enough to have a really dumb user to click in the millimeter between them (hint, the overlap).
    But in specific cases, you'd have to go with the angle I think, i saw some tutorials I think about that, but don't know where you can find them fast.
     
  9. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #10
  10. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #11
    Nice!
     

Share This Page