Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
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?
 
Last edited:
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 ;)
 
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.
 
if you use the "custom" buttons, and insert an image, and use the command + function to get them properly automatically shaped.

Haven't heard of this is it documented somewhere? Searching the dev docs so far has turned up nothing.
 
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..
 
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.
 
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.

I second this approach, seems to bethe simplest nd clear solution.
 
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.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.