Skip to content

Instantly share code, notes, and snippets.

View ibrahimyilmaz7's full-sized avatar
🎯
Focusing

Ibrahim Yilmaz ibrahimyilmaz7

🎯
Focusing
View GitHub Profile
@zef
zef / CollectionView.swift
Created January 16, 2020 22:50
A layout similar to a CollectionViewFlowLayout, but in SwiftUI.
// Created by Zef Houssney on 1/9/20.
// This takes some inspiration from https://gist.github.com/chriseidhof/3c6ea3fb2102052d1898d8ea27fbee07
// but uses a different approach.
// Instead of trying to calculate the position of each item and placing them manually using calculated coordinates,
// this calculates the amount of space each item wants to take up, then splits the items into rows that should fit
// within the available width.
// Then, the views are distributed into rows, made up of an HStack for each row inside a VStack.
//
// This seems non-conventional, but I was having trouble getting the frame of my top-level view to be respected when returning
@ibrahimyilmaz7
ibrahimyilmaz7 / Xcode 11 Duplicate Line or Selection.md
Last active February 22, 2022 09:07
Xcode 11 - Duplicate Selection
  1. Open directory in Finder with Cmd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
  1. Open IDETextKeyBindingSet.plist with a text editor.

  2. Add this in: