The GPSs in iOS devices are not great. You can ask for updates every meter, but probably won't get that.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!
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.
Your displaySecondsRemaining code has a number of problems.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];
}