검색결과 리스트
iphone에 해당되는 글 22건
- 2012.02.22 [iOS]한글 추가 폰트 사용하기
- 2012.02.22 [iOS]CATransction을 이용한 애니메이션 구현
- 2012.02.17 [iOS] Audio Streaming (2)
- 2012.02.08 [iOS] TBXML 파서로 XML 파싱하기
- 2012.02.05 [iOS] iPhone, iPad 가로, 세로 고정
- 2012.01.31 [iOS]UIWebView에서 user-agent 변경
- 2011.08.18 [iOS] App Update 할때 버전 문제
- 2011.07.27 [iOS] iPhone용 OpenSource 모음 - 펌
- 2011.07.27 [iOS] UIActionSheet Custom View 추가
- 2011.06.29 [iPhone]XCode4 프로젝트에서 Missing File 출력될 시
글
한글체에 Bold를 적용할려고 보니 iOS 기본 글꼴체로는 되지 않았다.
한글 폰트를 추가로 등록하여 커스텀 폰트를 사용하면 적용이 된다.
1. 먼저 폰트를 추가하여야 한다. 본인은 인터넷에 있는 무료폰트인 헤움폰트를 이용해서 테스트해 보았습니다.
해당 파일을 XCode에 추가 시킨 후 plist 파일로 가서 아래처럼 추가시킨다.
2. 해당 글꼴의 이름을 알아야 합니다.
저는 해당 시스템의 글꼴을 검색해서 알아왔습니다.
for (NSString *familyName in [UIFont familyNames]) {
NSLog(@"%@ : [ %@ ]", familyName, [[UIFont fontNamesForFamilyName:familyName] description]);
}
3. self.labAddr.font = [UIFont fontWithName:@"HeummGothic172" size:16.0];
이런 형태로 사용하시면 됩니다.
'IT분야 > iOS' 카테고리의 다른 글
AFNetworking (0) | 2012.06.29 |
---|---|
[iOS]한글 추가 폰트 사용하기 (0) | 2012.02.22 |
[iOS]CATransction을 이용한 애니메이션 구현 (0) | 2012.02.22 |
[iOS] Audio Streaming (2) | 2012.02.17 |
[iOS] TBXML 파서로 XML 파싱하기 (0) | 2012.02.08 |
[iOS] Background Pattern Image 적용 (0) | 2012.02.08 |
설정
트랙백
댓글
글
출처 : http://www.prapps.net/514
//트랜잭션 시작
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
[CATransaction setValue:[NSNumber numberWithFloat:0.5f] forKey:kCATransactionAnimationDuration]; //실행되는 시간
// Animation 설정
CATransition *push = [CATransition animation];
[push setType:kCATransitionMoveIn]; //Animation 타입
push.subtype = kCATransitionFromLeft; //Animation이 시작될 위치
//push.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
//애니메이션이 일어날 뷰의 레이어에 애니메이션을 추가 시킨다.
[self.imgMain.layer addAnimation:push forKey:kCATransition];
//이미지뷰에 이미지 변경
UIImage *tempImg = [[UIImage alloc] initWithData:data];
self.imgMain.image = tempImg;
[tempImg release];
//애니메이션 시작
* 애니메이션 타입
- kCATransitionFade
- kCATransitionMoveIn
- kCATransitionPush
- kCATransitionReveal
* 서브 타입
- kCATransitionFromRight
- kCATransitionFromLeft
- kCATransitionFromTop
- kCATransitionFromBottom
'IT분야 > iOS' 카테고리의 다른 글
AFNetworking (0) | 2012.06.29 |
---|---|
[iOS]한글 추가 폰트 사용하기 (0) | 2012.02.22 |
[iOS]CATransction을 이용한 애니메이션 구현 (0) | 2012.02.22 |
[iOS] Audio Streaming (2) | 2012.02.17 |
[iOS] TBXML 파서로 XML 파싱하기 (0) | 2012.02.08 |
[iOS] Background Pattern Image 적용 (0) | 2012.02.08 |
설정
트랙백
댓글
글
그래서 원격지에 있는 음악파일을 재생시에는 다운 받아서 재생을 해야겠지요..
스트리밍이 지원되는 라이브러리가 없을까 찾아보다가 아래와 같은 사이트 검색...
https://github.com/mattgallagher/AudioStreamer
라이브러리와 사용하는 샘플 예제가 같이 들어 있습니다. 어렵지 않게 사용하 실 수 있을 겁니다.
예제 속에는 슬라이더를 이용한 프로그레스 진행상황을 알 수있는 부분과 특정 위치 이동하는 기능등
필요한 부분은 다 구현되어 있습니다.
다만 한가지 스트리밍이 종료될 시점에 현재 재생시간을 알아오는 부분이 문제가 좀 있더군요..
음악은 처음 부터 끝까지 잘 재생되지만 마지막 부분에서 슬라이더가 이동되지 않아 사용자가 보기에
노래가 재생이 덜 된것 처럼 보입니다. 실제로는 다 재생된 겁니다.
해결 방법은 AudioStreamer.m 파일에서 소스를 약간 추가해 주었습니다.
if(sampleRate > 0 && ![self isFinishing]){
....
}else if([self isFinishing]){
별건 없습니다. 종료될 타임에는 현재 오디오 재생시간을 못가져오도록 막혀 있어서 추가해 줬습니다.
원본 소스에서 else if 구문을 추가해 주시면 됩니다.
더 좋은 방법이 있는지는 모르겠지만...
그럼 즐프..
'IT분야 > iOS' 카테고리의 다른 글
[iOS]한글 추가 폰트 사용하기 (0) | 2012.02.22 |
---|---|
[iOS]CATransction을 이용한 애니메이션 구현 (0) | 2012.02.22 |
[iOS] Audio Streaming (2) | 2012.02.17 |
[iOS] TBXML 파서로 XML 파싱하기 (0) | 2012.02.08 |
[iOS] Background Pattern Image 적용 (0) | 2012.02.08 |
[iOS] 인코딩 변경 (UTF-8) (0) | 2012.02.08 |
글
개발을 할 때에 http로 자료를 송수신할 때 JSON이나 XML을 많이 씁니다.
저는 JSON을 더 선호하긴 하지만 XML도 할 때가 많습니다.
iOS에 기본적으로 탑재되어 있는 NSXMLParser는 쓰기가 넘 힘들더군요..헷갈리기도 하고.
검색해보니 TBXML이란 놈이 있더군요.. 속도도 빠르고 메모리도 적게 먹습니다..
사용방법도 NSXMLParser보다 몇배는 더 간결..
1. 아래 사이트에서 라이브러리를 다운 받습니다. -- TBXML.zip
http://www.tbxml.co.uk/TBXML/Changes.html
2. 추가할 라이브러리
NSDataAdditions.h
NSDataAdditions.m
TBXML.h
TBXML.m
- frameworks에 libz.dylib 추가
3. 사용방법은
http://www.tbxml.co.uk/TBXML/API.html
API에 정말 한눈에 보이도록 잘 되어 있습니다.
API로는 부족하시다면 1번 사이트에서 TBXML-Books.zip 에 샘플 예제가 있습니다.
자바버전도 있으니 참고 하시길..
'IT분야 > iOS' 카테고리의 다른 글
[iOS]CATransction을 이용한 애니메이션 구현 (0) | 2012.02.22 |
---|---|
[iOS] Audio Streaming (2) | 2012.02.17 |
[iOS] TBXML 파서로 XML 파싱하기 (0) | 2012.02.08 |
[iOS] Background Pattern Image 적용 (0) | 2012.02.08 |
[iOS] 인코딩 변경 (UTF-8) (0) | 2012.02.08 |
[iOS] iPhone, iPad 가로, 세로 고정 (0) | 2012.02.05 |
설정
트랙백
댓글
글
아이폰을 개발하다 보면 회전을 한다든지 세로 또는 가로 고정으로 해야 할 때가 있습니다.
아래 코드는 UIViewController 에서 모든 방향으로 회전이 가능한 코드입니다.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return YES;
}
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
return 값을 넘겨 줄때 해당 상황에 맞게 넘겨 주면 되겠지요
1. 세로 고정
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation ==UIInterfaceOrientationPortraitUpsideDown);
}
2. 가로 고정
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft|| interfaceOrientation ==UIInterfaceOrientationLandscapeRight);
}
'IT분야 > iOS' 카테고리의 다른 글
[iOS] Background Pattern Image 적용 (0) | 2012.02.08 |
---|---|
[iOS] 인코딩 변경 (UTF-8) (0) | 2012.02.08 |
[iOS] iPhone, iPad 가로, 세로 고정 (0) | 2012.02.05 |
[iOS] iOS App 개발용 Open Source 모음 (펌) (1) | 2012.02.05 |
[iOS]UIWebView에서 user-agent 변경 (0) | 2012.01.31 |
[iOS] UIScrollView를 이용한 Image Zoom in/out (0) | 2011.08.18 |
설정
트랙백
댓글
글
기존에 user-agent 변경하는 방법을 Swizzle을 이용해서 변경했었는데
iOS 5로 업데이트 되면서 변경이 안되었다. 물론 앱스토어에 올라가 있는 앱들이 제대로 되지도 않고..
그래서 찾아보다가 한참을 헤매었는데 위 블로그에서 아래와 같은 방법을 찾았다.
AppDelegate.m 파일에 아래 코드를 넣으면 됩니다.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSString *deviceModel = [[UIDevice currentDevice].model stringByReplacingOccurrencesOfString:@"" withString:@""];
NSString *userAgent = [NSString stringWithFormat:@"Mozilla/5.0 (%@; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9A334,webView_iphone",deviceModel];
NSDictionary *dictionnary = [[NSDictionary alloc] initWithObjectsAndKeys:userAgent,@"UserAgent", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionnary];
[dictionnary release];
.....
.....
}
본인은 스마트폰에서 모바일웹으로 접속한 것인지 앱에서 웹뷰로 접속한 것인지 구분하기 위해
UserAgent 맨 뒤에 ,webView_iphone 문자열을 삽입하였습니다.
확인은 웹뷰를 구현한 곳에서 아래처럼 출력하시면 확인 할 수 있습니다
-(BOOL) webView:(UIWebView*) webView shouldStartLoadWithRequest:(NSURLRequest*) req navigationType:(UIWebViewNavigationType) navigationType{
NSMutableURLRequest *request = (NSMutableURLRequest *)req;
NSLog(@"%@",[request allHTTPHeaderFields]);
....
....
}
'IT분야 > iOS' 카테고리의 다른 글
[iOS] iPhone, iPad 가로, 세로 고정 (0) | 2012.02.05 |
---|---|
[iOS] iOS App 개발용 Open Source 모음 (펌) (1) | 2012.02.05 |
[iOS]UIWebView에서 user-agent 변경 (0) | 2012.01.31 |
[iOS] UIScrollView를 이용한 Image Zoom in/out (0) | 2011.08.18 |
[iOS] App Update 할때 버전 문제 (0) | 2011.08.18 |
[iOS] iPhone용 OpenSource 모음 - 펌 (0) | 2011.07.27 |
설정
트랙백
댓글
글
아이폰 앱을 앱데이트 할 때에
This bundle is invalid. The key CFBundleShortVersionString in the Info.plist file must contain a higer version than that of the previously uploaded version.
이런 메세지가 뜬다면 버전이 안맞다는 얘기인데..
분명히 버전을 바꾸었는데도 Archive 하면 버전이 안바뀐 채로 컴파일이 되었다.
찾아보니 plist 파일에 "Bundle Version" 외에 "Bundle Version string, short"이 있는데
후자는 앱의 상세버전이라고 한다. 요놈이 변경이 안되어 있었다.
옛날에 업로드한 앱들은 "Bundle Version string, short" 이런 항목이 없어서 Bundle Version만 바꾸면 잘되었는데 왜 생겼는지는 모르겠다.
아무튼 "Bundle Version" 항목과 "Bundle Version string, short" 항목을 동일하게 한 후에
Archive하고 업로드하였더니 성공..
'IT분야 > iOS' 카테고리의 다른 글
[iOS]UIWebView에서 user-agent 변경 (0) | 2012.01.31 |
---|---|
[iOS] UIScrollView를 이용한 Image Zoom in/out (0) | 2011.08.18 |
[iOS] App Update 할때 버전 문제 (0) | 2011.08.18 |
[iOS] iPhone용 OpenSource 모음 - 펌 (0) | 2011.07.27 |
[iOS] UIActionSheet Custom View 추가 (0) | 2011.07.27 |
[iOS]iPhone ProgressView 구현 (0) | 2011.07.14 |
설정
트랙백
댓글
글
GDataXML :
http://code.google.com/p/gdata-objectivec-client/source/browse/trunk/Source/XMLSupport/ (소스)
http://www.raywenderlich.com/725/how-to-read-and-write-xml-documents-with-gdataxml (해설)
TBXML : (read only, XPath 미지원)
http://www.tbxml.co.uk/TBXML/TBXML_Free.html
TouchXML : (read only, XPath 지원)
https://github.com/TouchCode/TouchXML
- 다양한 UI 구현
- 테이블뷰셀 커스터마이징
- HTTP GET/POST 요청
- XML 파싱
- 사진 앨범, 카메라, 지도 이미지 접근
- 맵뷰 및 위치정보
- 푸시 노티피케이션
<google toolbox>
http://code.google.com/p/google-toolbox-for-mac/
<이미지 프로세싱>
http://code.google.com/p/simple-iphone-image-processing/
'IT분야 > iOS' 카테고리의 다른 글
[iOS] UIScrollView를 이용한 Image Zoom in/out (0) | 2011.08.18 |
---|---|
[iOS] App Update 할때 버전 문제 (0) | 2011.08.18 |
[iOS] iPhone용 OpenSource 모음 - 펌 (0) | 2011.07.27 |
[iOS] UIActionSheet Custom View 추가 (0) | 2011.07.27 |
[iOS]iPhone ProgressView 구현 (0) | 2011.07.14 |
[iOS] UITableView 행 삭제 (0) | 2011.07.14 |
설정
트랙백
댓글
글
간단하게 기본 actionsheet를 사용하지 않고 view를 추가해서 사용하는 방법입니다.
헤더파일에
UIActionSheet *actionSheet;
UIView *viewActionSheet;
두개를 추가하고.. view는 아울렛으로 연결하시던지 하시면 됩니다.
특정 버튼을 눌러서 actionSheet를 띄울 코드
UIActionSheet *tempActionSheet = [[[UIActionSheet alloc] init] autorelease];
tempActionSheet.delegate = self;
[tempActionSheet addSubview:self.viewActionSheet]; // 액션시트에 뷰 추가
[tempActionSheet showInView:self.view]; // 액션시트를 보여줄 뷰
[tempActionSheet setBounds:CGRectMake(0, 0, self.view.frame.size.width, 200)];
self.actionSheet = tempActionSheet;
viewActionSheet 의 각종 버튼도 이벤트 등록하시고
종료버튼을 만드셨다면 그 함수에서 아래 코드를 부르시면 액션시트가 닫힙니다.
[self.actionSheet dismissWithClickedButtonIndex:0 animated:YES];
self.actionSheet = nil;
액션시트를 추가할때 높이를 view 사이즈의 두배를 주어야 한다고 하는데 이유는 잘...
즐코딩하세요
참조 사이트 : http://mellang.tistory.com/26
'IT분야 > iOS' 카테고리의 다른 글
[iOS] App Update 할때 버전 문제 (0) | 2011.08.18 |
---|---|
[iOS] iPhone용 OpenSource 모음 - 펌 (0) | 2011.07.27 |
[iOS] UIActionSheet Custom View 추가 (0) | 2011.07.27 |
[iOS]iPhone ProgressView 구현 (0) | 2011.07.14 |
[iOS] UITableView 행 삭제 (0) | 2011.07.14 |
[iPhone]XCode4 프로젝트에서 Missing File 출력될 시 (0) | 2011.06.29 |
설정
트랙백
댓글
글
실행하는데는 전혀 문제는 없는데 왜 뜨는지 인터넷에 검색해보니 .svn문제라고 한다.
link : http://www.thezeto.com/wordpress/?p=3
위 링크에 설명이 잘 되어 있다.
1. 터미널에서 아래의 두개의 명령어만 치면 finder에서 숨겨진 파일 및 폴더를 볼 수 있다.
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
2. 본인은 파일이 그닥 많지 않아서 Finder 에서 프로젝트 폴더에 있는 .svn 하나만 지우니 경고 출력이 모두 없어졌다.
지우고 난뒤에는
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
다시 파일을 숨겼다.
'IT분야 > iOS' 카테고리의 다른 글
[iOS]iPhone ProgressView 구현 (0) | 2011.07.14 |
---|---|
[iOS] UITableView 행 삭제 (0) | 2011.07.14 |
[iPhone]XCode4 프로젝트에서 Missing File 출력될 시 (0) | 2011.06.29 |
[iPhone]UIWebView에서 Safari 새창 띄우기 (2) | 2011.06.24 |
[iPhone]디렉토리 목록 조회 (0) | 2011.06.09 |
[iPhone]iOS 계열 디바이스 구분 (2) | 2011.05.19 |