File tree Expand file tree Collapse file tree
Example/FreakingSimpleRoundImageView
Images.xcassets/AppIcon.appiconset
FreakingSimpleRoundImageView/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 88
99Pod ::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.
Original file line number Diff line number Diff line change @@ -10,8 +10,9 @@ import UIKit
1010
1111@IBDesignable
1212open 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}
You can’t perform that action at this time.
0 commit comments