MavEtJu / Geocube

Geocube is a fully featured open source Geocaching application for the iPhone. With support for multiple listing services, live import and logging and support for the import of GPX files, it is everything a hardcore geocacher needs.
http://geocube.mavetju.org/
3 stars 2 forks source link

Local menu button bug #1

Closed NightFlyer closed 7 years ago

NightFlyer commented 7 years ago

There is a bug in Geocube where the local menu button isn't always hidden or shown when it is supposed to be. The problem is caused because viewWillAppear doesn't set menuGlobal.menuLocalButton to the appropriate localMenuButton, so sometimes the previous MHTabBarController's localMenuButton is being displayed (and so it doesn't get hidden).

You can see this bug if you switch between different tab bar controllers via the global menu and between the items within a tab bar controller which should show/hide the local menu button.

Here is one way to reproduce the problem:

  1. Go to navigate/target.
  2. Exit app (and kill) -- this just makes sure that you're in a known state when starting up.
  3. Start up app
  4. You'll be at navigate/compass (no local menu button)
  5. Choose target tab (local menu button appears)
  6. Use global menu to switch to help. You'll be on "About", with no local menu button
  7. Choose Help tab (local menu button appears)
  8. Use global menu to switch to navigate. You'll be on "Target" with a local menu button -- but I believe it's actually the local menu button from the Help tab controller, although visually you can't tell.
  9. Choose compass tab. Local menu is still there.

The fix is easy: just set the globalMenu object's cached value appropriately when the view is displayed.

My code does that (as well as printing out a log message for you to see what is happening).

MavEtJu commented 7 years ago

Hello Tim,

Thank you very much for your patch. I knew this was an issue but never managed to get it fixed and now you did it for me! Really appreciate it. I will check it out and bring it into the code.

Edwin

NightFlyer commented 7 years ago

Glad I could help. I've been looking for an iOS project to work on, and Geocube might be a good one for me.

I'm curious as to how actively you're working on it, and what your plans are. That would help me understand whether it would be better for me to just work on a completely separate code base or work to coordinate things with you. For instance, while I can write Objective-C (I did a few apps for myself using it), I much prefer Swift -- and see it more as the future of iOS. If you're against Swift, then it would be better for me to just do my own thing then.

Here are some things that I'm interested in (no particular order):

MavEtJu commented 7 years ago

I'm curious as to how actively you're working on it, and what your plans are. That would help me understand whether it would be better for me to just work on a completely separate code base or work to coordinate things with you. For instance, while I can write Objective-C (I did a few apps for myself using it), I much prefer Swift -- and see it more as the future of iOS. If you're against Swift, then it would be better for me to just do my own thing then.

At this moment I stick to Objective-C as I cannot grasp how Swift works with all the ?'s before and after the variable names (to start with :-).

I don't have a roadmap for things, but I've done some experiments in the last couple of months:

For your suggestions:

doing a Watch app

I don't have an apple watch. If you want to enjoy the experiment with it, then it's all your pleasure to do.

internationalization/localization

That has been done in the last week.

changing to autolayout and size classes to make it easier to maintain for different types of devices.

That has been done earlier this year. Which parts are you missing?

I don't know exactly what that entails, if you can make it work feel free.

Good luck with UIPopoverController, that will give you a lot of kudos with the author of ActionSheetPicker too.

Towards WKWebView? If you can keep the authentication mechanisms working for OAuth and GCA2, then it's fine with me.

The code is free (as in beer and speech), you can do with it what you want. If you think it will be better for the greater good, submit patches (euhm, these days it's a "git pull", but you get the idea. If you think you can do it better, release your own app. Your imagination is your limit.

Edwin

MavEtJu commented 7 years ago

Incorporated, thanks heaps!