반응형

NSString* aStr = [[NSString alloc] initWithData:aData encoding:NSUTF8StringEncoding];

NSData* aData = [aStr dataUsingEncoding: NSUTF8StringEncoding];

반응형

'iOS > objective-c' 카테고리의 다른 글

반각->전각  (0) 2018.12.12
ios7 status bar hidden  (0) 2018.12.12
NSString 대문자-> 소문자, 소문자-> 대문자  (0) 2018.12.12
화면 자동 꺼짐 방지  (0) 2018.12.12
맨날 헷갈리는 nsstring substring  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

[myString lowercaseString];

 

[myString capitalizedString];

반응형

'iOS > objective-c' 카테고리의 다른 글

ios7 status bar hidden  (0) 2018.12.12
nsstring, nsdata 변환  (0) 2018.12.12
화면 자동 꺼짐 방지  (0) 2018.12.12
맨날 헷갈리는 nsstring substring  (0) 2018.12.12
앱 내부 파일 정보 보기  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

반응형

'iOS > objective-c' 카테고리의 다른 글

nsstring, nsdata 변환  (0) 2018.12.12
NSString 대문자-> 소문자, 소문자-> 대문자  (0) 2018.12.12
맨날 헷갈리는 nsstring substring  (0) 2018.12.12
앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

NSLog(@"linkURL : %@", linkURL);

//     http://www.naver.com

 

NSLog(@"linkURL substringToIndex: %@", [linkURL substringToIndex:7]);

//     http://

 

NSLog(@"linkURL substringFromIndex: %@", [linkURL substringFromIndex:7]);

//    www.naver.com

반응형

'iOS > objective-c' 카테고리의 다른 글

NSString 대문자-> 소문자, 소문자-> 대문자  (0) 2018.12.12
화면 자동 꺼짐 방지  (0) 2018.12.12
앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

 NSDictionary *attributes = [fileManager attributesOfItemAtPath:[NSString stringWithFormat:@"%@/%@", documentPath, sortArr]  error:NULL];

        

        //NSLog(@"파일 정보 : %@", [attributes objectForKey:NSFileCreationDate]);

        //NSLog(@"파일 정보 : %@", attributes);

 

위에 NSSring으로 들어간게 파일 경로 입니다.

 

위와 같이 하시면 파일의 정보를 가져올수 있습니다.

 

--맥부기 코스모스님 답변에서 발췌

반응형

'iOS > objective-c' 카테고리의 다른 글

화면 자동 꺼짐 방지  (0) 2018.12.12
맨날 헷갈리는 nsstring substring  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
푸쉬 인증서 변환(.p12 -> .pem)  (0) 2018.12.12
블로그 이미지

앱스페이스

,

ios 날짜구하기

iOS/objective-c 2018. 12. 12. 16:33
반응형

NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init];

            [outputFormatter setDateFormat:@"yyyy:MM:dd:HH:mm:SS"];

            NSString *tmpDate = nil;

            tmpDate = [outputFormatter stringFromDate:[NSDate date]];

 

 

한달뒤

NSDateComponents *components = [[[NSDateComponents alloc] init] autorelease];

components.month = 1;

NSDate *nowDate = [NSDate date];

NSDate *date = [[NSCalendar currentCalendar] dateByAddingComponents:components toDate:nowDate options:0];

 

요일, 지역

NSDateFormatter *dateFormat = [[[NSDateFormatter alloc] init] autorelease];
        [dateFormat setDateFormat:@"EEEE MMMM d, YYYY"];
        [dateFormat setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"ko_KR"] autorelease]];

 

//출력결과
//Today : 수요일 10월 6, 2010

반응형

'iOS > objective-c' 카테고리의 다른 글

맨날 헷갈리는 nsstring substring  (0) 2018.12.12
앱 내부 파일 정보 보기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
푸쉬 인증서 변환(.p12 -> .pem)  (0) 2018.12.12
ios os version  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

레이아웃 구성시

 

입력부분을 아렛쪽에 구성하였는데

 

키보드가 나타나면서 가릴때

 

init 또는 viewdidload 등에서

 

[[NSNotificationCenter defaultCenter] addObserver:self

                                                 selector:@selector(keyboardWasShown)

                                                     name:UIKeyboardWillShowNotification //키보드가 나타날 때

                                                   object:nil];

        [[NSNotificationCenter defaultCenter] addObserver:self

                                                 selector:@selector(keyboardWasDisappear)

                                                     name:UIKeyboardWillHideNotification //키보드가 사라질 때

                                                   object:nil];

 

추가

 

-(void)keyboardWasShown

{

    [UIView animateWithDuration:0.3f

                          delay:0.0f

                        options:UIViewAnimationCurveEaseIn

                     animations:^{

                         CGRect newframe = self.view.frame;

                         newframe.origin.y -=150;

                         [self.view setFrame:newframe];

                     }

                     completion:^(BOOL finished){

                     }];

}

-(void)keyboardWasDisappear

{

    [UIView animateWithDuration:0.2f

                          delay:0.0f

                        options:UIViewAnimationCurveEaseIn

                     animations:^{

                         CGRect newframe = self.view.frame;

                         newframe.origin.y +=150;

                         [self.view setFrame:newframe];

                     }

                     completion:^(BOOL finished){

                     }];

}

반응형

'iOS > objective-c' 카테고리의 다른 글

앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
푸쉬 인증서 변환(.p12 -> .pem)  (0) 2018.12.12
ios os version  (0) 2018.12.12
ios 앱 버전  (0) 2018.12.12
블로그 이미지

앱스페이스

,
반응형

1. cer, key 같이 추출한 p12 -> pem

 openssl pkcs12 -in file.p12  -out file.pem -nodes -clcerts



2. cer, key 따로 추출한 p12(cert.p12, key.p12) -> pem

2-1 cert.p12 -> cert.pem

 openssl pkcs12 –clcerts –nokeys –out cert.pem –in cert.p12


2-2 key.p12 -> key.pem

 openssl pkcs12 –nocerts –out key.pem –in key.p12


2-3 key.pem-> no encrypted key.pem

 openssl rsa –in key.pem –out key.unencrypted.pem


2-4 apns.pem

 cat cert.pem key.unencrypted.pem > apns.pem

반응형

'iOS > objective-c' 카테고리의 다른 글

앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
ios os version  (0) 2018.12.12
ios 앱 버전  (0) 2018.12.12
블로그 이미지

앱스페이스

,

ios os version

iOS/objective-c 2018. 12. 12. 16:32
반응형

[[UIDevice currentDevice] systemVersion]

반응형

'iOS > objective-c' 카테고리의 다른 글

앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
푸쉬 인증서 변환(.p12 -> .pem)  (0) 2018.12.12
ios 앱 버전  (0) 2018.12.12
블로그 이미지

앱스페이스

,

ios 앱 버전

iOS/objective-c 2018. 12. 12. 16:16
반응형

NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];

 

    NSString *majorVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];

 

    NSString *minorVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];

반응형

'iOS > objective-c' 카테고리의 다른 글

앱 내부 파일 정보 보기  (0) 2018.12.12
ios 날짜구하기  (0) 2018.12.12
ios 키보드 처리  (0) 2018.12.12
푸쉬 인증서 변환(.p12 -> .pem)  (0) 2018.12.12
ios os version  (0) 2018.12.12
블로그 이미지

앱스페이스

,