From 970b7535dc4a42932af126fb123f3941a7e71ba4 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 16 May 2019 17:45:38 -0500 Subject: [PATCH] Add add account selection scene for iOS --- NetNewsWire.xcodeproj/project.pbxproj | 4 + .../accountFeedbin.imageset/Contents.json | 15 +++ .../accountFeedbin.pdf | Bin 0 -> 4120 bytes .../accountLocal.imageset/Contents.json | 15 +++ .../accountLocal.imageset/accountLocal.pdf | Bin 0 -> 4205 bytes iOS/Settings/AddAccountViewController.swift | 90 ++++++++++++++++ iOS/Settings/Settings.storyboard | 102 +++++++++++++++++- iOS/Settings/SettingsViewController.swift | 8 ++ 8 files changed, 232 insertions(+), 2 deletions(-) create mode 100644 iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json create mode 100644 iOS/Resources/Assets.xcassets/accountFeedbin.imageset/accountFeedbin.pdf create mode 100644 iOS/Resources/Assets.xcassets/accountLocal.imageset/Contents.json create mode 100644 iOS/Resources/Assets.xcassets/accountLocal.imageset/accountLocal.pdf create mode 100644 iOS/Settings/AddAccountViewController.swift diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 23285aede..34be8dd24 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -118,6 +118,7 @@ 51E595A5228CC36500FCC42B /* ArticleStatusSyncTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E595A4228CC36500FCC42B /* ArticleStatusSyncTimer.swift */; }; 51E595A6228CC36500FCC42B /* ArticleStatusSyncTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E595A4228CC36500FCC42B /* ArticleStatusSyncTimer.swift */; }; 51E595AB228DF94C00FCC42B /* SettingsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51E595AA228DF94C00FCC42B /* SettingsTableViewCell.xib */; }; + 51E595AD228E1C2100FCC42B /* AddAccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E595AC228E1C2100FCC42B /* AddAccountViewController.swift */; }; 51EC114C2149FE3300B296E3 /* FolderTreeMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */; }; 51EF0F77227716200050506E /* FaviconGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F76227716200050506E /* FaviconGenerator.swift */; }; 51EF0F79227716380050506E /* ColorHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F78227716380050506E /* ColorHash.swift */; }; @@ -707,6 +708,7 @@ 51C452B72265178500C03939 /* styleSheet.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = styleSheet.css; sourceTree = ""; }; 51E595A4228CC36500FCC42B /* ArticleStatusSyncTimer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleStatusSyncTimer.swift; sourceTree = ""; }; 51E595AA228DF94C00FCC42B /* SettingsTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SettingsTableViewCell.xib; sourceTree = ""; }; + 51E595AC228E1C2100FCC42B /* AddAccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountViewController.swift; sourceTree = ""; }; 51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FolderTreeMenu.swift; path = AddFeed/FolderTreeMenu.swift; sourceTree = ""; }; 51EF0F76227716200050506E /* FaviconGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconGenerator.swift; sourceTree = ""; }; 51EF0F78227716380050506E /* ColorHash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorHash.swift; sourceTree = ""; }; @@ -1038,6 +1040,7 @@ 51F85BE6227245FC00C787DC /* AboutViewController.swift */, 51F85BDB2272162F00C787DC /* RefreshIntervalViewController.swift */, 51EF0F7B2277919E0050506E /* TimelineNumberOfLinesViewController.swift */, + 51E595AC228E1C2100FCC42B /* AddAccountViewController.swift */, ); path = Settings; sourceTree = ""; @@ -2368,6 +2371,7 @@ 51C45268226508F600C03939 /* MasterFeedUnreadCountView.swift in Sources */, 5183CCD0226E1E880010922C /* NonIntrinsicLabel.swift in Sources */, 51C4529F22650A1900C03939 /* AuthorAvatarDownloader.swift in Sources */, + 51E595AD228E1C2100FCC42B /* AddAccountViewController.swift in Sources */, 51C452A322650A1E00C03939 /* HTMLMetadataDownloader.swift in Sources */, 51C4528D2265095F00C03939 /* AddFolderViewController.swift in Sources */, 51C452782265091600C03939 /* MasterTimelineCellData.swift in Sources */, diff --git a/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json b/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json new file mode 100644 index 000000000..327e5717e --- /dev/null +++ b/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "accountFeedbin.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/accountFeedbin.pdf b/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/accountFeedbin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d688a02e155f25866aa00f5cf4eab2ba37c95c86 GIT binary patch literal 4120 zcmai&cT`i`5{D^~5|E-4LC^!2B8rek0F@ew2uc&ALjs{UL+D*8(xgihkRk|3QBXQa z2k{Y*CMqD(q*v+4ODyktpKq;qR&vhH?Aepa%7t?<@>7}2B!h$`9GEUJZS2DnGyd|K zyK%P5I=FSswI=4Md%97}_qpBGDt6y{Yf8TCHeBV&?4GpYwg}V+GzLlMUN8zsQNgsy zYs^6zLiz9y-0zz#ANMlG-1ZYLPyTk3+lPUzCiSkb4`sNfF5GA) zW7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%iviaI{6R7pT^;S#I{k#sSDnb%cwR$Zf4webo9+k{<%LDG?G#mwVgcME;Sp!YP*TsNdl3=pM>}8kXmh{ zu?FP^M+~NzP?}HQ`#!P%96DW`nwXj=2`}z1{u3WwwOKWwC5n!zkg|oVij(D95P1;o z+L!pD<%@@NHTsi`B)l!1>h9e7X7rbSoXB0#8abFs9sw{JTOA@y0{|nRoA?5>0^j-48 zgk{jBuVXzM;Y;L#je>3e_kOJY@5bh8*DTU8mUg3kL z#%^Vr9&PA%lMh=c3%T>P4bH*#!8%L&t4S1O1hSx`Il*`6%;1RP1I1K@=J@3H$5WR( z2)pn9(!P4Qbj}!__k0tibW(ZsL&xTcl`M9Z(JL`QC3E7t*&EOLtYWNkhTjcGKg(CZ zUp2ZqF&8qBd93%CjQZWZYwK|v=^2$Toee2Ty+`idRnGRm{#mO%Vl_6JFY5FqAGO-5 z=~tQM73JgIp`=H4tIvtWZ^_#`7fGeg<;u2af--~1OOdhy(+zVWEqkY z_cd-T@bP-vr|vk?z*Izo7vWMF2JuTE2L9M*ym%3xg@xNCGClXrfObK;!oBs2|`X`Ri+- zzeWZLozpM~R2d=~mj|4HpBh{dN;_%#1$h3_Ao2)W)BdT! z5el?H=${${0;7G_zchI`?VSImDZu_qzW)}dOf$wm--RRSefyUtkDyIV|JIcMQ&Ui+ zb?{f54-t)b#}U8J@Micx+WFDOB2xl^<{G*)Xa{NF=|rGe=*L=zW+D{~4yKG#geYQ_ x;ZPV34#y}#U Int { +// // #warning Incomplete implementation, return the number of sections +// return 0 +// } + +// override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { +// // #warning Incomplete implementation, return the number of rows +// return 0 +// } + + /* + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) + + // Configure the cell... + + return cell + } + */ + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/Settings.storyboard index 8ba42e9fb..59550f401 100644 --- a/iOS/Settings/Settings.storyboard +++ b/iOS/Settings/Settings.storyboard @@ -13,7 +13,7 @@ - + @@ -27,7 +27,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -565,4 +659,8 @@ + + + + diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 08ce1e85b..93691ff39 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -93,6 +93,14 @@ class SettingsViewController: UITableViewController { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { switch indexPath.section { + case 0: + let sortedAccounts = AccountManager.shared.sortedAccounts + if indexPath.row == sortedAccounts.count { + let timeline = UIStoryboard.settings.instantiateController(ofType: AddAccountViewController.self) + self.navigationController?.pushViewController(timeline, animated: true) + } else { + // TODO + } case 1: switch indexPath.row { case 0: