This repository was archived by the owner on Sep 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,21 @@ EmptyViewDelegate {
299299 present ( alert, animated: trueUnlessReduceMotionEnabled)
300300 }
301301
302+ private func addDropShadow( ) {
303+ guard let buttonBarView = buttonBarView else {
304+ return
305+ }
306+
307+ let shadowPath = UIBezierPath ( rect: CGRect ( origin: CGPoint ( x: 0 , y: buttonBarView. bounds. height) ,
308+ size: CGSize ( width: buttonBarView. bounds. width, height: 1 ) ) )
309+ buttonBarView. layer. masksToBounds = false
310+ buttonBarView. layer. shadowColor = UIColor . darkGray. cgColor
311+ buttonBarView. layer. shadowOpacity = 1
312+ buttonBarView. layer. shadowPath = shadowPath. cgPath
313+ buttonBarView. layer. shouldRasterize = true
314+ buttonBarView. layer. shadowRadius = 2
315+ }
316+
302317 // MARK: ButtonBarPagerTabStripViewController Overrides
303318
304319 override func viewControllers( for pagerTabStripController: PagerTabStripViewController ) -> [ UIViewController ] {
@@ -331,4 +346,12 @@ EmptyViewDelegate {
331346 fetchDetails ( )
332347 }
333348
349+ // MARK: UIViewController Overrides
350+
351+ override func viewDidLayoutSubviews( ) {
352+ super. viewDidLayoutSubviews ( )
353+
354+ addDropShadow ( )
355+ }
356+
334357}
You can’t perform that action at this time.
0 commit comments