Skip to content

Instantly share code, notes, and snippets.

View jessangel79's full-sized avatar
👩‍💻
iOS Mobile Developer

Angélique Babin - AngelAppDev jessangel79

👩‍💻
iOS Mobile Developer
View GitHub Profile
// MARK: - Menus
override func buildMenu(with builder: UIMenuBuilder) {
super.buildMenu(with: builder)
builder.insertChild(AppDelegate.fileMenu(), atStartOfMenu: .file)
builder.insertChild(AppDelegate.viewMenu(), atStartOfMenu: .view)
builder.remove(menu: .format)
builder.remove(menu: .toolbar)
builder.remove(menu: .help)
<html>
<head>
<style>
:root {
color-scheme: light dark;
}
body {
font-family: -apple-system;
font-size: 10pt;
@HassanElDesouky
HassanElDesouky / UserDefaults+Extension.swift
Created July 16, 2019 13:42
Store UIColor with UserDefaults
extension UserDefaults {
func colorForKey(key: String) -> UIColor? {
var colorReturnded: UIColor?
if let colorData = data(forKey: key) {
do {
if let color = try NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(colorData) as? UIColor {
colorReturnded = color
}
} catch {
print("Error UserDefaults")
@candostdagdeviren
candostdagdeviren / .swiftlint.yml
Last active November 20, 2025 09:41
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma
@juliengdt
juliengdt / Soumission Apple Appstore - iOS.md
Last active July 28, 2020 17:10
Soumission Apple Appstore - iOS

Soumission Apple Appstore - iOS

Ce document liste toutes les informations nécessaires afin de soumettre rapidement une application iOS sur iTunesConnect pour:

  • Une nouvelle application
  • Une mise à jour d'application

Nouvelle Application

@kunikullaya
kunikullaya / Date+Extension.swift
Created January 18, 2017 05:21
Date Extension for Swift
import Foundation
extension Date {
func toString(format: String = "yyyy-MM-dd") -> String {
let formatter = DateFormatter()
formatter.dateStyle = .short
formatter.dateFormat = format
return formatter.string(from: self)
}
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@aclissold
aclissold / NSUserDefaults+UIColor.swift
Created June 1, 2015 14:52
Swift NSUserDefaults UIColor extension
extension NSUserDefaults {
func colorForKey(key: String) -> UIColor? {
var color: UIColor?
if let colorData = dataForKey(key) {
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor
}
return color
}