Skip to content

Instantly share code, notes, and snippets.

View iosharry's full-sized avatar
🧑‍💻

GwangYong Lee iosharry

🧑‍💻
View GitHub Profile
@iosharry
iosharry / souretree-devices-not-configured-Issue.txt
Created March 2, 2020 11:50
Souretree - Devicee not configured Issue
// 1.
git config credential.helper
// 2.
git config credential.helper sourcetree
@iosharry
iosharry / KeyboardControllable.swift
Created December 13, 2019 12:12
KeyboardControllable
@objc protocol KMKeyboardControllable {
@objc func keyboardState(notification: Notification)
}
extension KMKeyboardControllable {
func setKeyboardNotification() {
NotificationCenter.default.addObserver(self, selector: #selector(keyboardState(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardState(notification:)), name: UIResponder.keyboardWillHideNotification, object: nil)
}
@iosharry
iosharry / iOS13StatusBarExample.swift
Created September 18, 2019 14:31
iOS13 StatusBar Crash Issue
private var statusBarView: UIView?
if #available(iOS 13.0, *) {
let tag = 38482458385
if let statusBar = UIApplication.shared.keyWindow?.viewWithTag(tag) {
statusBarView = statusBar
} else {
let statusBar = UIView(frame: UIApplication.shared.statusBarFrame)
statusBar.tag = tag
UIApplication.shared.keyWindow?.addSubview(statusBar)
@iosharry
iosharry / bluegray.xccolortheme
Last active July 28, 2019 14:19
Xcode Custom Theme - Created by gwangyonglee
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.278431 0.415686 0.592157 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Monaco - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.278431 0.415686 0.592157 1</string>
@iosharry
iosharry / ViewController.swift
Created June 22, 2019 13:56
Collectionview Paging Center
extension ViewController: UIScrollViewDelegate {
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
// CollectionView Item Size
let cellWidth = collectionViewFlowLayout.itemSize.width + collectionViewFlowLayout.minimumLineSpacing
var offset = targetContentOffset.pointee
// 이동한 x좌표 값과 item의 크기를 비교 후 페이징 값 설정
let index = (offset.x + scrollView.contentInset.left) / cellWidth