Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 166/337 | < Previous Page | 162 163 164 165 166 167 168 169 170 171 172 173  | Next Page >

  • is there a way to disconnect from facebook login without calling logout

    - by Joey
    Basically, I'd like to know how I can logout of my facebook session if I am in an iphone app and have connected to facebook (such that I do not have to repeatedly enter my login/password). Normally you'd disconnect in the app somewhere like in the options, but if this is not available (i.e. anything that triggers the FBSession logout method) is there some other way to do it? I'm guessing one could restore their phone to factory settings or something.

    Read the article

  • iPhone Gps logging inaccurate

    - by Martijn
    I'm logging gps points during a walk. Below it shows the function that the coordinates are saved each 5 seconds. i Did several tests but i cannot get the right accuracy i want. (When testing the sky is clear also tests in google maps shows me that the gps signal is good). here is the code: -(void)viewDidAppear:(BOOL)animated{ if (self.locationManager == nil){ self.locationManager = [[[CLLocationManager alloc] init] autorelease]; locationManager.delegate = self; // only notify under 100 m accuracy locationManager.distanceFilter = 100.0f; locationManager.desiredAccuracy= kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; } } - start logging [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(getData) userInfo:nil repeats:YES]; </code> <code> -(void)getData{ int distance; // re-use location. if ([ [NSString stringWithFormat:@"%1.2f",previousLat] isEqualToString:@"0.00"]){ // if previous location is not available, do nothing distance = 0; }else{ CLLocation *loc1 = [[CLLocation alloc] initWithLatitude:previousLat longitude:previousLong]; CLLocation *loc2 = [[CLLocation alloc] initWithLatitude:latGlobal longitude:longGlobal]; distance = [loc1 getDistanceFrom: loc2]; } // overwrite latGlobal with new variable previousLat = latGlobal; previousLong = longGlobal; // store location and save data to database // this part goes ok } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { // track the time to get a new gps result (for gps indicator orb) lastPointTimestamp = [newLocation.timestamp copy]; // test that the horizontal accuracy does not indicate an invalid measurement if (newLocation.horizontalAccuracy < 0) return; // test the age of the location measurement to determine if the measurement is cached // don't rely on cached measurements NSTimeInterval locationAge = -[newLocation.timestamp timeIntervalSinceNow]; if (locationAge > 5.0) return; latGlobal = fabs(newLocation.coordinate.latitude); longGlobal= fabs(newLocation.coordinate.longitude); } I have taken a screenshot of the plot results (the walk takes 30 minutes) and an example of what i'am trying to acomplish: http://www.flickr.com/photos/21258341@N07/4623969014/ i really hope someone can put me in the right direction.

    Read the article

  • move data that retrieved from XML file to iPhone DataBase

    - by totato
    The idea for my project is : retrieve announcements from my website to my iPhone app (using XML file),then I want to make the users of my app can select any announcement he want and click button in ActionSheet which moves the selected announcement to "favorite announcements tableview" (have Database for favorite announcements) "as apple done in favorite contacts in phone app for iPhone ". So, I want to copy some of this data to specific database in my app (and display in tableview) , can I do this? how? any hints? thanks..

    Read the article

  • How to Invoke iPhone Maps for Directions with Current Location as Start Address

    - by eriaac
    Hi all. I know it's possible to start the iPhone maps application by calling openURL on a google maps URL with parameters saddr and daddr with location strings or LatLong (see ex. below), but I'm wondering if it's possible to make the start address be the "Current Location" maps bookmark so that I can use the maps app's location handling code. My Google search has been pretty fruitless. ex: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@", myLatLong, latlong]]]; Except with something to invoke the current location bookmark in place of myLatLong. Thanks!

    Read the article

  • Android Load Camera image as Bitmap

    - by GuyNoir
    I am using BitmapFactory.decodeFile to load Bitmaps of images into my application. However, the function returns null on large images (such as those from the camera). The filepath is definitely correct, I just can't figure out why it would return null. I tried supersampling, but it didn't seem to help. Does anyone have any idea why it would do this or how I could more easily load images taken from the camera into a Bitmap? Thanks.

    Read the article

  • editButtonItem set but no minus buttons?

    - by QAD
    My edit button is placed in viewDidLoad: self.navigationItem.rightBarButtonItem = self.editButtonItem; It shows up correctly on the nav bar, and tapping this button indeed change it to Done. However, no minus buttons show up in my table rows. Swiping a row, then tap Delete works, though. Any ideas? EDIT 1: Here's how I'm doing: - (void)loadView { tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; tableView.delegate = self; tableView.dataSource = self; tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.view = tableView; } EDIT 2: My observation is that the edit and minus buttons display fine if my tableview is created in IB (RootViewController). The other two (or three) tableview are created by the aforemention code, so that might be the problem. Guess I'd have to dive in to isEditing, editing and whatnot.

    Read the article

  • Using system Sound to play sounds

    - by Shoaibi
    Here is the code: -(void)stop { NSLog(@"Disposing Sounds"); AudioServicesDisposeSystemSoundID (soundID); //AudioServicesRemoveSystemSoundCompletion (soundID); } static void completionCallback (SystemSoundID mySSID, void* myself) { NSLog(@"completion Callback"); } - (void) playall: (id) sender { [self stop]; AudioServicesAddSystemSoundCompletion (soundID,NULL,NULL, completionCallback, (void*) self); OSStatus err = kAudioServicesNoError; NSString *aiffPath = [[NSBundle mainBundle] pathForResource:@"slide1" ofType:@"m4a"]; NSURL *aiffURL = [NSURL fileURLWithPath:aiffPath]; err = AudioServicesCreateSystemSoundID((CFURLRef) aiffURL, &soundID); AudioServicesPlaySystemSound (soundID); NSLog(@"Done Playing"); } Output: Disposing Sounds Done Playing In actual no sound gets play at all and completion call back isn't called as well. Any idea what could be wrong here? I want to stop any previous sound before playing current.

    Read the article

  • Easier way to add lots of images to an array

    - by Sam Jarman
    Hey Guys In an effort to 'clean up' my code - I was wondering if this could be made simpler. I have 32 images and I was adding them like this [theCarPics addObject:[UIImage imageNamed:@"1.jpg"]]; [theCarPics addObject:[UIImage imageNamed:@"2.jpg"]]; //... [theCarPics addObject:[UIImage imageNamed:@"32.jpg"]]; is there a simpler way? loop perhaps? Any ideas would be appreciated guys Thanks Sam

    Read the article

  • vs2010 wpf c#: how to get friends list from facebook? (Desktop application)

    - by Ash
    As per this link code from stack overflow i have try this code for getting friendslist but after login i got this error "requires valid signature" string APIKey = ConfigurationManager.AppSettings["API_Key"]; string APISecret = ConfigurationManager.AppSettings["API_Secret"]; Facebook.Session.ConnectSession connectsession = new Facebook.Session.ConnectSession(APIKey, APISecret); Facebook.Rest.Api api = new Facebook.Rest.Api(connectsession); var friends = api.Friends.GetLists(); foreach (var friend in friends) { System.Console.WriteLine(friend.name); } guide me to find out the solution Thanks ash

    Read the article

  • Issues declaring already existing NSMutableArray in new class

    - by Graeme
    I have a class (DataImporter) which has the code to download an RSS feed. I also have a view and separate class (TableView) which displays the data in a UITableView and starts the parsing process, storing parsed information in an NSMutableArray (items) which is located in the (TableView) subclass. Now I wish to add a UIMapView which displays the items in the (items) NSMutableArray. Herein lies the issue - I need to somehow get the data from the (items) NSMutableArray into the new (mapView) subclass which I'm struggling with - and I preferably don't want to have to create a new class to download the data again for the mapView class when it already is in the applications memory. Is there a way I can transfer the information from the NSMutableArray (items) class to the (mapView) class (i.e. how do I declare the NSMutableArray in the (mapView) class)? Here's a overview of how the system works: App opened Data downloaded (using DataImporter class) when (TableView) viewDidLoad runs Data stored in NSMutableArray accessible by the (TableView) class And from here I need to access and declare the array from a new (mapView) class. Any help greatly appreciated, thanks. Code for viewDidLoad MapKit: Data *data = nil; NSString *ilocation = [data locations]; NSString *ilocation2 = @"New Zealand"; NSString *inewlString; inewlString = [ilocation stringByAppendingString:ilocation2]; NSLog(@"inewlString=%@",inewlString); if(forwardGeocoder == nil) { forwardGeocoder = [[BSForwardGeocoder alloc] initWithDelegate:self]; } // Forward geocode! [forwardGeocoder findLocation: inewlString]; Code for parsing data into original NSMutable Array: - (void)beginParsing { NSLog(@"Parsing has begun"); //self.navigationItem.rightBarButtonItem.enabled = NO; // Allocate the array for song storage, or empty the results of previous parses if (incidents == nil) { NSLog(@"Grabbing array"); self.datas = [NSMutableArray array]; } else { [datas removeAllObjects]; [self.tableView reloadData]; } // Create the parser, set its delegate, and start it. self.parser = [[DataImporter alloc] init]; parser.delegate = self; [parser start]; }

    Read the article

  • iPhone application not running with Distribution Certificate

    - by MN
    I have a problem regarding running my application with a Distribution certificate. The application will work fine with a Development certificate on my iPod Touch. Once I change the Code Signing Identity to a Distribution certificate and specify an Entitlements file, the application crashes on launch. Is there anything I can do to correct this? Thanks in advance!

    Read the article

  • Real world goods in iPhone app?

    - by Moshe
    I've seen questions asked here before, but they do not address the issue. That said: "In App Purchases" specifically may not be real world goods or services, according to Apple. What services allow integration with iPhone apps so that I can use ObjectiveC to sell things in an iPhone app?

    Read the article

  • NSFetchedResultsController deallocated instance

    - by Jesse Armand
    Anyone ever encountered this ? -[NSFetchedResultsController _restoreCachedSectionInfo]: message sent to deallocated instance While performing fetch with performFetch: using NSFetchedResultsController instance. I'm sure the NSFetchedResultsController is retained before performing the fetch.

    Read the article

  • iPad Orientation Lock Notification?

    - by vakio
    Is there a way to receive a notification when the iPad gets locked? When the lock is set on or off, it does send a receivedRotate: notification, but I need a way to be able to distinguish normal rotations from lock "rotations". The problem is I am rotating things in my view when the rotation changes. When the lock is activated, the iPad sends a receivedRotate: with UIInterfaceOrientationPortrait. I've looked in UIDevice for something like isOrientationLocked, but with no success. Thanks for any clues on this.

    Read the article

  • Can someone please explain to me the basic function of Intents in the Android OS?

    - by K-RAN
    I'm new to programming applications for the Android OS. As far as general architecture of the OS goes, I understand that processes are implemented as Linux processes and that each one is sandboxed. However, I'm utterly confused on the IPCs and syscalls (if any) used. I know that the IBinder is a form of this; parcels are sent back and forth between processes and Bundles are array forms of parcels (?). But even that is still unfamiliar to me. Same with Intents. All in all, I don't understand what kinds of IPCs are implemented and how. Could someone briefly explain to me the specific methods used by user level applications in Android OS to communicate with each other and the OS? I've done kernel programming and played with various IPCs in Linux (Ubuntu and Debian) so it would help immensely if this was all explained in relation to what I'm familiar with... Thanks in advance!

    Read the article

  • UILabel not changing when method called

    - by LyonJTill
    - (IBAction)restoreUserDefaults { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if([defaults objectForKey:@"Exam Name"] == nil) { examName = [[NSString alloc] initWithString:@"Name"]; } else { examName = [[NSString alloc] initWithString:[defaults objectForKey:@"Exam Name"]]; } [examNameLabel setText:[NSString stringWithFormat:@"%@",examName]]; } Hey all, Basically above is the method that is being called when one ViewController is being close and another is being opened the problem is, is that the UILabel in the new ViewController isn't changing to the value i need it to? Any ideas? Regards Lyon J Till

    Read the article

  • iPhone table header lables not showing up in Release build but show up OK in Debug build

    - by Robert
    My table header shows up ok with Release build or Debug build for the iPhone simulator, but the header labels only show up with debug build on the iPhone. No header labels show up on the iPhone for release build. Any ideas? Thanks, Robert My code for the header is below - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)sectionNum { @try { // create the parent view that will hold header Label UIView* customView = [[[UIView alloc] initWithFrame:CGRectMake(HEADER_RELX_OFFSET, HEADER_RELY_OFFSET, HEADER_ROW_WIDTH, HEADER_HEIGHT)] autorelease]; UILabel* headerLabel = [[UILabel alloc] initWithFrame:CGRectZero]; headerLabel.backgroundColor = [UIColor clearColor]; headerLabel.opaque = NO; headerLabel.numberOfLines = 0; headerLabel.textColor = [UIColor blackColor]; headerLabel.highlightedTextColor = [UIColor whiteColor]; headerLabel.font = [UIFont boldSystemFontOfSize:HEADER_FONT_SIZE]; headerLabel.textAlignment = UITextAlignmentCenter; headerLabel.lineBreakMode = UILineBreakModeWordWrap; headerLabel.frame = CGRectMake(HEADER_RELX_OFFSET, HEADER_RELY_OFFSET, HEADER_ROW_WIDTH, HEADER_HEIGHT); if(sectionNum == 0) headerLabel.text = @"My Label"; else headerLabel.text = @""; [customView addSubview:headerLabel]; return customView; @catch (NSException* exception) { NSLog(@"viewForHeaderInSection: %@: %@",[exception name],[exception reason]); } }

    Read the article

  • Sliding finger UIImageView

    - by NextRev
    How do you detect when you slide your finger across a UIImageView? Say for example you slide your finger across it and it changes color or something. I want to be able to slide across multiple UIImageViews and have something happen...

    Read the article

  • [iPhone] How to order an array

    - by Fabrizio
    Hi all, I got an array in my app and I need to order by one of its key. Basically what the app does is taking latitude and longitude somewhere, calculate the distance from my actual position and create an array containing a key called "distance". I'm using myArray sortUsingDescriptors: [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"distance" ascending:YES] autorelease]]]; I'm not sure it's working, I mean the first results are ordered but then it shows distance closer to the previous, as example: 0.8 km 1.6 km 1.9 km 10053.9 km 1098.0 km 2372.0 km 470.5 km Any suggestion? I thank you in advance for any kind of help. Fabrizio

    Read the article

  • IndexOutofRangeException while using WriteLine in nested Parallel.For loops

    - by Umar Asif
    I am trying to write kinect depth data to a text file using nested Parallel.For loops with the following code. However, it gives IndexOutofRangeException. The code works perfect if using simple for loops but it hangs the UI since the depth format is set to 640x480 causing the loops to write 307200 lines in the text file at 30fps. Therefore, I switched to Parallel. For scheme. If I omit the writeLine command from the nested loops, the code works fine, which indicates that the IndexOutofRangeException is arising at the writeline command. I do not know how to troubleshoot this. Please advise. Any better workarounds to avoid UI freezing? Thanks. using (DepthImageFrame depthImageframe = d.OpenDepthImageFrame()) { if (depthImageframe == null) return; depthImageframe.CopyPixelDataTo(depthPixelData); swDepth = new StreamWriter(@"E:\depthData.txt", false); int i = 0; Parallel.For(0, depthImageframe.Width, delegate(int x) { Parallel.For(0, depthImageframe.Height, delegate(int y) { p[i] = sensor.MapDepthToSkeletonPoint(depthImageframe.Format, x, y, depthPixelData[x + depthImageframe.Width * y]); swDepth.WriteLine(i + "," + p[k].X + "," + p[k].Y + "," + p[k].Z); i++; }); }); swDepth.Close(); } }

    Read the article

< Previous Page | 162 163 164 165 166 167 168 169 170 171 172 173  | Next Page >