IPhone open Settings App

posted on 17 Nov 2011 19:58 by pongthorn  in IPhone
example url 
prefs:root=General
prefs
:root=General&path=Network

example Code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]]
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Network"]]

IPhone How to open other application

posted on 24 Oct 2011 12:56 by pongthorn  in IPhone
วิธีการเปิด application อื่น 
 
http://applookup.com/

edit @ 17 Nov 2011 19:56:31 by PONGTHORN

IPhone + Twitter

posted on 23 Oct 2011 17:13 by pongthorn  in IPhone
วิธีการ  set libxml2.dylib
 
Project Setting ค้นหา "Header Search Paths" 
 
แก้ไขเป็น $(SDKROOT)/usr/include/libxml2
 
Source:
http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html

#pragma mark -

#pragma mark Current Location

 

- (void) locationManager: (CLLocationManager *) manager

     didUpdateToLocation: (CLLocation *) newLocation

            fromLocation: (CLLocation *) oldLocation{

    //Calculate speed

    CLLocationDistance distance;

    NSTimeInterval timeElapsed;

    

    //calculate distance and time elapsed only if we save old location

    if(oldLocation != nil) {

        distance = [newLocation distanceFromLocation:oldLocation];

        timeElapsed = [newLocation.timestamp timeIntervalSinceDate:oldLocation.timestamp];

    }

    else{

        distance = 0.0;

        timeElapsed = 1.0;

    }

    

    //Convert meter to km/h

    double Speed = ((distance*0.001)/timeElapsed)*3600;

    NSLog(@"Speed: %f", Speed);

    

    speedLabel.text = [NSString stringWithFormat:@"%f", Speed];

    

    //save the latest newLocation for calculating the speed

    oldLocation = [newLocation retain];    

}

edit @ 8 Oct 2011 20:01:26 by PONGTHORN

How to uninstall xcode

posted on 23 Jul 2011 19:36 by pongthorn
sudo /Developer/Library/uninstall-devtools --mode=all

edit @ 23 Jul 2011 19:37:14 by PONGTHORN