Skip to content

Instantly share code, notes, and snippets.

@takecian
takecian / WebUtility.swift
Created March 22, 2017 03:25
html tag を除去する
//
// WebUtility.swift
// npbsns
//
// Created by FUJIKI TAKESHI on 2016/02/05.
// Copyright © 2016年 Takeshi Fujiki. All rights reserved.
//
import UIKit
@takecian
takecian / hipster.swift
Created March 6, 2016 09:04
hipsterSwift
//: Playground - noun: a place where people can play
// @noescape
class Kraken {}
class KrakenGeneral {
var soldiers = [Kraken]()
func startTheWar() {
prepareTheKrakenArmyForBattle(punishments: {
soldiers.removeFirst() // ここで self を書く必要がありません
@takecian
takecian / PushNotificationManager.swift
Last active November 13, 2015 13:45
Utility functions for iOS PushNotification
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