Page 1 of 1

Browser Rubberbanding and Launch Screen?

Posted: Sun Jan 07, 2018 11:15 pm
by the_wesley_watkins
I currently have an app that is entirely written in HTML, CSS, and Javascript. I simply use a browser to display the HTML file. It's going well, but I have two concerns with the app.

1. Rubberbanding
Rubberbanding is when you scroll to the very bottom of the page and the browser shifts up, revealing the grey background. I hope that makes sense. It's hard to explain. Either way, I'm curious as to how to get that to stop. I've been reading online that I should add "UIWebViewBounce" to the .plist file and set its value to "NO". However, that did not work.

2. Launch Screen
So, whenever I launch my app, I am met with a launch screen... which is fine. However, after the launch screen, there is a page that shows "main.txt" in the header and then the browser finally shows. I was curious how to remove the quick screen that shows "main.txt". It's not a major thing, it only lasts a few seconds, but it doesn't seem very professional.

Re: Browser Rubberbanding and Launch Screen?

Posted: Sun Jan 07, 2018 11:24 pm
by Mr. Kibernetik
SET TOOLBAR OFF command does not turn off the top toolbar?

Re: Browser Rubberbanding and Launch Screen?

Posted: Sun Jan 07, 2018 11:49 pm
by the_wesley_watkins
It does while the app is running... but for a quick second before the app starts, it shows the "main.txt" really fast before launching into the app. I just want to skip that because it seems a little unprofessional.

Re: Browser Rubberbanding and Launch Screen?

Posted: Sun Jan 07, 2018 11:56 pm
by Mr. Kibernetik
The image which is the top toolbar is a part of the project, you can replace it to something less visible.
Or you can rename your "main.txt" to "loading..." to make it looking more logic for users :)

Re: Browser Rubberbanding and Launch Screen?

Posted: Mon Jan 08, 2018 3:05 am
by the_wesley_watkins
what about the rubberbanding effect? I've been reading up, and all I can find is to add the following code:

Code: Select all

UIScrollView* sv = nil;
for(UIView* v in myWebView.subviews) {
  if ([v isKindOfClass:[UIScrollView class] ]) {
  sv = (UIScrollView*) v;
  sv.scrollEnabled = YES;
  sv.bounces = NO;
  }
}
However, I don't know Objective-C. So I don't know where to place this.

Re: Browser Rubberbanding and Launch Screen?

Posted: Mon Jan 08, 2018 4:28 pm
by Mr. Kibernetik
the_wesley_watkins wrote:
Mon Jan 08, 2018 3:05 am
what about the rubberbanding effect?
I have no comments on it.

Re: Browser Rubberbanding and Launch Screen?

Posted: Sun Jan 14, 2018 8:35 pm
by GeorgeMcGinn
Wesley,

Last week I tested my File Compare in XCode 8.2, and it displays the non-matches in a browser. I have not seen what you are describing in my app. I am testing it in iOS 10.3. and simulating various iPads. (my iMac is an eary 2008 and was made obsolete by Apple 8 months ago, so it will not allow me to install XCode 9.2, or the High Sierra OS).

What simulators are you using? IPad? IPhone?

Next time I am in XCode, I will see where your code can be used. There are some spots where if my recollection is correct, you should be able to add that code. I am actually looking at writing a SWIFT or Objective-C, since the AV Foundation Framework is loaded by the SDK, to try and access songs from the user's iTunes account and download them to a directory or into the Clipboard before calling the smartBASIC program. That should be possible. By using the Clipboard to pass the directory name where the songs were loaded, or loading the songs directly to the Clipboard, when the SB program starts, it is available to it.

Anyway, that is another issue that will probably require similar changes to where you will need to insert that code, if it is correct and will work. But you might want to look at the UI ... BACk statements SB already uses. Maybe one of them can be used to accompish what you need.

What about using some of the UI Background with a graphic file that is the color you are expecting.
SET UI GRAPHICS BACK N$
sets graphics window background from file [n$].

OR

SET OUTPUT BACK COLOR R,G,B
sets text output window background color to value with red [r], green [g] and blue components. Valid values are from 0 to 1.


This is an example, but there are these BACK statements for TOOL_BAR, FILE, FILES, etc. Check the documentation under the

Also, what does this do, and would it help?

SET UNDERGROUND OFF
SET UNDERGROUND ON
turns OFF or turns ON program activity in background. By default is off.