This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WebUtility.swift | |
// npbsns | |
// | |
// Created by FUJIKI TAKESHI on 2016/02/05. | |
// Copyright © 2016年 Takeshi Fujiki. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
// @noescape | |
class Kraken {} | |
class KrakenGeneral { | |
var soldiers = [Kraken]() | |
func startTheWar() { | |
prepareTheKrakenArmyForBattle(punishments: { | |
soldiers.removeFirst() // ここで self を書く必要がありません |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PushNotificationManager { | |
class var isPushNotificationEnable: Bool { | |
let osVersion = UIDevice.currentDevice().systemVersion | |
if osVersion < "8.0" { | |
let types = UIApplication.sharedApplication().enabledRemoteNotificationTypes() | |
if types == UIRemoteNotificationType.None { | |
// push notification disabled | |
return false | |
}else{ | |
// push notification enable |