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:42 안드로이드

참고블로그

아이폰 커스텀 폰트사용



프로젝트 파일

FontTest.zip



asset폴더에 원하는 폰트 데이터를 추가한다 




public class FontTest extends Activity {

Typeface typeface ;

    @Override

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_font_test);

        LinearLayout layout = new LinearLayout(this);        

        layout.setOrientation(LinearLayout.VERTICAL);


        layout.setGravity(Gravity.CENTER);

        typeface = Typeface.createFromAsset(getAssets(), "Tw Cen MT Condensed.TTF");

        TextView tv = new TextView(this);

//        tv.setTypeface(typeface);이렇게 적용해도되고

tv.setText("123123");

tv.setTextSize(13);

tv.setTextColor(Color.BLACK);

layout.addView(tv);

        

        

        setContentView(layout);

        setGlobalFont(layout);//이걸로 전체 적용도 가능하다 

    }

    void setGlobalFont(ViewGroup root) {

        for (int i = 0; i < root.getChildCount(); i++) {

            View child = root.getChildAt(i);

            if (child instanceof TextView)

                ((TextView)child).setTypeface(typeface);

            else if (child instanceof ViewGroup)

                setGlobalFont((ViewGroup)child);

        }

    }

    @Override

    public boolean onCreateOptionsMenu(Menu menu) {

        getMenuInflater().inflate(R.menu.activity_font_test, menu);

        return true;

    }

}



'안드로이드' 카테고리의 다른 글

Android Asynchronous Http Client  (0) 2013.08.08
Eclipse Attach Source  (0) 2013.02.26
프로가드 제외하기  (0) 2012.08.09
안드로이드 아이콘 만드는 방법  (0) 2012.06.26
안드로이드 view -> bitmap 변환  (0) 2012.06.25
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. 8. 9. 10:44 안드로이드

검색

https://www.google.co.kr/search?q=addjavascriptinterface+proguard+not+working&sugexp=chrome,mod=18&sourceid=chrome&ie=UTF-8

결과

http://stackoverflow.com/questions/7424510/uncaught-typeerror-when-using-a-javascriptinterface

 


빈 인터 페이스 하나 만든다

package com.danal.saljaTalk.Common;

 

public interface DontProguard

{

 

}

프로 가드 돌리기 싫은 클레스에 implements한다

class TwitterCallBack extends WebViewClient implements DontProguard

       {

 

 

 

Proguard.cfg에 아래와 같이 추가한다

 

-keep public class com.Common.DontProguard

-keep public class * implements com.Common.DontProguard

-keepclassmembers class * implements com.Common.DontProguard {

    <methods>;

}

 

 

그럼 DontProguard implements 클레스들은 프로가드가 돌아가지 않는다 ~

 

패키지를 프로가드 돌리기 싫을때는 

-keep class com.sns.** { *; } 

이것처럼 한다 

 

========================================================================================

트위터에서 핀코드를 가져오는데에서

mWeb.addJavascriptInterface(new MyJavaScriptInterface(), "GETPINNUMBER");

이렇게 해서 했는데

MyJavaScriptInterface 이부분이 프로가드가 돌아가면서 실행이 되지 않았는데

위와 같이 설정하니깐 이상없이 돌아 갑니다.

 

참고하세요

 

 



 

 

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 욱이다
2012. 7. 18. 16:48 아이폰

android에서  쓰레드 중에 이미지를 갱신해야되는 경우나 ...네트워크를 접속 해야하는 경우에 handler를 호출해서 작업을 진행 하곤 했다 



아이폰에서 

아래의 함수 goMenu안에서 호출 되고 있는 곳에서 메인 쓰레드로 작업을 진행 하고 싶은 경우 

 [NSThread detachNewThreadSelector:@selector(goMenu:) toTarget:self withObject:btn];


요거 써주니깐 되더라 change 부분에서는 네트워크 접속 하는 부분이 들어있다 

-(void)goMenu:(id)sender

{

 [self performSelectorOnMainThread:@selector(change:) withObject:[NSNumber numberWithInt:14] waitUntilDone:NO];

}

-(void)change:(id)sender

{

작업해라 
}

        

posted by 욱이다
2012. 7. 11. 15:51 아이폰

원문

http://drzekil.tistory.com/369


스크린샷은 


커맨드 + 쉬프트 + 4 는 원하는 부분만 

커맨드 + 쉬프트 + 3 은 전체 


저장되는 곳은 바탕 화면 



원문에 보면 여러 기능이있지만 .. 

이것만 알아도 충분 할 듯 


posted by 욱이다
2012. 7. 11. 15:47 아이폰

아이폰 언어 지역화


프로젝트 TARGETS 에서 INFO에서 


Localization native development region 에서 +눌러 Localizations를 눌러 한국어 추가 할려면  ko로 값 넣고 






Supporting files 에서 새파일을 생성하는데  ios-> resource -> String File 생성 이름은 Localizable.strings가 된다 




프로젝트 네비게이션에서 생성된 Localizable.strings를 선택 해놓고 sdk의 최 우측의 창 을 띄워서 ...







언어 설정 추가 Localization에서 +버튼 눌러서 원하는 언어를 추가하면 


이렇게 영어 한글의 스트링 파일이 뜬다 

그럼 각각의 파일에 맞게 

한글에는 "Test"="kor";

영어에는 "Test"="en";

이렇게 넣어두고 


원하는 곳에서는 NSLocalizedString(@"Test",nil) 이렇게 해서 쓰면된다

nil에는 사용자가 코멘트를 넣을 수있다 





posted by 욱이다