Jasonette / JASONETTE-iOS

📡 Native App over HTTP, on iOS
https://www.jasonette.com
MIT License
5.27k stars 352 forks source link

default colors while switching views #76

Open cpg opened 7 years ago

cpg commented 7 years ago

I tested my apps with regular (non-developer) people, on the road.

One of my apps is darkish-ish (maroon). One thing that people notice is that in between taps, there are these flashes of bright white full screens.

Could you point out where the colors for these "base" screens can be configured?

If they are not configurable at the moment, perhaps this bug can serve to make them explicitly configurable so that the user does not perceive as much the lag involved.

Side note: perhaps the lag can be addressed in the platform?

gliechtenstein commented 7 years ago

I think the best solution for this would be to come up with a JSON representation. But this is something we should think carefully before making the decision. Especially since our goal is to support this cross platform.

Let's keep this open until we figure out how to do this (not just for the body but for everything else, including the navigationbar color, etc)

For now, to serve this purpose you can universally set the background color that loads initially (before it gets reset by the background color loaded from the JSON) by adding this line to JasonAppDelegate.m's - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method:

[[UITableView appearance] setBackgroundColor: [JasonHelper colorwithHexString:@"#00ff00" alpha:1.0]];
cpg commented 7 years ago

That works well, thanks! It makes the switch in views less noticeable (less clumsy) and more smooth.

Couple of ideas:

cpg commented 7 years ago

Oh, I see what you mean with the nav header.

In modals, the header comes up all white sliding in from the bottom, so it's noticeable. Not as much as when the whole thing is white, but yeah, it's noticeable for darker apps.

cpg commented 7 years ago

i was going to submit an updated version of my app to the ios app store. then i thought the header being by default while may have a similarly simple solution. it's most visible in modals sliding in from the bottom to the top of the screen with a white header (and the rest with the darker default I set up).

we tried two things, none of which worked (together or combined).

one was adding:

    [[UINavigationBar appearance] setBackgroundColor: [JasonHelper colorwithHexString:@"#00ff00" alpha:1.0]];

and there is no visual change that i can tell.

the other was to merge the latest changes from the develop branch, specifically the fix to #50. same thing.

IvRRimum commented 7 years ago

+1