1

Share Confirmation — Hi, I’m Sam

 2 years ago
source link: https://soffes.blog/share-confirmation
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Share Confirmation — Hi, I’m Sam

Share Confirmation — Hi, I’m Sam

Hi, I’m Sam

This is my blog. I also have a website thing.

Share Confirmation

Posted on June 25, 2017

Recently, I added some visual confirmation what something was shared with the system share sheet on iOS. For things like copy or save to camera roll, there isn't visual confirmation that it worked from the system.

At first I considered making my own share actions for this and disabling the system ones but that seemed like a lot of work for adding a simple “it worked” to the screen. Then I had this idea:

func share(_ sender: UIView) {
  let viewController = UIActivityViewController(activityItems: [image], applicationActivities: nil)
  viewController.completionWithItemsHandler = { [weak self] type, completed, _, _ in
    guard completed, let title = type?.rawValue else { return }

    // Check share type and show confirmation
    if title == "com.apple.UIKit.activity.CopyToPasteboard" {
      SVProgressHUD.showSuccess(withStatus: "Copied!")
      SVProgressHUD.dismiss(withDelay: 1)
    } else if title == "com.apple.UIKit.activity.SaveToCameraRoll" {
      SVProgressHUD.showSuccess(withStatus: "Saved!")
      SVProgressHUD.dismiss(withDelay: 1)
    }
  }

  if let presentationController = viewController.popoverPresentationController {
    presentationController.sourceView = sender
  }

  present(viewController, animated: true)
}

Pretty simple! This uses SVProgressHUD to show some visual feedback that it worked. This was really easy to add. I think this is a really welcome addition. You could obviously do this for any other type that you want. I didn’t want to do it for every type since some types (like share to Twitter) are really obvious when they work or are canceled.

Mic Setup

Posted on February 28, 2017

I recently made a video mentioning my new mic setup and got a few questions about it. Instead of making a video that just mentions tons of links, I thought I'd write it up.

I use a Heil PR40 mic. I've used it for a few years now. It's a pretty great mic for making podcasts and screencasts. The boom arm for my desk is a Heil PL-2T. This is a great arm. I've seen it used with several other mics too. My mic is attached to the arm with a Heil PRSM-B Shockmount. I also have a Heil Windscreen on it to cut down on breath noise.

The arm mounts into my desk with a Heil DT-1 Flush Mount. I have a Mogami Gold Studio 6' XLR cable cable in the arm connected to the mic. I found 6' is just about the perfect length. There's a little extra to work with but not too much. I know the Mogami cables are pretty pricey. From what I've read, it's the only cables you can audibly hear a difference in quality. They're fine cables. Probably doesn't matter that much though.

Continue reading →

© 2006-2022 Sam Soffes


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK