Results 1 to 5 of 5

Thread: How to set the Rounded corners for UIView?

  1. #1
    Join Date
    Apr 2010
    Posts
    76

    How to set the Rounded corners for UIView?

    I do know whether it is possible or not, I just want to know how set the rounded corner for the UIView. There is a simple why I am asking this, I need this so that I can snip a view with rounded corners at the time of animation. If it is possible to in anyway then please let me know, I will be really thankful.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to set the Rounded corners for UIView?

    It is very much possible, setting the rounded corner for the UIView, for achieving this you need to work with cornerRadius. To be more precisely you need to work with the UIView’s backgroundColor. You just need to set the clipsToBounds = YES. I am sure that this little snippet will solve your problem and you will get what you need to achieve.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How to set the Rounded corners for UIView?

    If you have any problem in understanding the above explanation then here is description related to that. One thing is clear that UIView is the main object need to work on, and the thing I want to make clear is that the CALayer object is owned by the UIView. For making use of this property you need to import something like this
    Code:
    #import <QuartzCore/QuartzCore.h>
    And after that you have to write this
    Code:
    Lable.layer.cornerRadius = 25;
    This will give you the rounded corners view.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to set the Rounded corners for UIView?

    Well I am having a better answer for this, you just use this
    view.layer.cornerRadius = 6;

    I am not saying that this is best reply but this is the most simple code snippet for getting the rounded corners. In this code you do not need to import anything and you do not need to mess around any complicated code.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: How to set the Rounded corners for UIView?

    I am not a programmer not a software developer those play around with codes, I am just a simple user and normally I stay away from the coding part. The easiest solution which I have found I want to share with you. You just have disabled the Rounded Rect button without covering the complete UIView. I hope this will help you

Similar Threads

  1. Blue corners on Samsung UN46D8000
    By -Deven- in forum Monitor & Video Cards
    Replies: 6
    Last Post: 20-08-2011, 10:22 PM
  2. How to create rounded triangle in Illustrator?
    By Cheenu in forum Windows Software
    Replies: 5
    Last Post: 21-07-2011, 07:08 PM
  3. Office 2007 missing Arial Rounded font
    By Jahbriel in forum MS Office Support
    Replies: 2
    Last Post: 26-04-2010, 08:41 AM
  4. Gears Of War 2: Dark Corners DLC
    By justin987 in forum Video Games
    Replies: 1
    Last Post: 08-05-2009, 08:13 AM
  5. Overlapping corners with CSS
    By Valerian in forum Software Development
    Replies: 2
    Last Post: 15-04-2009, 07:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,950,462.32417 seconds with 16 queries