All Questions
Tagged with cornerradius xcode
11 questions
4
votes
1
answer
3k
views
Round Specific Corners of Stroke/Border SwiftUI
I am working on a SwiftUI project where I need a view to have a border with only some of the corners rounded (for instance, the top left and top right).
I added a RoundedRectangle with a stroke and ...
0
votes
2
answers
1k
views
UICollectionViewCell is not rounding corner
Im trying to make the corner rounded, but when I use cornerRadius, and maskToBouds, it do not works
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath)...
1
vote
2
answers
3k
views
Swift 4 - Getting half the width of a button
I'm trying to make a fully circular button. I have created it in code and setup the constraints like this:
addButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.2).isActive = ...
1
vote
2
answers
3k
views
How to change the cornerRadius of button from storyboard with custom IBDesignable class created
The class given below is working fine
@IBDesignable class iButton : UIButton {
@IBInspectable var cornerRadius : CGFloat = 0.0{
didSet{
layer.cornerRadius = cornerRadius
}
}}
But ...
0
votes
0
answers
62
views
ClipsToBounds working differently in Swift 3 [duplicate]
The following code used to work before upgrading to Swift 3 where by it creates a circular image. However now the whole thing just becomes white. If I comment out the clips to bound part, the image ...
-1
votes
2
answers
49
views
Unwanted content in Cornered UIImageView in iOS
I am trying to Crop the UIImageView using its Layer.CornerRadius property to get a round Image (Like whatsapp dp) but the results are surprising. The image shows unwanted content from the previous ...
0
votes
2
answers
849
views
Selective round corners in image view - iOS
I am working in Xcode Version 6.1.1 and iOS 8.1 to develop my app in which I need round top-left and top-right corners in an image view according to design.
I have used the following code before, ...
0
votes
2
answers
2k
views
UIView corner radius animation
I have some class for UIButton like this :
@implementation UIRoundButton
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self.layer ...
3
votes
1
answer
8k
views
How to remove rounded corners in PopoverView?
I built a custom Popoverview, but fail to remove the content's rounded corners.
Tried to set .layer.cornerRadius = 0.0 in almost every view in found, with no success.
Image Link: Custom Popover
...
0
votes
2
answers
508
views
Definitive method to have a UIImageView with rounded corners in a UITableView?
I've been a long time trying to find an acceptable method to add rounded corners to a UIImageView that is added as a subview in a UITableViewCell without impacting the scrolling performance of the ...
1
vote
1
answer
144
views
UIView rounded corners with PatternImage
Here, cornerRadius is not working with PatternImage, Could you please help me?
- (void)viewDidLoad
{
[super viewDidLoad];
myView.backgroundColor = [[UIColor alloc] initWithPatternImage:[...