I hereby claim:
- I am akio46 on github.
- I am akio46 (https://keybase.io/akio46) on keybase.
- I have a public key ASCYfkKvrRfsuWbc7tcyXp0dfcbcLYySmFVnFJhMfNJ9Vwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// | |
// TSAPIHandler.swift | |
// ToeSlip | |
// | |
// Created by Akio Yamadera on 11/16/16. | |
// Copyright © 2015 mobilosophy LLC. All rights reserved. | |
// | |
// All of server/client communication functions are defined in this class | |
// Alamofire which is swift port of AFNetworking which is proven and widely used in Objective C |
import { Component, OnInit } from '@angular/core'; | |
import { DateRange } from '../common/datetime-range/datetime-range.component'; | |
@Component({ | |
selector: 'sample', | |
templateUrl: 'app/component/sample/sample.component.html', | |
styleUrls: ['app/component/sample/sample.component.css'] | |
}) | |
export class SampleComponent { |
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { FormsModule } from '@angular/forms'; | |
import { RouterModule } from '@angular/router'; | |
import { SplitTextBoxModule } from '../common/split-text-box/split-text-box.module'; | |
import { DateTimeModule } from '../common/datetime/datetime.module'; | |
import { DateTimeRangeModule } from '../common/datetime-range/datetime-range.module'; | |
import { TooltipModule } from '../common/tooltip/tooltip.module'; |
- (UIImage *)getSnapshotFromView:(UIView *)v { | |
UIGraphicsBeginImageContextWithOptions(v.bounds.size, NO, 0.0f); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
[v.layer renderInContext:context]; | |
UIImage *snapshotImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
return snapshotImage; | |
} |
+ (HealthKitManager *)sharedManager { | |
static dispatch_once_t pred = 0; | |
static HealthKitManager *instance = nil; | |
dispatch_once(&pred, ^{ | |
instance = [[HealthKitManager alloc] init]; | |
instance.healthStore = [[HKHealthStore alloc] init]; | |
instance.connected = [[NSUserDefaults standardUserDefaults] boolForKey:APPLE_HEALTHKIT_CONNECTION]; | |
}); | |
return instance; | |
} |