Skip to content

Commit 78f32b2

Browse files
committed
Fixes.
1 parent 04239cd commit 78f32b2

4 files changed

Lines changed: 31 additions & 5 deletions

File tree

Example/FreakingSimpleRoundImageView/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",
@@ -29,10 +39,15 @@
2939
"idiom" : "iphone",
3040
"size" : "60x60",
3141
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ios-marketing",
45+
"size" : "1024x1024",
46+
"scale" : "1x"
3247
}
3348
],
3449
"info" : {
3550
"version" : 1,
3651
"author" : "xcode"
3752
}
38-
}
53+
}

Example/FreakingSimpleRoundImageView/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0.1</string>
18+
<string>1.0.2</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>2</string>
22+
<string>3</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
2525
<key>UILaunchStoryboardName</key>

FreakingSimpleRoundImageView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'FreakingSimpleRoundImageView'
11-
s.version = '1.0.1'
11+
s.version = '1.0.2'
1212
s.summary = 'A freakin simple RoundImageView. With Interface Builder support.'
1313

1414
# This description is used to generate tags and improve search results.

FreakingSimpleRoundImageView/Classes/RoundImageView.swift

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import UIKit
1010

1111
@IBDesignable
1212
open class RoundImageView: UIImageView {
13+
1314
@IBInspectable
14-
public var borderWidth: CGFloat {
15+
open var borderWidth: CGFloat {
1516
set {
1617
if newValue < 0 {
1718
layer.borderWidth = 0
@@ -47,4 +48,14 @@ open class RoundImageView: UIImageView {
4748
}
4849
}
4950
}
51+
52+
override open var bounds: CGRect {
53+
didSet {
54+
if bounds.width < bounds.height {
55+
layer.cornerRadius = bounds.width / 2
56+
} else {
57+
layer.cornerRadius = bounds.height / 2
58+
}
59+
}
60+
}
5061
}

0 commit comments

Comments
 (0)