- IdeasOnCanvas/Aiolos - A floating panel for your iOS Apps
- d2burke/bottom-sheet - An approximation of Apple Maps' Bottom Sheet
- ahmad-elassuty/BottomSheetController - A demo project to show how to build bottom sheets in iOS, like iOS 10 Maps app.
- mrustaa/ContainerController - UI Component. This is a copy swipe-panel from app: Apple Maps, Stocks. Swift version
- pfandrade/Drawer - An iOS Maps like drawer view controller implementation
- babylonhealth/DrawerKit DrawerKit lets an UIViewController modally present another UIViewController in a manner similar to the way Apple's Maps app works.
- mkko/DrawerView - A drop-in view, to be used as a drawer anywhere
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
import UIKit | |
extension UIBlurEffect { | |
@available(iOS 9.0, *) | |
static func customBlurEffect(blurRadius: CGFloat) -> UIBlurEffect { | |
let UICustomBlurEffect = NSClassFromString("_UICustomBlurEffect") as! UIBlurEffect.Type | |
let customBlurEffect = UICustomBlurEffect.init() | |
customBlurEffect.setValue(blurRadius, forKey: "blurRadius") |
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
import Foundation | |
public extension Encodable { | |
func jsonString(options: JSONEncoder.OutputFormatting = .prettyPrinted) -> String? { | |
let encoder = JSONEncoder() | |
encoder.outputFormatting = options | |
guard let jsonStringData = try? encoder.encode(self) else { | |
return nil | |
} |
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
import UIKit | |
extension UIDevice { | |
var hasHomeIndicatorArea: Bool? { | |
// AppDelegate에서 window의 makeKeyAndVisible()이 호출되기 전에는 keyWindow 프로퍼티가 nil 값을 반환하므로, | |
// 그 전에는 AppDelegate window 프로퍼티를 가져오도록 한다. | |
guard let window: UIWindow = UIApplication.shared.keyWindow ?? UIApplication.shared.delegate?.window ?? nil else { | |
return nil | |
} | |
let bottomSafeAreaInsets = window.safeAreaInsets.bottom |
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
import sys, plistlib, json, re, subprocess | |
from datetime import datetime as dt | |
from datetime import timedelta | |
import urllib.parse as up | |
def dequote(path): | |
if (path[0] == path[-1]) and path.startswith(("'", '"')): | |
return path[1:-1] | |
else: | |
return path |
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
import UIKit | |
extension UIView { | |
func layerImage() -> UIImage { | |
let renderer = UIGraphicsImageRenderer(bounds: bounds) | |
let image = renderer.image { context in | |
layer.render(in: context.cgContext) | |
} | |
return image | |
} |
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
import Foundation | |
extension URLComponents { | |
var fragmentItems: [URLQueryItem]? { | |
get { | |
var components = URLComponents() | |
components.query = fragment | |
return components.queryItems | |
} | |
set { |
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
import UIKit | |
extension UIImage { | |
func resizeCanvas(size canvasSize: CGSize, color canvasColor: UIColor = .clear) -> UIImage { | |
let renderer = UIGraphicsImageRenderer(size: canvasSize) | |
let resizedImage = renderer.image { (context) in | |
canvasColor.setFill() | |
context.fill(CGRect(origin: .zero, size: canvasSize)) | |
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
Array.prototype.replace = function(replacingArray, startIndex = 0) { | |
const replacedArray = this.slice() | |
Array.prototype.splice.apply(replacedArray, [startIndex, replacingArray.length].concat(replacingArray)) | |
return replacedArray | |
} |
OlderNewer