안드로이드에 포스팅되어있는 md5 알고리즘과 동일하게 작동되는 코드입니다. + (NSString *) md5:(NSString *) input { const char *cStr = [input UTF8String]; unsigned char digest[CC_MD5_DIGEST_LENGTH]; CC_MD5( cStr, (CC_LONG)strlen(cStr), digest ); // This is the md5 call NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2]; for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) [output appendFormat:@"%02x..
objc 에서 콜백함수에 대한 이벤트리스너를 만드려면 1. block(^) 2. selector 3. noti 4. delegate 가 있다고 한다. 현재 상황에서 나에게 필요한건 block 이었기 때문에 혹시 필요하신 분들을 위해 샘플코드를 제공합니다. @implementation -(void)doSomething:(void (^)(BOOL, int))completionBlock { NSLog(@"Do Something first"); completionBlock(YES, 1); completionBlock(NO, 2); NSLog(@"Then may be something else"); } - (void)viewDidLoad { [super viewDidLoad]; // Do any additiona..
자주 까먹는 이슈 ios10 부터 지원하려고 하면 겪는 문제. ios13부터는 window 프로퍼티가 기본 내장되있는듯 하다 [Application] The app delegate must implement the window property if it wants to use a main storyboard file.ios10을 지원하려면 AppDelegate.h 에 추가해주면 된다 같은 내용의 자료가 많아서 포스팅하지 않으려 했으나 은근히 까먹기 때문에 작성함. #import @interface AppDelegate : UIResponder @property (nonatomic, strong) UIWindow * window; @end
pod install 시 이 로그를 봤다면 [!] Could not automatically select an Xcode project. Specify one in your Podfile like so: project 'path/to/Project.xcodeproj'타겟에는 워크스페이스를 프로젝트에는 인스톨하고자 하는 프로젝트명의 경로를 추가해준다. source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' target 'SampleSDK' do project 'SampleSDK/SampleSDK.xcodeproj' pod 'AFNetworking', &#..
딕셔너리에 string int long 등이 있을때 element 타입체크하기. for(NSString *key in mDict) { id value = [mDict objectForKey:key]; if([value isKindOfClass:[NSString class]]) { NSString *temp = (NSString*)value; NSLog(@"%@",temp); } else if([value isKindOfClass:[NSNumber class]]) { NSNumber *numTemp = (NSNumber*)value; NSString *strTemp = [numTemp stringValue]; NSLog(@"%@",strTemp); } }
- Total
- Today
- Yesterday
- countryName
- Locale.getDefault().getLanguage()
- DeviceModel
- abs
- dialog
- convert nsurl to nsstring
- ioutil
- permissionCheck
- iTunes Store에 연결할 수 없음
- setCancelable vs setCanceledOnTouchOutside
- LanguageCode
- 퍼미션체크
- abs 함수
- nsurl 에서 nsstring 변환
- java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line
- tempfile
- Golang
- 절대값함수
- Error Domain=SKErrorDomain Code=0
- tempdir
- NSUserDefaults 예제
- nsurl to nsstring convert
- countryCode
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |