[PR #107] [MERGED] Fix issue when getRootViewController would return nil #125

Closed
opened 2025-12-29 18:29:11 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/UrbanApps/Armchair/pull/107
Author: @MartinMoizard
Created: 9/1/2017
Status: Merged
Merged: 9/9/2017
Merged by: @coneybeare

Base: masterHead: swift3-and-root-fix


📝 Commits (2)

  • 2bdd30f Migrate to Swift 3
  • eaebe86 Fix issue when getRootViewController would return nil

📊 Changes

4 files changed (+34 additions, -24 deletions)

View changed files

📝 Example/AppDelegate.swift (+1 -1)
📝 Example/ViewController.swift (+7 -7)
📝 Source/Armchair.swift (+23 -13)
📝 iOS Example.xcodeproj/project.pbxproj (+3 -3)

📄 Description

Depending the way the application is built, getting the root view controller would eventually return a nil value.

This fix makes sure to recursively iterate over subviews of the window to find the rootViewController.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/UrbanApps/Armchair/pull/107 **Author:** [@MartinMoizard](https://github.com/MartinMoizard) **Created:** 9/1/2017 **Status:** ✅ Merged **Merged:** 9/9/2017 **Merged by:** [@coneybeare](https://github.com/coneybeare) **Base:** `master` ← **Head:** `swift3-and-root-fix` --- ### 📝 Commits (2) - [`2bdd30f`](https://github.com/UrbanApps/Armchair/commit/2bdd30f9ed3037b775b7a25ad2e2b529957b3dd1) Migrate to Swift 3 - [`eaebe86`](https://github.com/UrbanApps/Armchair/commit/eaebe860da25c8d667d4ca7e61bc1aa995b47604) Fix issue when `getRootViewController` would return `nil` ### 📊 Changes **4 files changed** (+34 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `Example/AppDelegate.swift` (+1 -1) 📝 `Example/ViewController.swift` (+7 -7) 📝 `Source/Armchair.swift` (+23 -13) 📝 `iOS Example.xcodeproj/project.pbxproj` (+3 -3) </details> ### 📄 Description Depending the way the application is built, getting the root view controller would eventually return a `nil` value. This fix makes sure to recursively iterate over subviews of the window to find the rootViewController. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 18:29:11 +01:00
adam closed this issue 2025-12-29 18:29:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Armchair#125