FCM 설정법
iOS/FCM with XCode Swift참고 : http://zeany.net/28
참고 : http://zeany.net/28
//
// CommonLib.swift
// TodoBox
//
// Created by GANG WOOK KIM on 16/05/2018.
// Copyright © 2018 GANG WOOK KIM. All rights reserved.
//
import Foundation
import UIKit
public class CommonLib
{
init()
{
}
class public func UIColorFromRGB(_ rgbValue: UInt) -> UIColor
{
return UIColor(
red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat( rgbValue & 0x0000FF ) / 255.0,
alpha: CGFloat(1.0)
)
}
class public func UIColorFromRGB(_ rgbValue:String) -> UIColor
{
var cString:String = rgbValue.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
if (cString.hasPrefix("#"))
{
cString.remove(at: cString.startIndex)
}
if ((cString.count) != 6)
{
return UIColor.gray
}
var rgbValue:UInt32 = 0
Scanner(string: cString).scanHexInt32(&rgbValue)
return UIColor(
red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat( rgbValue & 0x0000FF ) / 255.0,
alpha: CGFloat(1.0)
)
}
}
Status Bar 숨기기 (Carrier/ Wifi/ BatteryIcon Bar) (0) | 2018.05.18 |
---|---|
Constraint 동적 추가 (0) | 2018.05.17 |
Class 정의 (0) | 2018.05.16 |
애플 Swift Standard Library (0) | 2018.05.16 |
Swift.org (0) | 2018.05.16 |
1) https://blueprintcss.io
2) http://simplegrid.io
3) https://kamalkhan.github.io/awesome-grid/
4) https://www.cssscript.com/tag/grid-layout/
CSS Grid vs Flex (0) | 2018.10.25 |
---|---|
CSS Grid Syntax Summary (0) | 2018.10.25 |
CSS Grid 기본 이해하기 (0) | 2018.10.25 |
CSS Grid layout (0) | 2018.05.16 |