mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Shows the conversation picker, and sends the attachment to that conversation. There's still a lot TODO -[ ] resolve JSQ dependency -[ ] properly wait for app to load -[ ] dismiss share extension after send is complete -[ ] support non jpeg file types -[ ] Fix device sleep manager // FREEBIE
43 lines
1,023 B
Swift
43 lines
1,023 B
Swift
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
@objc
|
|
public class AvatarImageView: UIImageView {
|
|
|
|
public init() {
|
|
super.init(frame: CGRect.zero)
|
|
self.configureView()
|
|
}
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
self.configureView()
|
|
}
|
|
|
|
required public init?(coder aDecoder: NSCoder) {
|
|
super.init(coder: aDecoder)
|
|
self.configureView()
|
|
}
|
|
|
|
override init(image: UIImage?) {
|
|
super.init(image: image)
|
|
self.configureView()
|
|
}
|
|
|
|
func configureView() {
|
|
self.layer.minificationFilter = kCAFilterTrilinear
|
|
self.layer.magnificationFilter = kCAFilterTrilinear
|
|
self.layer.borderWidth = 0.5
|
|
self.layer.masksToBounds = true
|
|
self.contentMode = .scaleToFill
|
|
}
|
|
|
|
override public func layoutSubviews() {
|
|
self.layer.borderColor = UIColor.black.cgColor.copy(alpha: 0.15)
|
|
self.layer.cornerRadius = self.frame.size.width / 2
|
|
}
|
|
}
|