From 79e09c74a9be4c246011d97f9f2c3701e3704cb1 Mon Sep 17 00:00:00 2001 From: Chris Li Date: Mon, 18 Jul 2016 11:04:45 -0400 Subject: [PATCH] Bookmark clean up --- Kiwix-iOS/Controller/BookmarkHUDVC.swift | 58 ------------ Kiwix-iOS/Storyboard/Main.storyboard | 115 ----------------------- Kiwix.xcodeproj/project.pbxproj | 4 - 3 files changed, 177 deletions(-) delete mode 100644 Kiwix-iOS/Controller/BookmarkHUDVC.swift diff --git a/Kiwix-iOS/Controller/BookmarkHUDVC.swift b/Kiwix-iOS/Controller/BookmarkHUDVC.swift deleted file mode 100644 index f2e2635f..00000000 --- a/Kiwix-iOS/Controller/BookmarkHUDVC.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// BookmarkOverlayVC.swift -// Kiwix -// -// Created by Chris Li on 1/6/16. -// Copyright © 2016 Chris. All rights reserved. -// - -import UIKit - -class BookmarkHUDVC: UIViewController { - - @IBOutlet weak var dimView: UIView! - @IBOutlet weak var blurView: UIVisualEffectView! - @IBOutlet weak var stackView: UIStackView! - @IBOutlet weak var starImageView: UIImageView! - @IBOutlet weak var label: UILabel! - - override func viewDidLoad() { - super.viewDidLoad() - - blurView.layer.borderColor = UIColor.blackColor().colorWithAlphaComponent(0.4).CGColor - blurView.layer.borderWidth = 1.0 - - blurView.transform = CGAffineTransformMakeScale(0.5, 0.5) - stackView.transform = CGAffineTransformMakeScale(0.5, 0.5) - } - - func show(isAddingBookmark: Bool) { - label.text = isAddingBookmark ? LocalizedStrings.bookmarked : LocalizedStrings.removed - starImageView.highlighted = isAddingBookmark - UIView.animateWithDuration(0.2, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.0, options: .CurveEaseInOut, animations: { () -> Void in - self.blurView.transform = CGAffineTransformIdentity - self.stackView.transform = CGAffineTransformIdentity - self.dimView.alpha = 0.6 - }) { (completed) -> Void in - NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: #selector(BookmarkHUDVC.hide), userInfo: nil, repeats: false) - } - } - - func hide() { - UIView.animateWithDuration(0.1, delay: 0.0, options: .CurveEaseInOut, animations: { () -> Void in - self.blurView.transform = CGAffineTransformMakeScale(0.001, 0.001) - self.stackView.transform = CGAffineTransformMakeScale(0.001, 0.001) - self.dimView.alpha = 0.0 - }) { (completed) -> Void in - self.blurView.hidden = true - self.stackView.hidden = true - self.view.removeFromSuperview() - self.removeFromParentViewController() - } - } -} - -extension LocalizedStrings { - class var bookmarked: String {return NSLocalizedString("Bookmarked", comment: "")} - class var removed: String {return NSLocalizedString("Removed", comment: "")} -} \ No newline at end of file diff --git a/Kiwix-iOS/Storyboard/Main.storyboard b/Kiwix-iOS/Storyboard/Main.storyboard index f3a8a3b2..a7030e3e 100644 --- a/Kiwix-iOS/Storyboard/Main.storyboard +++ b/Kiwix-iOS/Storyboard/Main.storyboard @@ -93,119 +93,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -681,7 +568,5 @@ - - diff --git a/Kiwix.xcodeproj/project.pbxproj b/Kiwix.xcodeproj/project.pbxproj index 9edb9e0a..e6a07087 100644 --- a/Kiwix.xcodeproj/project.pbxproj +++ b/Kiwix.xcodeproj/project.pbxproj @@ -86,7 +86,6 @@ 971A105B1D022DAD007FC62C /* LibraryOnlineTBVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A10561D022DAD007FC62C /* LibraryOnlineTBVC.swift */; }; 971A105C1D022DAD007FC62C /* LibraryTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A10571D022DAD007FC62C /* LibraryTabBarController.swift */; }; 971A10601D022DF2007FC62C /* LanguageTBVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A105F1D022DF2007FC62C /* LanguageTBVC.swift */; }; - 971A106A1D022E15007FC62C /* BookmarkHUDVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A10691D022E15007FC62C /* BookmarkHUDVC.swift */; }; 971A106C1D022E50007FC62C /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A106B1D022E50007FC62C /* Utilities.swift */; }; 971A106F1D022E62007FC62C /* DownloadProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A106D1D022E62007FC62C /* DownloadProgress.swift */; }; 971A10701D022E62007FC62C /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971A106E1D022E62007FC62C /* Network.swift */; }; @@ -330,7 +329,6 @@ 971A10561D022DAD007FC62C /* LibraryOnlineTBVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LibraryOnlineTBVC.swift; path = "Kiwix-iOS/Controller/LibraryOnlineTBVC.swift"; sourceTree = SOURCE_ROOT; }; 971A10571D022DAD007FC62C /* LibraryTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LibraryTabBarController.swift; path = "Kiwix-iOS/Controller/LibraryTabBarController.swift"; sourceTree = SOURCE_ROOT; }; 971A105F1D022DF2007FC62C /* LanguageTBVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LanguageTBVC.swift; path = "Kiwix-iOS/Controller/LanguageTBVC.swift"; sourceTree = SOURCE_ROOT; }; - 971A10691D022E15007FC62C /* BookmarkHUDVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BookmarkHUDVC.swift; path = "Kiwix-iOS/Controller/BookmarkHUDVC.swift"; sourceTree = SOURCE_ROOT; }; 971A106B1D022E50007FC62C /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Utilities.swift; path = "Kiwix-iOS/Model/Utilities.swift"; sourceTree = SOURCE_ROOT; }; 971A106D1D022E62007FC62C /* DownloadProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DownloadProgress.swift; path = "Kiwix-iOS/Model/DownloadProgress.swift"; sourceTree = SOURCE_ROOT; }; 971A106E1D022E62007FC62C /* Network.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Network.swift; path = "Kiwix-iOS/Model/Network.swift"; sourceTree = SOURCE_ROOT; }; @@ -952,7 +950,6 @@ 97E108221C5D5A0D00E27FD3 /* Search */, 9771DC4B1C37278E009ECFF0 /* Setting */, 97D55EF51D2075180081B523 /* TableOfContentsController.swift */, - 971A10691D022E15007FC62C /* BookmarkHUDVC.swift */, 97A7017E1D2C59CA00AAE2D8 /* GetStartedController.swift */, ); name = Controllers; @@ -1663,7 +1660,6 @@ 971A10341D022AEC007FC62C /* BookmarkTBVC.swift in Sources */, 975227A01D020C00001D1DDE /* resourceTools.cpp in Sources */, 971A10601D022DF2007FC62C /* LanguageTBVC.swift in Sources */, - 971A106A1D022E15007FC62C /* BookmarkHUDVC.swift in Sources */, 971A106C1D022E50007FC62C /* Utilities.swift in Sources */, 970E68BC1D3809A3001E8514 /* MainControllerLoading.swift in Sources */, 973DD4281D36E3E4009D45DB /* SettingSingleSwitchTBVC.swift in Sources */,