diff --git a/Tusker/Assets.xcassets/More.imageset/Contents.json b/Tusker/Assets.xcassets/More.imageset/Contents.json
new file mode 100644
index 00000000..0f37bf34
--- /dev/null
+++ b/Tusker/Assets.xcassets/More.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "More.pdf",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Tusker/Assets.xcassets/More.imageset/More.pdf b/Tusker/Assets.xcassets/More.imageset/More.pdf
new file mode 100644
index 00000000..f1d42118
Binary files /dev/null and b/Tusker/Assets.xcassets/More.imageset/More.pdf differ
diff --git a/Tusker/View Controllers/ProfileTableViewController.swift b/Tusker/View Controllers/ProfileTableViewController.swift
index f8b7b948..86f3085e 100644
--- a/Tusker/View Controllers/ProfileTableViewController.swift
+++ b/Tusker/View Controllers/ProfileTableViewController.swift
@@ -135,4 +135,21 @@ class ProfileTableViewController: UITableViewController {
extension ProfileTableViewController: ProfileHeaderTableViewCellDelegate {
+ func showMoreOptions() {
+ let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
+ alert.addAction(UIAlertAction(title: "Open in Safari...", style: .default, handler: { _ in
+ let vc = SFSafariViewController(url: URL(string: self.account.url)!)
+ self.present(vc, animated: true)
+ }))
+ alert.addAction(UIAlertAction(title: "Share...", style: .default, handler: { _ in
+ let vc = UIActivityViewController(activityItems: [URL(string: self.account.url)!], applicationActivities: nil)
+ self.present(vc, animated: true)
+ }))
+ alert.addAction(UIAlertAction(title: "Send Message...", style: .default, handler: { _ in
+ print("send message to @\(self.account.acct)")
+ }))
+ alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
+ present(alert, animated: true)
+ }
+
}
diff --git a/Tusker/Views/ProfileHeaderTableViewCell.swift b/Tusker/Views/ProfileHeaderTableViewCell.swift
index dbcd2e1a..a9292779 100644
--- a/Tusker/Views/ProfileHeaderTableViewCell.swift
+++ b/Tusker/Views/ProfileHeaderTableViewCell.swift
@@ -11,6 +11,8 @@ import MastodonKit
protocol ProfileHeaderTableViewCellDelegate: StatusTableViewCellDelegate {
+ func showMoreOptions()
+
}
class ProfileHeaderTableViewCell: UITableViewCell {
@@ -77,6 +79,10 @@ class ProfileHeaderTableViewCell: UITableViewCell {
}
}
+ @IBAction func morePressed(_ sender: Any) {
+ delegate?.showMoreOptions()
+ }
+
}
extension ProfileHeaderTableViewCell: HTMLContentLabelDelegate {
diff --git a/Tusker/Views/ProfileHeaderTableViewCell.xib b/Tusker/Views/ProfileHeaderTableViewCell.xib
index 47727882..c151c86e 100644
--- a/Tusker/Views/ProfileHeaderTableViewCell.xib
+++ b/Tusker/Views/ProfileHeaderTableViewCell.xib
@@ -58,6 +58,18 @@
+
@@ -75,6 +87,8 @@
+
+
@@ -90,4 +104,7 @@
+
+
+