Renamed class and refactored how blurring works in UITableViewVibrantCell.
This commit is contained in:
1 parent
553cdeae98
commit
90e252dc78
3 files changed
+28
-13
No files matched your search
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// SideMenuTableViewController.swift
|
||||
// SideMenu
|
||||
//
|
||||
// Created by Jon Kent on 4/5/16.
|
||||
// Copyright © 2016 CocoaPods. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SideMenu
|
||||
|
||||
class SideMenuTableViewController: UITableViewController {
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
// refresh cell blur effect in case it changed
|
||||
tableView.reloadData()
|
||||
|
||||
guard SideMenuManager.default.menuBlurEffectStyle == nil else {
|
||||
return
|
||||
}
|
||||
|
||||
// Set up a cool background image for demo purposes
|
||||
let imageView = UIImageView(image: UIImage(named: "saturn"))
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.backgroundColor = UIColor.black.withAlphaComponent(0.2)
|
||||
tableView.backgroundView = imageView
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = super.tableView(tableView, cellForRowAt: indexPath) as! UITableViewVibrantCell
|
||||
|
||||
cell.blurEffectStyle = SideMenuManager.default.menuBlurEffectStyle
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user