Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Badges

Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Duncan C

About

Username
Duncan C
Joined
Visits
2,456
Last Active
Roles
Tutorial Authors, Registered Users
Points
375
Badges
18
Posts
8,013
Location
Northern Virginia
  • Hide Button On Landscape

    You WANT to hide the button when you go to landscape orientation?

    I'd have to fiddle with it to be sure.

    I would start out by implementing the willRotateToInterfaceOrientation:duration: method.

    In that method, check to see if the new orientation is landscape. If so, hide your button. However, for iPad you may start out in landscape mode,

    Furthermore, if the user brings up your VC in portrait, pushes another VC, switches to landscape, then switches back, you might appear in landscape the second time without a call to willRotateToInterfaceOrientation:duration.

    Thus you might also need an orientation check in viewWillAppear:


    P.S. A very hack-ish way to do this would be to put the button near the bottom of the screen in portrait, anchored to the top of the screen. When the user rotates to landscape, the button would keep it's position relative to the top of the screen, and thus be off the bottom of the screen in landscape mode. Not elegant, but it would probably work.
    Meva
  • Get every location update from GPS

    Dunno. I'd have to run tests just like you would. I remember getting updates around every 3 meters, but that was on iOS 3.2, on iPhone 3G and 3Gs devices.
    IMpossible
  • Get every location update from GPS

    I am new to iOS. I am making one app using GPS location update. I am fetching current location and update location to server. I want to get every change in meter and update it to server. Here is the code i am using:
    locationManager = [[CLLocationManager alloc] init] ;
    locationManager.delegate = self; // send loc updates to myself
    locationManager.distanceFilter = 1.0f; // whenever we move
    locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    [locationManager startUpdatingLocation];

    But the location is not updating after every meter. It updates but not regularly. It updates about 7 to 10 meters and it is also not regurely.

    Thanks for Help!
    The GPSs in iOS devices are not great. You can ask for updates every meter, but probably won't get that.

    The kCLLocationAccuracyBestForNavigation would be worth trying, but it sounds like it will drain the user's battery quickly.
    IMpossible
  • Just Started Developing... HELP?!

    I contacted the creator of I <3 Threadless app and they told me that what holds the images is UiCollectionViewController. What i would like to know is how to make app content (images) editable without pushing a new version of the application. </blockquote> You really need to provide better descriptions of what you are trying to do. You still didn't answer my first round of questions, and already you are off asking for other poorly-described features.

    So you want the user to be able to store a collection of images and manipulate it? Then save your images to the documents directory. You can either use the file manager to get a catalog of the image files in the directory, or save a list of pathnames/URLS in user defaults. Write your collection view to present the files, and when the user manipulates the files, reorder your array of pathnames. How exactly that would work will depend on what you are trying to do.


    Sorry again..
    I would like to make an app that displays animated Gifs. Users can submit gifs but i would be the one that uploads them to the actual application.

    I was able to make the images scroll-able via the UICollectionViewController.
    What i mean when i say scroll-able: If you use instagram, you can scroll through the images (up and down) another example is with VINE.

    In addition i want to make the content of the application (the Gifs) updatable. I would like to be able to add more without the user having to download an update. To do this i know i needs to run over the internet but not sure how?

    Several things.

    First, iOS does not include direct support for animated GIFs. I did some searching and found several third party libraries that load and display animated GIFs. I'm using one called OLImageView that I found on github. It's quite good.

    Next, downloading images.

    You cannot change an application's bundle. That is read-only.

    In order to add new content, you would need to store it in the app's documents directory.

    I would suggest setting up your app so it has an "installed" flag stored in user defaults. If installed is false, copy the images that ship with the app out of the bundle and into documents. Then set the installed flag to true.

    Then teach your app to go to your server and check for additional images. You might want to use a "most recent content update" timestamp that you also save to user defaults. When you post new content to your server, change the timestamp.

    Then have your app ask the server for the update timestamp. If the server's timestamp is more recent, request files that were added to the server since the last update.

    There would be a fair amount of work involved in the server interaction, and it's beyond the scope of a forum post to explain it all in enough detail for a newbie. You will have to do your own research.
    TacoZone
  • NSTimer doesn't countdown

    I got some code that is supposed to countdown. It worked before then i re-wrote the code so it count in minutes and seconds also.
    So heres what happen when you type in (for example 71 and press start:
    (on start): 71
    (1sec after start): 1:11
    (2sec after start): 0:00
    So, here's the code (except the buttons and that)

    -(IBAction) begin;
    {
    remainingSeconds = [display.text intValue];
    if (remainingSeconds > 0)
    {
    tid.text = [NSString stringWithFormat: @"%d", remainingSeconds];
    [NSTimer scheduledTimerWithTimeInterval: 1.0
    target: self
    selector: @selector(displaySecondsRemaining:)
    userInfo: nil
    repeats: YES];
    }
    }

    - (void) displaySecondsRemaining:(NSTimer*) timer;
    {
    remainingSeconds--;
    int seconds = [tid.text intValue] % 60;
    int minutes = ([tid.text intValue] / 60) % 60;
    tid.text = [NSString stringWithFormat:@"%2d:%02d", minutes, seconds];
    if (remainingSeconds <= 0)<br /> [timer invalidate];
    }
    Your displaySecondsRemaining code has a number of problems.

    You should not be doing math on the contents of the text field. You should use remainingSeconds.

    Set seconds to remainingSeconds%60 , and minutes to remainingSeconds/60. Then use those values to build your display text.
    EmilioGaines