The tvOS long press

Random

If you’d like to detect a long press on a UIButton or just for a view that has no buttons – it’s pretty easy. There is one simple gotcha, however. You’ll trigger your selector twice. Once when detected (down on the glass pad Apple TV remote), and again on the pad’s release.

So you’ll need to set a BOOL for knowing what the state is. Easy enough.

fileprivate var longDown: Bool = false

override func viewDidLoad()
{
    super.viewDidLoad()
    let longPressGestureRecognizer = UILongPressGestureRecognizer(target: self, 
    action: #selector(longPress(longPressGestureRecognizer:)))
    view.addGestureRecognizer(longPressGestureRecognizer)
}

func longPress(longPressGestureRecognizer : UILongPressGestureRecognizer)
{
    // I fire on the down and also on the release.
        
    if longDown == false {
        longDown = true
        print("long press down.")
    } else {
        longDown = false
        print("long press up.")
    }
}

I would not have thought that the gesture would be triggered twice on hardware, but it does.

Tagged :

WWDC 17 Packing List

WWDC17

It’s almost time for WWDC17, this year in San Jose, CA instead of San Francisco. I haven’t been in several years because my lottery skills are obviously lacking. I managed to score one this year and I’m pretty excited. What will I take this year?

Well, to be honest, taking a laptop to sessions in the past, for me, has been serious overkill. I might jot some notes down in a Moleskine or other notebook – for transcription later. Taking notes on a laptop brings distraction to the game for me. Am I plugged in and charging? I need to get close to a plug. Oh, I can check Facebook during this session. Email. Pretend to be coding something amazing in Xcode. Taking notes on a laptop makes me feel like a court stenographer and I want to relax a bit and take the information in. I can always watch the session again later in its stored video format (to catch some details that might have gone by too quickly).

I will still take my trusty MacBook Pro R, but that will be for when I’m back in my room at night – coding, emailing, sorting photos, watching session videos again, etc. It will probably stay in my room locked up. Charged and ready for my welcome return at the close of each day. That will save me a bunch of weight to lug around too. I can use my laptop bag for other things, including hoofing multiple Odwalla juices around (if they supply those big cans of it around the venue).

For travel:

  • Bose QuietControl 30
  • Bose QuietComfort 35
  • Casio ProTrek PRW 3100y-1B (all black) watch

For the sessions:

  • iPhone 6 Plus. The most important bit of gear I have.
  • At least two portable battery chargers. Anker Astro Pro Series(20000mAH) and a RavPower (16750mAH)one I had before the Anker. Both charged up and ready to fly. The Anker needs plugged into an outlet, the RavPower does microUSB for charging.
  • Two point-and-shoot cameras – both Sony. An older one which is my favorite, and a newer model which I don’t like as much.
  • Timbuk2 messenger laptop bag.
  • Moleskine, fountain pen, EDC pens, etc.
  • Zojirushi Coffee Thermos 20oz. Über awesome and über important.
  • Various cables, USB wall plugs, etc.
  • Takeya ThermoFlask Insulated Stainless Steel Water Bottle, 40 oz, Asphalt. Huge. Perfect. Might leave at the hotel as it could be overkill.
  • Apple Watch series 2. I’m hoping Apple updates the WWDC iOS app and it gets watch support – for keeping us on our selected schedules, getting important updates, map support, etc.
  • Sunglasses. For me, very important.

Hotel:

  • Takeya ThermoFlask Insulated Stainless Steel Water Bottle, 40 oz, Asphalt. Huge. Perfect. No water bottles.
  • Couple of polos/shirts (a few older WWDC ones, a Swift logo one, etc.)
  • Shorts/jeans/Scarpa shoes. Scarpa Margherita rock.
  • A spring jacket in case it gets cool at night (Patagonia fold up for laptop bag) – not wearing a WWDC17 one if Apple swags those out.
  • Livionex tooth gel. Its amazing.
  • Wet shaving and beard gear. Very important to clean up daily.
  • Packing cubes. Although I’m not bringing a ton of clothes, they really, really, really help keep things tidy. I know I’ll be bringing back a few additional shirts and a sweatshirt at least.
  • Snooz white noise generator (I got from Kickstarter)
Tagged : / / /

Apple’s Automatic Station Tuning Patent

It’s not here, but Apple was awarded a patent for it.

I’ve been personally waiting for something like this for a while. Apple knows enough about our behaviors at this point to be able to pull together some content it predicts we’d like. But this is the kicker… it will pull radio, music, television, movies, onboard media, etc. For a media player or mobile device… so iPhones to iPod Touches to Apple TVs to … ?

Continue reading “Apple’s Automatic Station Tuning Patent”

Every morning an Apple commercial

Lucky enough to attend WWDC13 this year, when iRadio was announced and released to developers, one of the cooler parts of the at conference iRadio offering was a station called “Music Heard at WWDC”.

Apple culled together a lot of music into a playlist that would play during intermissions between developer sessions. All that music was put together into a iRadio station. I think since the conference ended it was removed from a station to access. However I saved it to my stations right away – and I have access to it still.

Every morning in the shower is an Apple commercial – complete with soundtrack. Using a wireless Bose BT speaker and my iPad mini, I am filling the upstairs with sweet Apple camp. A pretty nice way to help set the day right.

Tagged :

Apple TV Sunday… all smiles

Knowing someone who manages engineers working on Apple TV is a pleasant bonus in the back of my mind. Sundays with Apple TV devices scattered around our home hooked up to our Wi-Fi and widescreen television panels produces such a pleasant experience.

The kids are reading proper books. Our new rule is to read the pressed pulp version of books, not to read them on devices. It allows for a break with technology and it’s experience, and allows them to enjoy a time-honored tradition of ink and paper. You can’t remember the texture, the slight smell of the pages and cover adhesive, the elegant binding, etc. in a digital format.

We have radio classical music wafting through the large pockets of air, reaching their ears, calming them and allowing them to concentrate a bit more. It really does work. The Bose systems involved further enhance the experience.

Sorry Dad for having made a bit of fun at your expense growing up. When you put your LPs on the stereo and play those rare recordings of classical genius, I’d laugh and proceed to listen to a cassette of Megadeth or something else. That type of music still rings through me – but classical has truly grown on me and now I can see where you were coming from.

Classical was meant as music for the people, not for the elite as it’s often portrayed. I am happy that my children embrace classical at times too. It’s helping with their reading as well, so I can only be happy. The Apple TV allows for this in our home… be it directly connecting to radio services, or connecting from our multitude of iOS and OS X devices. I don’t need to mention video media – because it shines there for other reasons as well.

Tagged : /