Skip to content

Instantly share code, notes, and snippets.

View h4cky's full-sized avatar

Ivelin Georgiev h4cky

  • Sofia, Bulgaria
  • 04:20 (UTC +03:00)
View GitHub Profile
@niw
niw / ios11_uinavigationbar_behavior.md
Last active January 3, 2024 11:35
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.

@bisko
bisko / gist:729498
Created December 5, 2010 21:41
Pretty bad way of skipping the first load of an iframe...
var hiddenIfr = document.getElementById('hiddeniframepopup');
if (hiddenIfr) {
hiddenIfr.onload = function() {
this.onload = function () {
ifr.innerHTML = this.contentDocument.body.innerHTML;
}
}
}