이 블로그 검색

2012년 4월 14일 토요일

Xcode SVN Conflict 발생시

1. 패키지 내용보기
2. project 보기

2012년 3월 27일 화요일

[iOS] View의 중첩

아이폰 개발에서
뷰에 뷰를 겹칠 때,
항상 왼쪽의 objects 박스의 아래쪽에 위치한 뷰가 위(표면)에 나타난다.
즉, 위에 위치한 뷰는 아래 위치한 뷰에 의해 가려진다.

[iOS] Button 사용시

아이폰 개발에서 버튼에 셀렉트 효과를 줄 때 state Config 메뉴에서 각각 상태에 따라 다른 이미지를 넣는다.

* Default -> 평상시(버튼 안 눌렀을 때)
* Selected -> 버튼이 선택되었을 때, 즉 한번 선택되면 계속 변한 상태(이미지)로 된다.
* Highlighted -> 버튼을 눌렀을때 변하고, 떼면 다시 원래의 상태(이미지)로 돌아간다. - 안드로이드의 셀렉트와 같다..(헛갈리기 쉽다..ㅡㅡ;)

2012년 3월 15일 목요일

[iOS] ASIHTTPRequest (아이폰 통신 API) 사용시 추가해야 할 프레임 워크

아이폰 통신 모듈에서 쓰이는 ASIHTTPRequest 를 사용시 반드시 다음의
FrameWork 들을 추가시켜야 한다. 그렇지 않으면 계속 에러 뿜는다.. ㅡㅡ;
(아마 Undefined symbols for architecture i386 혹은 ... i386 not found ....  뭐 이런류의 에러 메세지가 나올 것이다...)

<아래의 글에서 보면 - 퍼옴>
CFNetwork, SystemConfiguration, MobileCoreServices, CoreGraphics, libz.dylib
 이 다섯 녀석들이다...

2) Link with CFNetwork, SystemConfiguration, MobileCoreServices, CoreGraphics and zlib

Open the settings for your target by clicking on the blue bar at the very top of the Xcode sidebar:



Open the Build Phases tab, expand the box labeled Link Binary With Libraries then click the plus button.



Choose CFNetwork.framework from the list, and click Add:



Repeat the last two steps to add the following: SystemConfiguration.frameworkMobileCoreServices.framework,CoreGraphics.framework and libz.dylib.

2012년 2월 5일 일요일

SVN 서버에 소스 업로드

개발의 편의를 위해 SVN 서버에 서버를 올리고 필요할 때 마다 노트북이나 PC로 다운을 받아서 쓸려고 할 때, 맨 처음 share project 만 하고, commit을 안하는 경우가 있다.
이러면 소스가 올라가 지지 않는다.





Share project를 한 후
반드시 프로젝트를 commit 를 해줘야 한다 ~! (이 과정을 깜박 잊고 "왜 안되지?" 하는 경우가 많다... ㅠㅠ)



이 과정을 안 거치면,
아래와 같이 프로젝트 폴더만 나오고 하위의 소스 파일들과 폴더들이 나오지 않는다..
(왜냐... 아직 Commit 한게 없기 때문이다!)

2012년 2월 2일 목요일

Exception 이 나면 메써드를 자동 종료하고 빠져 나오나?

아래와 같은 메써드에서 에러가 나는 것도 아니고, 자꾸 아래 1번이라고 써있는 곳 까지만 로그가 찍히고 그 밑에 로직은 전혀 타지 않았다..
알고보니 SetMrzBuho라는 메서드가 ClassCastException 이 나서 주석처리하고 다시 실행해 보니 정상적으로 실행이 되더라... (이럴수도 있는 건가? ** 어쨋든 시스템 로그도 틈틈히 봐야 겠다.)


private void OnS32(byte[] ss) {
String sBuho;
sBuho = ArS32_2.xS(ss, 2, 0);
Log.d("OOOOO", "ss in ShowCurrentPrice = " + ss);
// 현재가
_a(R.id.cur_price_v, Util.addComma(ArS32_2.xS(ss, 4, 0).replace(".", "").trim()), 0);

Log.d("OOOOOO", "cur_price_v =11111 = " + Util.addComma(ArS32_2.xS(ss, 4, 0).replace(".", "").trim()));

Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX11111");  //1번
// 등락부호
SetMrzBuho(R.id.arrow, sBuho);  // 이 녀석이 Exception 이 발생하는 녀석이었다. (classCast Exception) 그런데 딱 여기까지만 진행 되고 밑에 로그가 안찍히는 거다~!! 이런 일도 가능한가?

// 전일비
_a(R.id.updown_v,
Util.addComma(ArS32_2.xS(ss, 3, 0).replace(".", "").trim()),
Util.drColor(sBuho));
Log.d("OOOOOO", "updown_v = 2222 " + Util.addComma(ArS32_2.xS(ss, 3, 0).replace(".", "").trim()));
Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX22222");
// 등락률
_a(R.id.ratio_v,
Util.addComma(ArS32_2.xS(ss, 5, 0).replace(".", "").trim(), 2) + "%", Util.drColor(sBuho));
Log.d("OOOOOO", "ratio_v = 33333  " + Util.addComma(ArS32_2.xS(ss, 5, 0).replace(".", "").trim(), 2));
Log.d("OOOOOO", "XXXXXXXXXXXXXXXXXXXXXXXX33333");

}

2012년 2월 1일 수요일

안드로이드 SMS, MMS 삭제

*SMS(단문 문자)와 MMS(장문 문자)가 지우는 로직이 다르다 ~!!  --> 엄청 헤멤.

안드로이드 개발 문서가 빈약함을 절실하게 느낀다.. ㅜㅜ
ContentResolve에 쓰이는 URI에 대한 설명이 어디에도 없다.. ;;
어떻게 알고 쓰라고?!

 public void deleteSpecifiedSMSHistory(ArrayList<String>address){

Uri uri = Uri.parse("content://sms");         //우선 Content URI가 다르다.


Uri uri_mms = Uri.parse("content://mms");

          ContentResolver contentResolver = getContentResolver();
  for (int i = 0; i < address.size(); i++) {
String where = "address = " + "'" + address.get(i) + "'";
Cursor cursor = contentResolver.query(uri, null, where, null, null);
Cursor cursor_mms = contentResolver.query(uri_mms, null, where, null, null) ;

while (cursor.moveToNext()) {      // Delete SMS
long thread_id = cursor.getLong(1);   // SMS는 thread_id 값을
Uri thread = Uri.parse("content://sms/conversations/"+ thread_id);
getContentResolver().delete(thread, null, null);
}

while(cursor_mms.moveToNext()){   //Delete MMS
long _id = cursor_mms.getLong(0);   // MMS는 _id 값을 가져와야 정상적으로 삭제가 된다 !! 이것을 누가 알까? 

Uri thread = Uri.parse("content://mms/inbox/" + _id);
getContentResolver().delete(thread, null, null);
}
}
    }