Skip to content

Instantly share code, notes, and snippets.

View mercen-lee's full-sized avatar
🐦
Swifting

이석호 mercen-lee

🐦
Swifting
View GitHub Profile
@mercen-lee
mercen-lee / scroll_safe_area_padding.dart
Created June 18, 2026 02:14
Safearea reacting scrollview implementation for Flutter
/*
How to use ScrollSafeAreaPadding
This helper prevents ScrollView content from being hidden behind:
- top safe area: status bar, notch, Dynamic Island
- bottom safe area: iOS home indicator, Android navigation gesture area
The pattern is based on:
MediaQuery.of(context).padding.top
@mercen-lee
mercen-lee / tab_button.dart
Created June 18, 2026 01:36
iOS style button interaction animation implementation for Flutter
/*
How to use TapButton
TapButton is a small iOS-style press effect wrapper that replaces Flutter's
default Material ripple.
It does not use:
- InkWell
- InkResponse
- Material splash / ripple
@mercen-lee
mercen-lee / fullscreen_swipe_page.dart
Last active June 18, 2026 02:44
iOS 26 style navigation animation implementation for Flutter
/*
How to use FullscreenSwipePage
1) Initialize in main() (required for iOS corner-radius support)
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await FullscreenSwipePage.init();
runApp(...);
}
@mercen-lee
mercen-lee / UINavigationControllerExtension.swift
Last active October 15, 2024 03:18
"Swipe anywhere to pop" implementation for SwiftUI
import UIKit
extension UINavigationController: @retroactive UIGestureRecognizerDelegate {
override open func viewDidLoad() {
super.viewDidLoad()
navigationBar.isHidden = true
interactivePopGestureRecognizer?.isEnabled = false
let popGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(_:)))
popGestureRecognizer.delegate = self