Updated some of the graphics to be more correct and added the Edit button to the Master view.
This commit is contained in:
parent
056b524122
commit
694def74bf
|
@ -205,11 +205,14 @@
|
|||
</barButtonItem>
|
||||
</toolbarItems>
|
||||
<navigationItem key="navigationItem" title="Feeds" id="Zdf-7t-Un8">
|
||||
<barButtonItem key="leftBarButtonItem" title="Tools" image="toolsImage" id="2lM-3y-hKs">
|
||||
<connections>
|
||||
<action selector="showOPMLImportExport:" destination="7bK-jq-Zjz" id="qIa-yP-E6a"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
<leftBarButtonItems>
|
||||
<barButtonItem image="settingsImage" id="7xz-3z-0PJ"/>
|
||||
<barButtonItem title="Tools" image="toolsImage" id="2lM-3y-hKs">
|
||||
<connections>
|
||||
<action selector="showOPMLImportExport:" destination="7bK-jq-Zjz" id="qIa-yP-E6a"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</leftBarButtonItems>
|
||||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
</tableViewController>
|
||||
|
@ -280,10 +283,11 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="browserImage" width="20" height="20"/>
|
||||
<image name="circleOpenImage" width="20" height="20"/>
|
||||
<image name="starOpenImage" width="18" height="18"/>
|
||||
<image name="toolsImage" width="20" height="18"/>
|
||||
<image name="browserImage" width="22" height="22"/>
|
||||
<image name="circleOpenImage" width="22" height="22"/>
|
||||
<image name="settingsImage" width="24" height="24"/>
|
||||
<image name="starOpenImage" width="24" height="24"/>
|
||||
<image name="toolsImage" width="24" height="22"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="RT3-gH-cyN"/>
|
||||
|
|
|
@ -92,7 +92,7 @@ class MasterTableViewCell : UITableViewCell {
|
|||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView)
|
||||
let layout = MasterTableViewCellLayout(cellSize: bounds.size, shouldShowImage: shouldShowImage, label: titleView, unreadCountView: unreadCountView, isEditing: isEditing)
|
||||
layoutWith(layout)
|
||||
}
|
||||
|
||||
|
|
|
@ -21,13 +21,14 @@ struct MasterTableViewCellLayout {
|
|||
let titleRect: CGRect
|
||||
let unreadCountRect: CGRect
|
||||
|
||||
init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView) {
|
||||
init(cellSize: CGSize, shouldShowImage: Bool, label: UILabel, unreadCountView: MasterUnreadCountView, isEditing: Bool) {
|
||||
|
||||
let bounds = CGRect(x: 0.0, y: 0.0, width: floor(cellSize.width), height: floor(cellSize.height))
|
||||
|
||||
var rFavicon = CGRect.zero
|
||||
if shouldShowImage {
|
||||
rFavicon = CGRect(x: MasterTableViewCellLayout.imageMarginLeft, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height)
|
||||
let indent = isEditing ? MasterTableViewCellLayout.imageMarginLeft + 40 : MasterTableViewCellLayout.imageMarginLeft
|
||||
rFavicon = CGRect(x: indent, y: 0.0, width: MasterTableViewCellLayout.imageSize.width, height: MasterTableViewCellLayout.imageSize.height)
|
||||
rFavicon = MasterTableViewCellLayout.centerVertically(rFavicon, bounds)
|
||||
}
|
||||
self.faviconRect = rFavicon
|
||||
|
|
|
@ -30,6 +30,8 @@ class MasterViewController: UITableViewController, UndoableCommandRunner {
|
|||
|
||||
super.viewDidLoad()
|
||||
|
||||
navigationItem.rightBarButtonItem = editButtonItem
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(containerChildrenDidChange(_:)), name: .ChildrenDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(batchUpdateDidPerform(_:)), name: .BatchUpdateDidPerform, object: nil)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Safari.pdf"
|
||||
"filename" : "safari.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "circlefilled.pdf"
|
||||
"filename" : "circleClosed.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "circleopen.pdf"
|
||||
"filename" : "circleOpen.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "settings.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "star.pdf"
|
||||
"filename" : "starClosed.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "staropen.pdf"
|
||||
"filename" : "starOpen.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue