NimbleKit - fast iOS app development

NKMoveToPageAnimated background color

Ask questions and share your skills here

NKMoveToPageAnimated background color

Postby iphonecoder » Sun Aug 09, 2009 9:12 pm

I am using NKMoveToPageAnimated(pageName, "FastPushRight")
The transition works well, however, there is a white background during transition.
I am using a background image and would prefer to have that image displayed during transitions. If that's difficult, I don't mind displaying a HEX color #2f2f2f during the transition. Adding the background-color to the main.html and main1.html didn't help.

Interestingly enough, the transition appears lot smoother when I gesture from right-to-left as against left-to-right

Any tips?
iphonecoder
 
Posts: 4
Joined: Sun Aug 09, 2009 8:59 pm

Re: NKMoveToPageAnimated background color

Postby jbardi » Tue Aug 11, 2009 12:33 am

There is nothing that can be done about this right now. There are many postings on here dealing with "white background", yet they all have to do with the same thing. Nimblekit does not display like a navite obj-c application does. Nimblekit uses the UIWebview, which is basically the safari browser engine. It is like making a Web App with the ability to access native controls. The white you are seeing is the default appearance of the browser when nothing is loaded into it, and that is the same on the iPhone or on any other mobile device or computer (Mac, PC, Linux, Palm, Blackberry, Windows Mobile, etc). There is nothing loaded into the browser yet, so your background image or hex color can not be seen until the browser object (which appears white) loads it into memory. White is actually a representation of "nothing" that the browser gives you rather than an actual color. White means, blank, transparent, empty, nothing there in the Browser world. It is not like Nimblekit is setting the screen to white... it just is.

Sunny is looking into a way to work around this, however, I wouldn't expect this to occur until v1.6 or later. It would most likely involve caching browser data in another Webview instance that is hidden and maybe copying the hidden instance to the active instance, or possibly something completely different. Either way, I wouldn't expect this to be fixed right away, so if you are waiting on this to submit an app, you have a tough decision to make... wait for Nimblekit to address this or submit to the App store and make the change as an update to your App when this feature is available.
User avatar
jbardi
 
Posts: 141
Joined: Fri Jul 17, 2009 8:01 am

Re: NKMoveToPageAnimated background color

Postby iphonecoder » Tue Aug 11, 2009 4:39 am

jbardi,
Thanks for the quick reply. I am using NimbleKit to get the "flick" working for my app. I have been able to get the "flick" interface working using native-app, however, I can only do horizontal flip and cannot scroll vertically.
I used http://mydailyphoto.com/blog/iphone-safari-flick-navigation/ as my code base to build the "flick" interface, but they prevent the vertical scroll using e.preventDefaults(). The author suggests some ways to get around this in the "Side Notes" section, I tried that, but it didn't help....
Basically, I am trying to emulate the WSJ app functionality, its a well-made app and I am really inspired by its cleanliness.
Let me know if you have any insights on how this can be done..... I don't mind posting my code for rest of the community once I am able to get it to work.
iphonecoder
 
Posts: 4
Joined: Sun Aug 09, 2009 8:59 pm


Return to How To...

Who is online

Users browsing this forum: Google [Bot] and 1 guest