Skip to content

Commit

Permalink
IOS-8130: Update TODOs and comments, improve naming
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Fedorov <[email protected]>
  • Loading branch information
m3g0byt3 committed Oct 4, 2024
1 parent d0dc7db commit db7c7b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Tangem/Common/Extensions/UIKit/UINavigationController+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@ private extension UINavigationController {
let subclassNameUTF8 = (subclassName as NSString).utf8String,
let subclass = objc_allocateClassPair(navigationBarClass, subclassNameUTF8, 0)
else {
assertionFailure("Unable to allocate class pair for subclass \(subclassName) and class \(navigationBarClass)")
assertionFailure("Unable to allocate class pair for subclass \(subclassName) and parent class \(navigationBarClass)")
return nil
}

let selector = #selector(UINavigationBar.layoutSubviews)

if let method = class_getInstanceMethod(UINavigationBar.self, selector) {
let methodHook: @convention(block) (_ navigationBar: UINavigationBar) -> Void = { navigationBar in
navigationBar.isHidden = true
let methodHook: @convention(block) (_ instance: UINavigationBar) -> Void = { instance in
// Default implementation does nothing, no need to call super
instance.isHidden = true
}
let implementation = imp_implementationWithBlock(methodHook)
let typeEncoding = method_getTypeEncoding(method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ final class OverlayContentContainerViewController: UIViewController {

/// - Note: The order in which this method is called matters. Must be called between `setupContent` and `setupOverlay`.
private func setupBackgroundShadowView() {
// TODO: Andrey Fedorov - Add better support for dark mode (adjust content view contrast or background colors instead of using background shadow) (IOS-8130)
// TODO: Andrey Fedorov - Add better support for dark mode (adjust content view contrast or background colors instead of using background shadow) (IOS-8192)
backgroundShadowView.backgroundColor = .black
backgroundShadowView.alpha = Constants.minBackgroundShadowViewAlpha
backgroundShadowView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
Expand Down

0 comments on commit db7c7b4

Please sign in to comment.