When turning off mail / calendars from an Exchange or MobileMe account in Settings, you will see a "Turning off mail..." badge appear over all view elements while the process is occurring. The badge intercepts all touch events while it's visible.
I've seen this replicated a couple of times in other apps and was wondering if anyone had any pointers on how to create and display such a badge.
What you'll probably want to do is create a transparent UIView with your badge that spans the entire screen. This way you can catch touches anywhere on the screen and redirect them to the badge (and probably just dispose of them altogether). You can use a UIActivityIndicatorView to show progress in your badge while you process.
Related
Is it possible to block appearing of notification screen by swiping from top edge of screen on iPhone when my application is in foreground state. Doesn't this break iOS HIG rules?
You don't want to do that. (And you can't.)
There is a way to keep it from appearing immediately, however: hide the status bar. When you do this, the system will first show a little grabby thingy when the user swipes down from the top. If the user swipes again, Notification Center will show.
I was wondering wether I can hide iAds once they are tapped. This way, once the user taps on the ad, he can get rid of it. It will draw incentive to tapping on the ads to get rid of them. All I am doing different is hiding the iAd banner when the 'bannerViewDidFinish' method is called. Is this ok to do? I know that I can't get another ad displayed until the user restarts the app, but I am ok with that. Thanks for your help.
Have a look at rule 7.1 of the App Store Review Guidelines.
Apps that artificially increase the number of impressions or click-throughs of ads will be rejected
Imho "It will draw incentive to tapping on the ads to get rid of them." is covered by this rule.
[banner hide] or banner.hidden = YES under a touchesBegan mehod or put an invisible button over the ad or a no imaged uiiamgeview and implement pressed button or touched image
I want to handle touches on UIWebView same as we can handle touches on UIView.I want to use methods like touches began,touch ended,etc in this app.I have to handle multiple events on different touching events on UIWebView.
In this app I am displaying image in UIWeb View and i have to make image size large and small on double touch and when the user taps on that image the next image should appear and again if the user double taps that image it should navigate to another page and if user swipes then also next image should appear.Thus,i have to handle four events on touching UIWebView.
Please anyone tell me how to do this.I have tried many codes but nothing has helped me.I also tried by making a uiview on uiwebview but only one event happens by this other events does not.
Thanks in Advance.
For what you want to do it sounds as if you shouldn't be using a uiwebview at all. I suggest you reconsider your app's architecture: typically both touch events AND page navigation (both of which you're attempting) are handled in view controllers. Consider implementing a view controller that will handle these events.
Also, don't solicit code and ask for it hand-delivered via email. No one wants to write your code, and you won't learn anything that way anyway.
I'm developing an app which has a tab bar and a UITableView, sometimes I'll need to run a function to update the database, which takes a few seconds. However, this is only needed if they want to look at a certain screen (and the data need updating) which has a UITableView on it.
I want some advice as to how, what, when and where I should show a progress indicator.
I'm thinking that I'll need something which pops up when the table view is about to be shown ?
As I say I don't know what to use to show the progress?
Also where would it be shown, would I need a new screen which is shown before the the table view or can I use and action sheet which will be dismissed automatically ?
Would like some sample code too.
There are many options for what. You can use a UIActivityIndicator (the spinning circle) or a Progress View (thermometer style) or a UILabel with the text xx% or nothing at all. If you're connecting to the Internet to get data, you should also call [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES] to show the spinning circle in the status bar.
Where is entirely up to you. Apple's own apps have put it into toolbars (c.f. EMail), in the middle of an otherwise blank view (c.f. App Store), or in a single UITableViewCell (c.f., Settings. It shows "Loading applications..." at the bottom when the app first starts while loading Settings.bundle from all installed apps.)
How largely depends on the where and what chosen, but in all cases your DB update needs to be in a background thread so you minimize the effect on the UI. If you're using a Progress View or some numerical feedback you'll want to periodically call something like:
[myViewController performSelectorOnMainThread:#selector(updateProgress:) withObject:[NSNumber numberWithFloat:(1.0 * currentRecord / totalRecords)] waitUntilDone:NO]
I have a case where i pull information from a server. My application has both a tab bar and navigation buttons. I want the application to show a progress indicator and disable all other controls so that user can't jump around while the data is being pulled from the server. How can i achieve this?
One approach i have in mind is to show a transparent view with a progress window (much like the message alert window - which allows the user to interact with the message alert window only). I need help in implementing this approach.
Currently, when the information/data is being pulled from the server i add a UIActivityView to the subview and start animating it. But this does not restrict the user from navigating to other parts of the application.
Stephan suggested the use of UIAlertView with UIProgressView or UIActivityIndicatorView. This solution worked for me, but as discussed with some of the other members of iPhone developer community, this approach is not recommended.
The recommended approach is to use a new view and set its transparancy value to alpha 7 or 8, set it's background to black, and add UIProgressView or UIActivityIndicatorView in this view and use this new view to show progress. No hack is involved in using this technique. While, incase of adding UIActivityIndicatorView to a UIAlertView, your actually performing a non-documented operation (which is not recommended).
Thanks.
Just create an UIAlertView with no buttons, it will prevent any user interaction.
You can add an UIProgressView or UIActivityIndicatorView to your alert if you want.