[Just Wondering] NSTimer and UIProgressView

Discussion in 'iOS Development' started by cocotutch, Jul 23, 2009.

  1. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    Ok, here, I think its a bit of a bug.

    I have a timer that fires when my 4:18min long Audio Track starts playing in the iPhone SDK, and I want the Progress View to reflect the track progress.

    I have done it through a timer which has a 1 sec interval, but how can I set the maximum value of the UIProgressView? I tired "progress.maximumValue = 258.0" but it didn't work, and the Documentation won't load since I'm capped on my internet speeds and I haven't downloaded them yet.

    Any help here? Or am I just being ridiculously stupid, and that its easier than AppleScript to do this?

    cocotutch
  2. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    UIProgressView hasn’t got a maximumValue property.....
  3. bones237

    bones237 New Member

    Joined:
    Feb 17, 2008
    Messages:
    101
    Likes Received:
    7
    Device:
    iPhone 3G (White)
    your increments for the progress view have to be from 0.0f to 1.0f......
    0.0f being an empty progress bar.....1.0f being a full progress bar
  4. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    Don't worry, I figured the whole affair out with a UISlider. Now I just need to find why I get Warnings everytime I write a value for a BOOL, for example:

    isFlipped == YES
    --WARNING: Comparison Makes Pointer From Integer Without a Cast

    isFlipped == YES
    --WARNING: Comparison Between Pointer and Integer.

    isFlipped = NO
    --Fine.


    WHAT THE?

    Please Register or Log in to view images

  5. bones237

    bones237 New Member

    Joined:
    Feb 17, 2008
    Messages:
    101
    Likes Received:
    7
    Device:
    iPhone 3G (White)
    You aren't writing a value to isFlipped with these statements....you are comparing...
    == (2 equals) comparison
    = (1 equals) assigning (setting)

    [objc]
    isFlipped = YES; //assignment

    if(isFlipped == YES) // comparing
    [/objc]
  6. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    Thanks, that explained a lot, now all the BOOL setting stuff actually works

    Please Register or Log in to view images

Share This Page