Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 44

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
01/24/14 10:28 AM (11 years ago)

Hide screen until image(s) load - Scratch Feature plugin

Have the Scratch Feature Plugin launching from (Menu with Image) Plugin. Need a way to stop the view from appearing until both front and back images are loaded. BTM_scratchFeature.m Since MrDavid has posted the Plugin free, I am including link to the above file: https://www.dropbox.com/s/917e2szlelqtg8k/BTM_scratchFeature.m Problem: First time selected (prior to image being cached) only the bottom left of the front image is hiding the image in the background. - so image is not hidden. Environment: BTv3, BT Hosted, iPhone simulator, iOS7 Image locations: Loaded from URL Have seen this implemented in several other plugins, but not sure of what code to add. Thanks
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/26/14 11:01 AM (11 years ago)
Try searching for "Xcode add a delay" on Google. Perhaps something will pop up at you. Also, add those debug statements in that file. Understand the flow of things. Add debug statements in other files. Then you'll understand even more. Given your coding background, you will soon get comfy. -- Niraj
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
01/29/14 09:06 AM (11 years ago)
Thanks - added debug statements throughout. However after learning that back image in scratch is actually the Background image being setup in BT_background_view.m combined with the fact that different image sizes would also take different amounts of time to initially load, a timed delay approach did not seem appropriate. The good news is last night I started testing on iPhone 5c as opposed to the simulator, and did not see same issue :) So works fine there! May need to revisit when I try on a slower phone with iOS7...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.