Author Archives: Norm

Gesture Recognizers in iOS 9

I don’t code nearly as much as I’d like to, so keeping up-to-date is always a major challenge. I’m still trying to get up to speed on all the great iOS 8 updates with iOS 9 is right around the corner. So, this is probably not news to you but it was news to me.

Prior to iOS 9, you could have a gesture recognizer (GR) associated with 2 different views. You weren’t supposed to but you could. After wiring the GR to both views, you could add the UIGestureRecognizerDelegate method:

– (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch

return YES, and Bob was your uncle. If you do that in iOS 9, you get a very nice error message stating you were never supposed to do that, it’s now being enforced, and the GR will only be added to the view that first loads it. Having figured that out, okay, no biggie, I removed one of my views from all my GRs and then added “duplicate” GRs to the other view, named them differently so I knew which were which, and wired them to the same action method. All good to go.

P.S. Here’s the relevant Apple Documentation page. Scroll down to:

Gesture Recognizers Are Attached to a View

Every gesture recognizer is associated with one view. By contrast, a view can have multiple gesture recognizers, because a single view might respond to many different gestures. For a gesture recognizer to recognize touches that occur in a particular view, you must attach the gesture recognizer to that view. When a user touches that view, the gesture recognizer receives a message that a touch occurred before the view object does. As a result, the gesture recognizer can respond to touches on behalf of the view.

Oh Garmin…

I’ve been meaning to write out this for a while but this past week finally spurred me into action. It’s been a trying week for some if not all (tri)athletes out there, well, the ones that use a Garmin device, which is just about all of them. Actually, now that I think about it, I guess it was only Garmin wielding athletes that have iPhones. On August 6, Garmin updated their iOS (and Android) Garmin Connect app. This is the app you use to sync all your workouts with Garmin Connect, a task most athletes do before they get in their car to drive home from the workout. You can also view your activities, do some minor editing (like change the name, activity type, etc.), and share them. Well, the latest update was a major cluster, crashing on launch for most or simply not working after launch for the rest. Here’s a screen shot of their latest reviews on the App Store.

Screen Shot 2015-08-10 at 10.21.11 AM

Not that this is anything new for Garmin, most athletes have a love/hate relationship with Garmin. When working correctly, their devices are arguably the best available, particularly the Garmin 920XT. Sadly, getting to “when working correctly” can be a long and painful process. I’m not sure if it’s Garmin’s (perceived?) monopoly of the athlete GPS-based device market or just plain incompetence. My hope is the Apple Watch one day gives them a run for their money, although it certainly can’t do that in it’s current incarnation (although maybe it could on the entry level market).

It took 4 days for Garmin to post an update to their iOS app, which in reality is not that bad given App Review times and it’s over a weekend. I am happy to report the Garmin Connect app no longer crashes on launch and seems to sync with my device, yay! On a slightly less happy note, it appears Garmin still doesn’t understand basic Physics/Math, as they don’t calculate the overall pace correctly on the “laps” tab view. Here’s a screen shot.

IMG_1478

Total Avg. Pace should be 9:18/mi.

You can’t average the “Avg. Pace” paces to get the overall pace for your run (unless you run an exact (integer) number of miles every time). Most people don’t do that, although I have some friends that try. Garmin does correctly calculate the overall average pace in other places of the app, notably the “Dashboard” tab view you get when tapping on an activity. Sigh.

I admit I have absolutely zero experience with the Android version of the Garmin Connect app but it appears you Android guys are far from immune.

Screen Shot 2015-08-10 at 10.25.46 AM

As far as I can tell, Garmin has not yet updated the Android version.

iOS 9 beta 4 OTA

Just a quick note if you are having difficulties installing the new (released July 21) iOS 9 beta 4 on your device via OTA (over-the-air), which prevents you from having to do a Restore. You need to remove any “beta” profiles or WatchOS profiles that might be installed. If you have either of these, delete them (Settings –> General –> Profiles), restart, then go to Settings –> General –> Software Update and the new version will appear. Enjoy!

NHL Bracket Challenge 2015

I have not been following the NHL very closely this year, Toronto’s season was just too brutal to watch after they fired Randy Carlyle. I have never been a big Randy fan but you can’t argue with the Leaf’s record with and then without him as coach.

Given the above, here’s my WAG at who will win the Stanley Cup. I’ve thought St. Louis has had a real shot for several years now but have a feeling this is the season they believe they can win and will do something special. I’m also want to see the NYR go deep.

I know this is blasphemous to say but with the NBA playoffs starting soon and with the Warriors and the Raptors having great and very good seasons, I will be tempted to watch as much basketball as hockey probably.

Here’s my NHL Bracket:

Myth of High-Protein Diets

This is a GREAT read! Many research papers sited. I highly suggest you read the entire article but here’s the key excerpt:

What that means in practice is little or no red meat; mostly vegetables, fruits, whole grains, legumes and soy products in their natural forms; very few simple and refined carbohydrates such as sugar and white flour; and sufficient “good fats” such as fish oil or flax oil, seeds and nuts. A healthful diet should be low in “bad fats,” meaning trans fats, saturated fats and hydrogenated fats. Finally, we need more quality and less quantity.

23ornish-blog427

Kaley McKean

 

Original article by DEAN ORNISH, MARCH 23, 2015 NYT.

March Madness

While I managed to get onto the Yahoo! website just under the wire and created this before the first games were played, I’ve been working on a project and so am only now posting my bracket. Of course, Baylor lost yesterday in one of the first upsets, so it’s already “blown up”. As I stated last year, I don’t follow NCAA Basketball, so this is more of an exercise in statistics than anything else. Good luck to all the teams competing this year!

Pi Day!!!

As you probably have seen, tomorrow, March 14, 2015, when written using the standard US (short) notation 3/14/15, spells out the first 5 digits of Pi. As it turns out, you can go even further down the Pi “number” hole. Here are a couple of good references:

Vox has a good (layperson) explanation of Pi Day
http://www.vox.com/2015/3/13/8205807/pi-day

Jeff Rosenthal has a detailed explanation of the Pi Instant
http://probability.ca/jeff/writing/PiInstant.html

You can also find your birthday “spelled out” WITHIN the digits of Pi using this cool Wolfram site!  Here is mine:

Vernal Equinox – March 20, 2015

The 2015 Vernal Equinox, which marks the first day of Spring for Northern Hemisphere dwellers, is almost upon us. This is the (one of 2) point(s) in the Earth’s orbit when the tilt of its axis (e.g. the North Pole) is neither pointing toward nor away from the Sun. In this situation, virtually all parts of the Earth receive (approximately) equal amounts of day and night (12 hours each). It’s also the point at which the increasing amount daylight (or night-time in the case of the Autumn Equinox) is at a maximum! Here are a few links if you’d like to learn more about equinoxes:

Wikipedia

Time and Date

The Old Farmer’s Almanac