2013. 3. 22. 14:09 아이폰



원본 출처


한글 -> utf8 -> 한글 


    // 오리지널 메시지

    NSString *original = @"아이폰)";

    

    // URL Encode

    NSString *escaped = [original stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    NSLog(@"escaped string :\n%@", escaped);

    

    // URL Decode

    NSString *decoded = [escaped stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    NSLog(@"decoded string :\n%@", decoded);



한참 찾았네 ....

posted by 욱이다
2013. 3. 22. 09:53 아이폰


        NSArray *arr1 = [[NSArray alloc]initWithObjects:@"1111",@"key1",@"2222",@"key2", nil];


    

        NSArray *arr2 = [[NSArray alloc]initWithObjects:@"333333",@"key1",@"44444",@"key2", nil];

        

        

        arr1 =[arr1 arrayByAddingObjectsFromArray:arr2];

        

        

        NSLog(@"%@",arr1);

        




2013-03-22 09:52:07.662 TestNavi[12841:11303] (

    1111,

    key1,

    2222,

    key2,

    333333,

    key1,

    44444,

    key2

)


posted by 욱이다
2013. 3. 12. 09:57 아이폰


ELCImagePickerController-master.zip

https://github.com/elc/ELCImagePickerController


작성자 블로그

http://www.icodeblog.com/?s=ELCImagePickerController

'아이폰' 카테고리의 다른 글

NSString encoding decoding  (0) 2013.03.22
Ios NSArray 에 NSArray 더하기  (0) 2013.03.22
ios 화면 전환 종류  (0) 2013.02.28
in app purchase 영수증 확인  (0) 2013.02.18
xcode 4.2 for snow leopard download  (0) 2013.01.02
posted by 욱이다
2013. 2. 28. 10:09 아이폰

 [UIView transitionWithView:self.view duration:0.5 options: UIViewAnimationOptionTransitionFlipFromBottom animations:^{

        [self.view bringSubviewToFront:nextView];


    } completion:nil];





세로 중앙 축을 중심으로 회전문 돌듯이 화면 전환 

    UIViewAnimationOptionTransitionFlipFromLeft 

    UIViewAnimationOptionTransitionFlipFromRight

종이 넘기는 화면전환

    UIViewAnimationOptionTransitionCurlUp    

    UIViewAnimationOptionTransitionCurlDown

점점 선명해지는 화면 전환

    UIViewAnimationOptionTransitionCrossDissolve

가로 중앙 축을 중심으로 돌면선 화면회전

    UIViewAnimationOptionTransitionFlipFromTop  

    UIViewAnimationOptionTransitionFlipFromBottom 


posted by 욱이다
2013. 2. 18. 13:48 아이폰

TouchJSON-master.zip


   

        NSError* error = nil;

        NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys: @"앱 구입후 영수증 번호 " ,@"receipt-data",

                              @"자신의 비밀번호",@"password",nil];

        NSData* jsonData = [[CJSONSerializer serializer] serializeObject:dict error:&error];

        

        NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:

//                                                                                                       @"https://buy.itunes.apple.com/verifyReceipt"

                                                                                                       @"https://sandbox.itunes.apple.com/verifyReceipt"

                                                                                                       ]]] autorelease];

        [request setHTTPMethod:@"POST"];

        [request setHTTPBody:jsonData];

        NSData* responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];

        

        NSDictionary* jsonDict = [[CJSONDeserializer deserializer] deserializeAsDictionary:responseData error:nil];

        //     return [[jsonDict objectForKey:@"status"] integerValue] == 0;

        

        NSLog(@"jsonDict %@",jsonDict);






//결과에 따른 내용 

http://blog.shoguniphicus.com/2012/03/05/storekit-in-app-purchase/

posted by 욱이다
2013. 1. 2. 22:37 아이폰
ㅠㅠ

애플에서 재공하는 여러버젼의 설치 데이터 ㅠㅠ 


https://developer.apple.com/downloads/index.action



lion깔면 이 맥북이 못버텨~



posted by 욱이다
2012. 11. 29. 14:02 아이폰

