How can i add a progress bar to my UIwebview

i have a page in my application where i have a UIWebview what i want to do is have a progress bar somewhere on the screen to indicate the loading status on the page.

Go to your xib file or storyboard file, then you should see Progress view in the objects.

Similar Messages

  • How can I add a Progress bar to show the "render to JPG" progress?

    Hi everyone, I have a button which renders my component to
    JPG.
    How can I attach a progress bar to show the progress of the
    rendering?
    <mx:Button label="render" click="renderasJPEG ()"/>
    public function renderasJPEG( ):void
    convertToImage( component001, new JPEGEncoder( 100));
    private function convertToImage( object:IUICompon ent,
    encoder:IImageEncod er):void
    var base64string: String = ImageSnapshot. encodeImageAsBas
    e64(
    ImageSnapshot. captureImage( object, 72, encoder));
    var variables:URLVariab les = new URLVariables( );
    variables.encoded = base64string;
    variables.type = "jpeg";
    var request:URLRequest = new URLRequest(" script_saveasima
    ge.php");
    request.method = "POST";
    request.data = variables;
    navigateToURL( request, "_blank");
    Thanks in advance.

    Hi,
    I would have thrown a prompt to the user in the renderasJpeg
    function and removed it in last line of convertToImage function.
    Isn't this what you want?
    Hope this helps.

  • How can I use a progress bar in objective c mac

    How can I use a progress bar in objective c mac? I have a code that downloads a file and I want to be able to let the progress bar increase by 1. A bit further on the code (to download the file) it needs to increase again. And so on...
    My code
    -(IBAction) downloadButtonPressed:(id)sender;{
        //get the path to the image that we're going to download
        NSURL *url = [NSURL URLWithString:@"https://www.dropbox.com/s/l6o07m48npxknt4/Cluedo.zip?dl=1"];
        //get the path to documents folder where we're going to save our image
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *DocumentsDirectory = [paths objectAtIndex:0];
        NSString *filePath = [DocumentsDirectory stringByAppendingPathComponent:@"Cluedo.zip"];
        //Download the file to memory
        NSData *data = [NSData dataWithContentsOfURL:url];
        NSError *error = nil;
        //Save it on the Documents directory
        [data writeToFile:filePath options:NSDataWritingAtomic error:&error];
        NSFileManager* fm = [NSFileManager defaultManager];
        NSString* zipPath = filePath;
        NSString* targetFolder = @"/Applications"; //this it the parent folder
        //where your zip's content
        //goes to (must exist)
        //create a new empty folder (unzipping will fail if any
        //of the payload files already exist at the target location)
        [fm createDirectoryAtPath:targetFolder withIntermediateDirectories:NO
                       attributes:nil error:NULL];
        //now create a unzip-task
        NSArray *arguments = [NSArray arrayWithObject:zipPath];
        NSTask *unzipTask = [[NSTask alloc] init];
        [unzipTask setLaunchPath:@"/usr/bin/unzip"];
        [unzipTask setCurrentDirectoryPath:targetFolder];
        [unzipTask setArguments:arguments];
        [unzipTask launch];
        //[unzipTask waitUntilExit]; //remove this to start the task concurrently

    Your code really isn't suitable for a progress bar, not a real one anyway. Your code will spend about 99.9% of its time in the method "dataWithContentsOfURL:url". That is not a method you want to use in the real world. It is only for demos or proof of concept exercises. All network operations should be asynchronous. That gives you the ability to gracefully recover when there is a failure and also to do fancy things like display a progress bar and tell the user when the download is complete.
    Once you get the asynchronous download logic working, then you can worry about the progress bar. The first thing you will need is the size of the file. Without that, all you can ever do is an indeterminate progress bar or spinner. If you have the size of the file, then you can keep track of how much of the file you have downloaded and update your progress bar with the percentage complete. Make sure to throttle it to no more than incrementing by 1% at a time. Otherwise, a large file or a file transferred in many small chunks, would waste too much time updating the progress bar for no change.

  • How can I add the progress loading box when I load a module?

    Hi everyone, how can I add the progress loading box when I
    load a
    module? Is it an automated thing with flex or must I code it?
    Thanks.
    :)

    try using javascript onclick attribute:
    onclick="document.form.name.disabled=false"
    m

  • How can I add a color bar scale to a CW3DGraph

    I am using the CW3Dgraph control (parametric surface plot) in a LabVIEW program I have written to graph the the strength of an electromagnetic field over a sphere.  The plot color map style is set to use the "color spectrum".  I would like to add a color bar scale to the graph so the user can determine the approximate field strength by the color of the plot.  Is there an example that could help me with this, does anyone know how to add a color bar scale, or is there some other way to indicate to the user the color's level?

    I think if you search this forum you will find more than one approach to this quest.In this thread you will find an earlier discusion of the same nature that has a couple of methods you can try out.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can i Create a PROGRESSIVE BAR   while process of a procedure is going

    hi,
    I have a push button in my form that runs the procedure .the process will approx 15 minutes. while processing is started, i want to display PROGRESSIVE BAR
    until process complete and exits automatically after process . please suggest me how to create the same, is it possible..
    please send me solution as soon as possible please
    thanks in advance
    prasanth

    The forms demos contains a progress bar bean which you can use if web deployed.
    Regards
    Grant Ronald
    Forms Product Management

  • How can I add "Tools" menu bar item to firefox orange button

    After upgrading to FireFox 4 I decided to hide the menu bar, doing so I am not able to access the addons like "tamper data" which can be accessed only from the tools item of the menubar. Is there a way to customize the orange button of the firefox4 to add tools menu item?

    Thanks for pointing me to the add-on. But is there a way by which I can edit any xul file or any customize option like the customize toolbar.

  • How can i add the status bar to the bottom of iTunes 11.4?

    In the past, on Itunes 11.0, when I opened the program, there would be  a bar on top that would read, "File, Edit, View, Controls, Store,Help"  and below , a status bar that would tell me the number of tracks in  a playlist and duration, "7 Songs, 28:20 Total Time, 51 MB"
    Those controls/status bars are gone in the new 11.4 edition of iTunes.
    Any idea how to bring them back?
    many thanks!
    -- Katharine

    Use the View menu to show the status bar.
    Turn on Windows 7 and 8 iTunes menus: iTunes- Turning on iTunes menus in Windows 8 and 7.

  • How can I add the address bar that I've removed before ?

    I removed address bar from my Firefox but now I can't bring it back . when I right click on the top bars, it doesn't show any choice to bring the address bar back !
    Could you please help me ?

    * If on Windows in Firefox 3.6 the menu bar is hidden then press and hold the Alt key down, that should make the "Menu Bar" appear.
    * Go to "View > Toolbars" and put a check-mark for "Menu Bar" to make that permanent. See [[Menu bar is missing]]).
    * Make sure that you have the ''Navigation Toolbar'' and other toolbars visible: "View > Toolbars"
    * If items are missing then see if you can find them in the "View > Toolbars > Customize" window.
    * If you see the item in the Customize window then drag it back from the Customize window to the Navigation toolbar.
    * If you do not see that item then click the "Restore Default Set" button in the "View > Toolbars > Customize" window.
    See also [[Back and forward or other toolbar buttons are missing]] and [[Navigation Toolbar items]]
    See http://kb.mozillazine.org/Toolbar_customization

  • How can I add the hard drive icon to the menu bar on a MBPr

    How can I add the hard drive icon to the menu bar on a MBPr?  I have downloaded Google Earth and it wants me to drag it to the hard drive for install. I was able to display the icon but now I would like to put it on the menu bar. Is this possible? Or can I add it to the hardware section under system preferences?
    I'm a new Apple user, coming out of the dark ages of a lifetime in the PC Windows world.
    Thanks

    It's on your Desktop, is it not? You cannot put it on the menubar through OS X although you may find third-party utilities that will. If you want it on the Desktop:
    Select Preferences from the Finder's Finder menu and check the desired boxes:
    Click on the Sidebar icon in the toolbar to set what you want displayed in the Sidebar.

  • HT1339 My ipod is stuck at step 9 in this guide. Itunes told me to keep my ipod connected to itunes, and my Ipod shows the Apple logo as it should (though I can´t see any progress bar). Do anybody know how  long step 9 takes. I have turned off my firewall

    My ipod is stuck at step 9 in this guide. Itunes told me to keep my ipod connected to itunes, and my Ipod shows the Apple logo as it should (though I can´t see any progress bar). Do anybody know how  long step 9 takes. I have turned off my firewall.
    Please Help!

    If it happens again and the reset (home + power buttons) doesn't work, just let the battery drain; you'll know when the screen shuts off. Charge it back up and it should be fine. Frankly, I'm surprised this worked for you. Usually I hear people with this problem say that holding both buttons doesn't work, and they have to do the battery drain.
    If the issue is incurable next time, you have a one-year warranty from the date of purchase.

  • How can I add iCloud to my safari menu bar?

    Hello Everyone
    I upgrade my iMac to OS x Lion 10.8.2  but I cannot see the icloud in my Safari Menu bar. How can I add iCloud to my safari menu bar? Thanks.

    Look in customize toolbar for the icon and drag it to the toolbar.

  • How can I add additional submenu items to Spry Menu Bar?

    The drop down header only allows for for 2 submenus - ie. child and grandchild pages
    How can I add a third or fourth submenu - ie great grandchild and great great grandchild pages?

    Its OK! I've just found an answer:
    http://forums.adobe.com/message/1049136#1049136
    PS. I did searching before I posted - but I didn't spot this till afterward

  • How can i add new identity in file option of menu bar

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/869755''
    how can i add new identity option in file option of menu bar

    There are, but not with a DVD written as a movie disk. It must be closed when completed, or it doesn't work.
    Apple's built in Burn utility also automatically closes any data CD, DVD or Blu-ray disk you burn. Doesn't matter how much space is unused, you can't use it. You'd have to use a more advanced disk creation app, such as Toast Titanium. I then have the option of choosing to write the data as a session:
    I can keep doing this until the disk is full. If I've written five sessions to the disk, when I put it in the drive, five CD/DVD icons will appear on the desktop since the OS will treat each session as if they are separate physical disks. At any point you choose Write Disk when writing a group of data, that means you're closing the disk, and again can't add anything after that. So if I had written two sessions, and the third was Write Disk, it's over. I can't put anything else on that disk.

  • Customizing OI to add step progress bar

    Hello custom RTOI experts!  I am attempting to make a customization to the full-featured LabVIEW RTOI (for TestStand 3.0) in order to provide the seemingly simple feature of a step completion progress bar on the execution page of the tab control.  Let me explain a little behind the concept I'm going for.  There are some steps in my sequences that take a relatively long time (15 minutes or so).  During this period, a requirement of mine is to have a progress bar that gets updates every so often such that by the time the step would ordinary complete, the progress bar is at 100%.  Initial attempts involved a separate VI that managed the progress bars, but having yet another window is not the ideal UI design...  Instead, I was hoping to integrate this functionality into the RTOI so that each time a new step begins executing, additional custom data (the expected step duration) is (optionally) sent to the RTOI providing the progress update portion of the RTOI code the necessary data.
    Is there any sample code out there that performs some similar task so that I can get a better feel for how the pieces fit together?  In particular, there are a few things that are befuddling me:
    1) What is a good way to store this custom information (step duration) in the sequence file?  Should I modify the basic step types to add a new duration field which can be optionally set to something greater than the default, 0?
    2) How should the step duration get passed to the RTOI?  My current thought is to override the PreStep engine callback to send the custom duration field in a custom UIMessage, but that may be partly because I'm not familiar enough with the structure of the data is that is that is accessible via the sequence context...
    3) How do I link the progress bar data to the actual execution page that is currently being viewed.  Up to 4 executions can be running using the parallel model or the batch model in my sequences, so something would clearly need to be done so that when execution 1 is visible, the associated progress bar is shown, etc...  I'm assuming I can trap on some event when the user clicks on an execution in the list bar, but there is no similar code in the out-of-box RTOI - all that appears to be managed automatically by linking the controls to the execution manager.
    Thanks for any pointers or code samples (or even suggested reading) that anyone can give.

    Thanks for the response.
    I may indeed want to use the ProgressPercent message, but I'm not so sure just yet.  I did not want to leave the responsibility of sending UIMessages up to the VIs and other code modules called by the sequence - I was hoping for a simple solution to provide a new field (ExpectedDuration) that can be set for any given step.  In this way, the RTOI can manage updating the progress simply by counting seconds.  Perhaps there is some timer callback that can be leveraged to perform this function?
    What I have so far is as follows: I have a new step type called PassFailTestWithDuration.  It is a copy of the PassFailTest step type with the addition of a ExpectedDuration property and a new PreStep which calls the PostUIMessageEx with a custom event (10001).  The expected duration and the RunState.TestSockets.MyIndex both get passed as parameters.  Inside the RTOI, I have added a UserMessage callback VI which stores the data in the appropriate slot of a global (indexed by socket index).  (The global array is implemented as what I've heard called an action engine - there are init, read, and write actions that it can perform on data stored in the VI, and it is set as non-reentrant so that race conditions cannot occur).  Each entry in the global array has 2 fields - the expected duration, and the current elapsed time.  My idea was to continually update the current elapsed time for all active executions and simply show a progress bar for the "active" execution by displaying its elapsed time/expected duration in each necessary event...
    I think my main question now is - how do you determine the RunState.TestSocket.MyIndex of the active execution in the execution manager (or application manager)?  It seems like such an obvious thing to want to know, but I don't see it anywhere.
    Thanks again for any hints you can provide!

Maybe you are looking for

  • TS3196 i have installed windows 7 on my macbook pro with retina display but the internet won't work in Windows, please help!!

    I have the latest 13" Macbook Pro with Retina Display. I just recently installed Windows 7 through Bootcamp assistant but when I am in Windows the internet doesn't work. How can I fix this??

  • Probook 450 G1 HDD strange noise

    Hello, I've bought my probook 450 G1 less than a week ago and I've noticed that the HDD is producing annoying noise, similar to scrathing even when there is no extensive ative accessing of HDD from my side, and I believe an occasional clicking sound.

  • Why can't I downgrade my account?

    I Have been charged for storage on icloud that I am not using and I want to downgrade my account. I have followed the instructions to do this but I can't confirm it because the 'done' button is greyed out.why is this happening?

  • Change in POIT configuration

    Hi Experts, I am integrating SAP ECC with MES.I am using POIT trannsaction to transfer the production order from ECC to MES through Middleware.When I transfer the order every time the planned routing and planned BOM is also coming to MES.Since I alwa

  • GOOD book for OCJP certification

    Anyone suggest good book that i can use for ocjp 6 certification thanks Sam