Skip to content

Instantly share code, notes, and snippets.

@ktiays
ktiays / MenuTrigger.h
Last active September 17, 2023 14:10
A utility that can show UIContextMenu at any position programmatically in iOS 17.
//
// Created by ktiays on 2023/9/16.
// Copyright (c) 2023 ktiays. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// A utility class that can show `UIContextMenu` at any position programmatically.
@ktiays
ktiays / iOSUnresponsive.swift
Last active August 15, 2023 08:22
iOS 15+ unresponsive bug
//
// Created by ktiays on 2023/8/15.
// Copyright (c) 2023 ktiays. All rights reserved.
//
/**
* The purpose of this example is to demonstrate a bug in iOS 15 and higher versions.
* This bug will cause the app to be completely unresponsive to any actions.
*
* When you open a `UISheetPresentationController` and there is a `UINavigationController` at the bottom,
@ktiays
ktiays / remove_vim_background.md
Created December 2, 2021 07:46
Configuration to remove background of SpaceVim.

Configuration to remove background of SpaceVim.

When I finish installing SpaceVim and start vim, I notice that the text editor section has a background color that I don't expect to appear.

Solution

Add the following code to the end of the ~/.SpaceVim/vimrc file.

hi Normal guibg=NONE ctermbg=NONE
hi EndOfBuffer guibg=NONE ctermbg=NONE