NSDictionary *dic1 = [[NSDictionary alloc]initWithObjectsAndKeys:

[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key1",@"value2",@"key2"nil];       

NSDictionary *dic2 = [[NSDictionary alloc]initWithObjectsAndKeys:

[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key1"@"value2",@"key2",nil];

dict = [dic1 isEqualToDictionary:dic2];

fdict = 1의 값

        

 NSDictionary *dic1 = [[NSDictionary alloc]initWithObjectsAndKeys:

[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key1",@"value2",@"key2", nil];       

NSDictionary *dic2 = [[NSDictionary alloc]initWithObjectsAndKeys:

@"value2",@"key2",[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key1", nil];

dict = [dic1 isEqualToDictionary:dic2];

fdict = 1의 값



NSDictionary *dic1 = [[NSDictionary alloc]initWithObjectsAndKeys:

[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key2",@"value2",@"key1"nil];       

NSDictionary *dic2 = [[NSDictionary alloc]initWithObjectsAndKeys:

[NSMutableArray arrayWithObjects:@"1",@"2",nil],@"key1"@"value2",@"key2",nil];

dict = [dic1 isEqualToDictionary:dic2];

fdict = 0의 값



        

NSMutableArray *arr1 = [[NSMutableArray alloc]initWithObjects:@"1",@"2", nil];

NSMutableArray *arr2 = [[NSMutableArray alloc]initWithObjects:@"1",@"2", nil];

fdict = [arr1 isEqualToArray:arr2];

fdict = 1의 값


NSMutableArray *arr1 = [[NSMutableArray alloc]initWithObjects:@"2",@"1"nil];

NSMutableArray *arr2 = [[NSMutableArray alloc]initWithObjects:@"1",@"2"nil];

fdict = [arr1 isEqualToArray:arr2];

fdict = 0의 값





정렬

구조

NSMutableArray * xmlParseDataGroupList

{

     NSMutableDictionary

    {

key=@"GN"

value=@"1111"

}

NSMutableDictionary

{

key=@"GN"

value=@"1112";

}

NSMutableDictionary

{

key=@"GN"

value=@"1113"

}

}



 NSSortDescriptor *nameSort = [[NSSortDescriptor alloc] initWithKey:@"GN" ascending:YES];

[ xmlParseDataGroupList sortUsingDescriptors: [ NSArray arrayWithObject: nameSort ] ];

[ nameSort release ];

posted by 욱이다
2012. 11. 14. 11:05 아이폰

안드로이드 커스텀 폰트 사용

적용한 프로젝트 파일

아카이브.zip


Tw Cen MT Condensed.TTF폰트 정보 파일을 리소스로 추가




Fonts provided by application 추가 해서 아이템에 Tw Cen MT condensed.TTF입력





- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil

{

    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];

    if (self) {

        // Custom initialization

//이건 나의 폰트 종류를 알아낸다 

        NSArray* tempFonts = [UIFont familyNames];

        for(NSString* aFont in tempFonts)

            NSLog(aFont);

        

        

        UILabel *lb = [[UILabel alloc]initWithFrame:CGRectMake(0, 100, 100, 100)];

        [lb setText:@"123123"];

//폰트 적용하는 곳 

        [lb setFont:[UIFont fontWithName:@"Tw Cen MT Condensed" size:34]];

        [lb setTextColor:[UIColor redColor]];

        [self.view addSubview:lb];

        [lb release];

    }

    return self;

}


NSLog로 찍어본 내폰트 종류 


2012-11-14 10:56:58.875 FontTest[4391:11303] Thonburi

2012-11-14 10:56:58.876 FontTest[4391:11303] Snell Roundhand

2012-11-14 10:56:58.876 FontTest[4391:11303] Academy Engraved LET

2012-11-14 10:56:58.877 FontTest[4391:11303] Avenir

2012-11-14 10:56:58.877 FontTest[4391:11303] Marker Felt

2012-11-14 10:56:58.877 FontTest[4391:11303] Geeza Pro

2012-11-14 10:56:58.877 FontTest[4391:11303] Arial Rounded MT Bold

2012-11-14 10:56:58.877 FontTest[4391:11303] Trebuchet MS

2012-11-14 10:56:58.877 FontTest[4391:11303] Arial

2012-11-14 10:56:58.877 FontTest[4391:11303] Marion

2012-11-14 10:56:58.878 FontTest[4391:11303] Gurmukhi MN

2012-11-14 10:56:58.878 FontTest[4391:11303] Malayalam Sangam MN

2012-11-14 10:56:58.878 FontTest[4391:11303] Bradley Hand

2012-11-14 10:56:58.878 FontTest[4391:11303] Kannada Sangam MN

2012-11-14 10:56:58.878 FontTest[4391:11303] Bodoni 72 Oldstyle

2012-11-14 10:56:58.878 FontTest[4391:11303] Cochin

2012-11-14 10:56:58.878 FontTest[4391:11303] Sinhala Sangam MN

2012-11-14 10:56:58.879 FontTest[4391:11303] Hiragino Kaku Gothic ProN

2012-11-14 10:56:58.879 FontTest[4391:11303] Papyrus

2012-11-14 10:56:58.949 FontTest[4391:11303] Verdana

2012-11-14 10:56:58.950 FontTest[4391:11303] Zapf Dingbats

2012-11-14 10:56:58.950 FontTest[4391:11303] Avenir Next Condensed

2012-11-14 10:56:58.950 FontTest[4391:11303] Courier

2012-11-14 10:56:58.950 FontTest[4391:11303] Hoefler Text

2012-11-14 10:56:58.950 FontTest[4391:11303] Helvetica

2012-11-14 10:56:58.950 FontTest[4391:11303] Euphemia UCAS

2012-11-14 10:56:58.951 FontTest[4391:11303] Hiragino Mincho ProN

2012-11-14 10:56:58.951 FontTest[4391:11303] Bodoni Ornaments

2012-11-14 10:56:58.951 FontTest[4391:11303] Apple Color Emoji

2012-11-14 10:56:58.951 FontTest[4391:11303] Optima

2012-11-14 10:56:58.951 FontTest[4391:11303] Gujarati Sangam MN

2012-11-14 10:56:58.951 FontTest[4391:11303] Devanagari Sangam MN

2012-11-14 10:56:58.952 FontTest[4391:11303] Times New Roman

2012-11-14 10:56:58.952 FontTest[4391:11303] Kailasa

2012-11-14 10:56:58.952 FontTest[4391:11303] Telugu Sangam MN

2012-11-14 10:56:58.952 FontTest[4391:11303] Tw Cen MT Condensed 내가입력한 폰트가 포함되어졌으면 성공!

2012-11-14 10:56:58.953 FontTest[4391:11303] Heiti SC

2012-11-14 10:56:58.953 FontTest[4391:11303] Apple SD Gothic Neo

2012-11-14 10:56:58.953 FontTest[4391:11303] Futura

2012-11-14 10:56:58.953 FontTest[4391:11303] Bodoni 72

2012-11-14 10:56:58.953 FontTest[4391:11303] Baskerville

2012-11-14 10:56:58.954 FontTest[4391:11303] Chalkboard SE

2012-11-14 10:56:58.954 FontTest[4391:11303] Heiti TC

2012-11-14 10:56:58.954 FontTest[4391:11303] Copperplate

2012-11-14 10:56:58.954 FontTest[4391:11303] Party LET

2012-11-14 10:56:58.954 FontTest[4391:11303] American Typewriter

2012-11-14 10:56:58.954 FontTest[4391:11303] Symbol

2012-11-14 10:56:58.954 FontTest[4391:11303] Avenir Next

2012-11-14 10:56:58.955 FontTest[4391:11303] Noteworthy

2012-11-14 10:56:58.955 FontTest[4391:11303] Bangla Sangam MN

2012-11-14 10:56:58.955 FontTest[4391:11303] Zapfino

2012-11-14 10:56:58.955 FontTest[4391:11303] Tamil Sangam MN

2012-11-14 10:56:58.955 FontTest[4391:11303] Chalkduster

2012-11-14 10:56:58.955 FontTest[4391:11303] Arial Hebrew

2012-11-14 10:56:58.956 FontTest[4391:11303] Georgia

2012-11-14 10:56:58.956 FontTest[4391:11303] Helvetica Neue

2012-11-14 10:56:58.956 FontTest[4391:11303] Gill Sans

2012-11-14 10:56:58.956 FontTest[4391:11303] Palatino

2012-11-14 10:56:58.956 FontTest[4391:11303] Courier New

2012-11-14 10:56:58.956 FontTest[4391:11303] Oriya Sangam MN

2012-11-14 10:56:58.956 FontTest[4391:11303] Didot

2012-11-14 10:56:58.957 FontTest[4391:11303] Bodoni 72 Smallcaps








posted by 욱이다
2012. 10. 31. 14:38 아이폰


일단 동영상을 프로젝트 리소스에 포함 시기고 


아래의 소스를 넣으면 동영상이 에뮬레이터 앨범에 추가됨 ㅠㅠ 



 NSString *path = [[NSBundle mainBundle]pathForResource:@"IMG_0028" ofType:@"MOV"];

 UISaveVideoAtPathToSavedPhotosAlbum(path, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);




- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {

    if (error != nil) {

        NSLog(@"Error: %@", error);

    }

}

posted by 욱이다
2012. 7. 25. 15:49 아이폰

xcode에서는 한글이 3바이트 라더라 

그런데 난 윈도우에서 한글 2바이트로 처리했거든 


그래서 읽는 방법은 



        char *buftemp = (char *)malloc(sizeof(char) * 6);

        

        buftemp[0]=0xbf;

        buftemp[1]=0xc0;

        buftemp[2]=0xc8;

        buftemp[3]=0xc4;

        buftemp[4]=0x00;

        buftemp[5]=0x00;        

        DEBUGMSG(@"buftemp %@",[NSString stringWithCString:buftemp encoding:0x80000003]);


이러면 오후라는 글자가 찍힌다 



원문

posted by 욱이다
prev 1 2 3 4 next