본문 바로가기

분류 전체보기

NSDate 대해서 1. 현재 시간 가져오기NSDate * date = [NSDate new]; date에는 현재시간, 날짜가 들어있다. 2. 원하는 NSString으로 가져오기 NSDate * date = [NSDate new]; NSDateFormatter * forMatter = [NSDateFormatter new]; [forMatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"]; NSString *dateStr = [forMatter stringFromDate:date]; dateStr은 2015-05-06 20:43:30.000 이런식으로 나올것이다중간중간에 원하는 문자를 넣고싶으면 포멧형식사이에 '문자'를넣으면된다. [forMatter setDateFormat:@"yyyy-MM-..
apple mapKit 사용방(구글이 안해주는 길찾기기능 포함) 1. 사용되는 프레임워크 - MapKit.framework - CoreLocation.framework 2. 위치정보 사용은 첫번째 글 참고하세요^^ 3. 지도 사용하는 방법 MKMapView * mapView; MKCoordinateRegion region; CLLocationDegrees lat; CLLocationDegrees lon; if(_mapView ==nil){ _mapView = [[MKMapView alloc]initWithFrame:self.mainContentView.bounds]; } [_mapView setMapType:MKMapTypeStandard]; [_mapView setZoomEnabled:YES]; [_mapView setScrollEnabled:YES]; _mapVi..
iBeacon api 사용법 1. 사용되는 프레임워크 - CoreBluetooth.framework - CoreLocation.framework 2. 비콘수신을 위한 준비 - iOS8버전이후에는 위치정보 사용하는 방법이 2가지로 되었다. 프로젝트 info에 NSLocationWhenInUseUsageDescription/NSLocationAlwaysUsageDescription 키를 등록해야한다 NSLocationWhenInUseUsageDescription은 앱을 실행중에만 사용하겠다 즉 앱이 active상태일때만 위치정보를 사용한다는 것이다. NSLocationAlwaysUsageDescription은 항상 사용하겠다는 것이다. if(_locationManager == nil){ _locationManager = [[CLLoca..