UINavigationController flow on issues #1

The UINavigationController implementation went smoother than I thought. Removing the hard coded Banner item and replacing it with the NavigationController worked well. There were a few hiccups though.

When the match is being scored and the user slides the score over to the player performance or the match graph, etc, a small floating score board so people can still see the score and lodge scores while also doing the player performance.

The issue with this was the floating banner was using the banner to place itself, so with the UINavigationController is was actually timer.

I tried to adjust the auto layout constraints and the floating score didn’t show. It took me a little while to realise it was being drawn under the new UINavigationBar.

The fix for this was to place the scoring floating view into the app window view, which places it above the UINavigationController.

// Add the view to the window to ensure it's above the navigation bar
if let window = view.window {
    window.addSubview(self)
} else {
    view.addSubview(self)
}

Then set the views topAnchor constraint to a a constant. This was a bit of guess work and playing around to get it to layout above the timer. I also too the change to make the score view a bit smaller.

This fixed the issue but at the same time I’m not a bit fan of that kind of thing. I think it would be better to somehow slide out the score underneath the timer, or something similar. This is something to look at down the track though.

Similar Posts