cat introspection_query.json
{
"query": "query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }| import SwiftUI | |
| struct ContentView: View { | |
| var body: some View { | |
| HStack { | |
| Text("Hello") | |
| .padding() | |
| .background(.blue) | |
| .overlay { | |
| Color.yellow |
| /// The ring leader | |
| final class ModalTransitioningDelegate: NSObject, UIViewControllerTransitioningDelegate { | |
| func presentationController( | |
| forPresented presented: UIViewController, | |
| presenting: UIViewController?, | |
| source: UIViewController | |
| ) -> UIPresentationController? { | |
| return PresentationController(presentedViewController: presented, presenting: presenting) | |
| } |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
| // Mask UIView with rect/path | |
| // inverse = false: part inside rect is kept, everything outside is clipped | |
| // inverse = true: part inside rect is cut out, everything else is kept | |
| // | |
| // Usage: | |
| // | |
| // // - Cuts rectangle inside view, leaving 20pt borders around | |
| // let rect = CGRect(x: 20, y: 20, width: bounds.size.width - 20*2, height: bounds.size.height - 20*2) | |
| // targetView.mask(withRect: rect, inverse: true) | |
| // |
Picking the right architecture = Picking the right battles + Managing trade-offs
| // Run this in the F12 javascript console in chrome | |
| // if a redirect happens, the page will pause | |
| // this helps because chrome's network tab's | |
| // "preserve log" seems to technically preserve the log | |
| // but you can't actually LOOK at it... | |
| // also the "replay xhr" feature does not work after reload | |
| // even if you "preserve log". | |
| window.addEventListener("beforeunload", function() { debugger; }, false) |