Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
import Charts
// MARK: - Data Model
struct MetricData: Identifiable {
let id = UUID()
let day: String
let value: Double
}
@VuHD
VuHD / ios11_uinavigationbar_behavior.md
Created June 16, 2025 07:07 — forked from niw/ios11_uinavigationbar_behavior.md
A note of my observation about iOS 11 UINavigationBar behavior.

UINavigationBar on iOS 11

NOTE This note is written based on Xcode version 9.0 beta 6 (9M214v) and its simulator binary.

iOS 11 changes UINavigationBar a lot, not just only for its large title, but also the internal view hierarchy and lay outing views are changed. This is a small note about UINavigationBar behavior on iOS 11, mainly focusing on migrating the application to iOS 11.

Lay outing views

UINavigationBar has been using manual lay outing until iOS 10, so all its content views like titleView has been directly child view of the UINavigationBar. However, since iOS 11, it is using auto layout with bunch of layout guides to lay out its content views in its own internal container view, _UINavigationBarContentView.

@VuHD
VuHD / MLWAsyncAVPlayer.h
Created February 10, 2022 09:18 — forked from k06a/MLWAsyncAVPlayer.h
Awesome optimized AVPlayer for smooth scrolling AVPlayerLayer inside UICollectionView/UITableView (tested on iOS10+)
#import <AVFoundation/AVFoundation.h>
@interface MLWAsyncAVPlayer : AVPlayer
@end