How to make a circle button?

Hi!

I have a background image with a circle in the middle and I was wondering if it was possible to make a circle button to go over the logo.

Thanks!

Xcode-OTHER, OS X Mountain Lion (10.8.3)

Posted on Apr 27, 2013 2:19 PM

Reply
2 replies

May 7, 2013 11:10 PM in response to hartmido

Simply you try this:


#import <QuartzCore/QuartzCore.h> //
in header file

myButton.layer.cornerRadius =8;


OR you can do this:


If you want a circular button than create an image with a circular shape filled with whatever you want to be displayed in the circle. Make sure your image has an alpha channel and delete all the area around your circle so the background of your image is transparent (alpha =0). (http://www.gimp.org/ is free and easy to use application for such images)

In IB create a round rect button with type custom button. Select your image as the background of your button and there you have it.


Reference Link: http://stackoverflow.com/questions/9921138/create-circular-button-in-iphone-sdk

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to make a circle button?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.