mirror of https://github.com/oxen-io/session-ios
Tweak tint for search bar icons in dark theme
parent
75bb9b60db
commit
3022f92925
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "Search-clear_17x17_@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "Search-clear_17x17_@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "Search-clear_17x17_@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "UIButtonBarSearch_18x18_@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "UIButtonBarSearch_18x18_@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "UIButtonBarSearch_18x18_@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 527 B |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension UIImage {
|
||||||
|
|
||||||
|
private func image(with view: UIView) -> UIImage? {
|
||||||
|
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.isOpaque, 0.0)
|
||||||
|
defer { UIGraphicsEndImageContext() }
|
||||||
|
|
||||||
|
guard let context = UIGraphicsGetCurrentContext() else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
view.layer.render(in: context)
|
||||||
|
let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||||
|
return image
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc
|
||||||
|
public func templated(color: UIColor) -> UIImage? {
|
||||||
|
let template = self.withRenderingMode(.alwaysTemplate)
|
||||||
|
let imageView = UIImageView(image: template)
|
||||||
|
imageView.tintColor = color
|
||||||
|
|
||||||
|
return image(with: imageView)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue