Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ShareExtensionBackGroundView: UIView {
let button = UIButton(type: .system)
button.setImage(UIImage(systemName: "arrow.up.forward.square"), for: .normal)
button.setTitle("앱으로 담아가기", for: .normal)
button.setTitleColor(.black, for: .normal)
button.setTitleColor(.label, for: .normal)
button.setBackgroundColor(.clear, for: .normal)

button.setTitle("앱이 실행됩니다", for: .highlighted)
Expand Down
10 changes: 10 additions & 0 deletions iBox/Sources/Extension/UIView+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ extension UIView {
}
}

// MARK: - 뷰 계층 구조 log
func printViewHierarchy(level: Int = 0) {
let padding = String(repeating: " ", count: level * 2)
let viewInfo = "\(padding)\(type(of: self)) - Frame: \(self.frame)"
print(viewInfo)

for subview in self.subviews {
subview.printViewHierarchy(level: level + 1)
}
}
}
1 change: 1 addition & 0 deletions iBox/Sources/Extension/UIViewController+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ extension UIViewController {
}
return false
}

}
25 changes: 25 additions & 0 deletions iBox/Sources/Favorite/FavoriteViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ import UIKit

class FavoriteViewController: BaseViewController<FavoriteView>, BaseViewControllerProtocol {

var delegate: AddBookmarkViewControllerProtocol?

// MARK: - Life Cycle

override func viewDidLoad() {
super.viewDidLoad()
setupNavigationBar()

guard let contentView = contentView as? FavoriteView else { return }
contentView.webView?.delegate = self
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
guard let contentView = contentView as? FavoriteView else { return }
contentView.webView?.setupRefreshControl()
}

// MARK: - BaseViewControllerProtocol
Expand All @@ -23,3 +34,17 @@ class FavoriteViewController: BaseViewController<FavoriteView>, BaseViewControll
}

}

extension FavoriteViewController: WebViewDelegate {

func pushAddBookMarkViewController(url: URL) {
let encodingURL = url.absoluteString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""

if let iBoxUrl = URL(string: "iBox://url?data=" + encodingURL) {
if let tabBarController = findMainTabBarController() {
AddBookmarkManager.shared.navigateToAddBookmarkView(from: iBoxUrl, in: tabBarController)
}
}
}

}
1 change: 0 additions & 1 deletion iBox/Sources/Web/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ extension WebViewController: WebViewDelegate {
AddBookmarkManager.shared.navigateToAddBookmarkView(from: iBoxUrl, in: tabBarController)
}
}

}

}