#Week 3 - Foundation
Last week we covered over bootstrap and some mobile design patterns, this week will cover Foundation framework and how we can use that.
-(BOOL)checkAuthorisationForCharacteristicType:(HKCharacteristicType *)characteristicType{ | |
HKAuthorizationStatus authStatus = [self.store authorizationStatusForType:characteristicType]; | |
if(authStatus == HKAuthorizationStatusSharingAuthorized){ | |
return YES; | |
}else{ | |
return NO; | |
} |
// | |
// HealthKitFormatter.m | |
// HealthKitExample | |
// | |
// Created by Scott Roberts on 24/07/2014. | |
// Copyright (c) 2014 Scottr. All rights reserved. | |
// | |
#import "HealthKitFormatter.h" |
// Playground - noun: a place where people can play | |
import UIKit | |
let numberFormatter = NSNumberFormatter() | |
numberFormatter.numberStyle = NSNumberFormatterStyle.CurrencyStyle | |
numberFormatter.formatterBehavior = NSNumberFormatterBehavior.Behavior10_4 | |
numberFormatter.currencyCode = "GBP" | |
numberFormatter.generatesDecimalNumbers = true | |
numberFormatter.locale = NSLocale(localeIdentifier: "en_UK") |
/** | |
*The following mimics thefunctionality of showDialog in how to call the function but instead of using the method | |
* to know what dialog to show we use the passed method name to check for that permssion e.g. "email". | |
*/ | |
// In www/facebook-native.js | |
exports.checkPermissions = function checkPermissions (options, s, f) { | |
exec(s, f, 'FacebookConnectPlugin', 'checkPermissions', [options]) | |
} |
/** | |
*The following mimics thefunctionality of showDialog in how to call the function but instead of using the method | |
* to know what dialog to show we use the passed method name to check for that permssion e.g. "email". | |
*/ | |
// In www/facebook-native.js | |
exports.checkHasCorrectPermissions = function checkHasCorrectPermissions (s, f) { | |
exec(s, f, 'FacebookConnectPlugin', 'checkHasCorrectPermissions', []) | |
} |