본문 바로가기

분류 전체보기

UIGestureRecognizer 사용 Inherits from NSObject Conforms to NSObject (NSObject) Framework /System/Library/Frameworks/UIKit.framework Availability Available in iOS 3.2 and later. Companion guide Event Handling Guide for iOS Declared inUIGestureRecognizer.h UIGestureRecognizerSubclass.h ios 3.2부터 지원하는 제스처에 대한 상위 클레스로 각종 터치이벤트를 케치하는 하위 클레스들이 상속받아 사용합니다. UITapGestureRecognizer 터치 - 손으로 터치UIPinchGestureRecognizer 핀치 - 두 손가락 .. 더보기
android activity사이에 검은 line생길 때 (activity 테마설정) && 엑티비티 테마 style코드 엑티비티를 커스텀한 style를 주어서 라인을 지운다. (엑티비티 테마 설정)먼저 values에 styles.xml을 만든다. styles.xml @null 후에 적용시킬 activity에 등록한다. ( 메니페스트에서 등록해야 한다. ) 출처 : http://www.androidpub.com/947304 엑티비티 style에서 title제거, fullScreen, background색상 속성 ( style에 추가하여 주면 됩니다. ) true true @android:colors/blue 더보기
URL Schemes로 다른 어플 호출하기 URL Schemes로 호출하기 위해서는 호출대상이 되는 어플에 URL Schemes이 등록되어 있어야 한다. if([[UIApplication sharedApplication] openURL:@"호출 어플의 URL Schemes://"]){ //호출할 어플이 있다면// 호출 // [[UIApplication sharedApplication] openURL:@"호출 어플의 URL Schemes://"]}else{ // 아닐경우} 더보기
테이블 뷰 셀 커스텀 적용 부분 커스텀 셀 부분 MainVisitLisetCell.h 파일 ( 테이블 뷰 셀 커스텀 ) #import @interface MainVisitLisetCell : UITableViewCell{ IBOutlet UIButton* deleteBtn; IBOutlet UILabel* name; IBOutlet UILabel* date; IBOutlet UILabel* company; IBOutlet UILabel* room; IBOutlet UIImageView* topImage; IBOutlet UIImageView* bottomImage; } @property (retain, nonatomic) IBOutlet UIButton* deleteBtn; @property (retain, nonatomic) IBOu.. 더보기
테이블 뷰 만들기 테이블 뷰에 dataSource, delegate를 연결해야한다. ( xib 사용시 ) 해더파일 //테이블 뷰 등록 @property (assign, nonatomic) IBOutlet UITableView* mamberTable; .m파일 @synthesize mamberTable; //테이블 뷰의 셀의 수를 지정하는 함수 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return getMemberLisData.count; } //테이블 뷰의 셀을 세팅하는 함수 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexP.. 더보기
텍스트뷰 포커스 이동 이벤트, 텍스트뷰 클릭 이벤트 해더파일 //텍스트 필드 선언 @property (retain, nonatomic) IBOutlet UITextView* nameTextEdit; @property (retain, nonatomic) IBOutlet UITextView* companyNameTextEdit; @property (retain, nonatomic) IBOutlet UITextView* cellPhoneTextEdit; @property (retain, nonatomic) IBOutlet UITextView* visitObjectTextEdit;.m 파일 @synthesize nameTextEdit;@synthesize companyNameTextEdit; @synthesize cellPhoneTextEdit; @synthes.. 더보기
직렬화 간단 사용 예제 //DataSerialization.h 파일 #import #define kFilename @"data.plist" //경로지정 @interface DataSerialization : NSObject -(NSString*)dataFilePath; -(NSMutableArray*)loadData; -(BOOL)saveData:(NSMutableArray*)getArray; @end//DataSerialization.m 파일 #import "DataSerialization.h" #import "VisitMemberAddData.h" @implementation DataSerialization -(NSString*)dataFilePath{ //경로 설정 안해도됨.... NSArray* paths = NSSea.. 더보기
UIPopoverController 사용 예제 //팝오버와 네비게이션 그리고 붙일 뷰를 선언UIPopoverController* _popoverCntrlr;UINavigationController *nav; SarchMemberViewController* sarchViewController; //초기화 후에 붙여준다. 네비게이션을 붙여 줄 경우는 상단에 타이틀 바 부분이 생기며 바로 뷰를 붙이는경우는 뷰가 바로 붙는다. sarchViewController = [[SarchMemberViewController alloc]init]; nav = [[UINavigationController alloc]initWithRootViewController:sarchViewController]; _popoverCntrlr = [[UIPopoverController.. 더보기
lable NSString 만큼 늘리기, lable 폰트 조절 sizeToFit - lable에 들어간 NSString만큼 늘리기ex -[cell.name sizeToFit]; 폰트 선언 [UIFont fontWithName:@"System" size:20.0f] ex ) [cell.name setFont:[UIFont fontWithName:@"System" size:20.0f]]; 더보기
간단한 http통신 예제 ( Java ) public class Main { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub // 한글의 경우 인코딩을 해야함. // 서버쪽에서는 따로 decode할 필욘 없음. 대신 new String(str.getBytes("8859_1"), "UTF-8");로 인코딩을 변경해야함 String str = URLEncoder.encode("한글", "UTF-8"); URL url = new URL("http://localhost:8080/XmlTest/index.jsp"); // open connection HttpURLConnection conn = (HttpURLConnection) url... 더보기