'Jquery' 카테고리의 다른 글
not(), filter() (0) | 2011.11.25 |
---|---|
라디오버튼의 체크된 value (0) | 2011.11.25 |
다중 속성 지정 (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
not(), filter() (0) | 2011.11.25 |
---|---|
라디오버튼의 체크된 value (0) | 2011.11.25 |
다중 속성 지정 (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
not(), filter() (0) | 2011.11.25 |
---|---|
라디오버튼의 체크된 value (0) | 2011.11.25 |
다중 속성 지정 (0) | 2011.11.25 |
params (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
not(), filter() (0) | 2011.11.25 |
---|---|
라디오버튼의 체크된 value (0) | 2011.11.25 |
다중 속성 지정 (0) | 2011.11.25 |
params (0) | 2011.11.25 |
플러긴 만들기 (0) | 2011.11.25 |
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
<google toolbox>
http://code.google.com/p/google-toolbox-for-mac/
<이미지 프로세싱>
http://code.google.com/p/simple-iphone-image-processing/
아이폰에서 3G 인지 와이파이인지 알아보는 방법 (0) | 2010.12.22 |
---|---|
단축키 (0) | 2010.12.17 |
태그로 서브뷰 찾기 (0) | 2010.12.15 |
NSLog (0) | 2010.12.15 |
adHoc (0) | 2010.12.13 |
단축키 (0) | 2017.02.05 |
---|---|
logcat (0) | 2012.02.04 |
http://maps.google.co.kr/ 현재위치 (0) | 2011.02.05 |
Android_exam (0) | 2010.10.21 |
설치순서 (0) | 2010.10.19 |
단축키 (0) | 2017.02.05 |
---|---|
logcat (0) | 2012.02.04 |
map api key (0) | 2011.02.05 |
Android_exam (0) | 2010.10.21 |
설치순서 (0) | 2010.10.19 |
iphone open source (0) | 2011.06.19 |
---|---|
단축키 (0) | 2010.12.17 |
태그로 서브뷰 찾기 (0) | 2010.12.15 |
NSLog (0) | 2010.12.15 |
adHoc (0) | 2010.12.13 |
iphone open source (0) | 2011.06.19 |
---|---|
아이폰에서 3G 인지 와이파이인지 알아보는 방법 (0) | 2010.12.22 |
태그로 서브뷰 찾기 (0) | 2010.12.15 |
NSLog (0) | 2010.12.15 |
adHoc (0) | 2010.12.13 |
태그로 서브뷰 찾기 (0) | 2010.12.15 |
---|---|
NSLog (0) | 2010.12.15 |
category (0) | 2010.12.03 |
init (0) | 2010.12.03 |
textbox 글자수에 따른 height 가져오기 (0) | 2010.11.26 |
adHoc (0) | 2010.12.13 |
---|---|
category (0) | 2010.12.03 |
textbox 글자수에 따른 height 가져오기 (0) | 2010.11.26 |
HIG (0) | 2010.11.07 |
Memory Management (0) | 2010.11.02 |
int nMaxWidth = 220;
int nMaxHeight = 400;
UIFont *chatFont = [UIFont systemFontOfSize:14];
_tagDetail.text = @"";
CGSize chatTextSize = [_tagDetail.text sizeWithFont: chatFont
constrainedToSize: CGSizeMake(nMaxWidth, nMaxHeight)
lineBreakMode: UILineBreakModeWordWrap];
int height = chatTextSize.height;
category (0) | 2010.12.03 |
---|---|
init (0) | 2010.12.03 |
HIG (0) | 2010.11.07 |
Memory Management (0) | 2010.11.02 |
StanFord Lecture PDF (0) | 2010.10.29 |
init (0) | 2010.12.03 |
---|---|
textbox 글자수에 따른 height 가져오기 (0) | 2010.11.26 |
Memory Management (0) | 2010.11.02 |
StanFord Lecture PDF (0) | 2010.10.29 |
테이블뷰 정렬 (0) | 2010.10.23 |
- (id) retain; /* retainCount++, return self.
* Used when you want to prevent it from being deallocated
* without your express permission. */
- (void) release; /* retainCount-- */
- (unsigned) retainCount; /* return retainCount */
- (id) autorelease;
- (NSString*) description
{
NSString* str = [[NSString alloc] initWithFormat: @"I am %d years old", 4];
return str;
}
위의 description 메소드는 NSString 객체를 alloc으로 생성하고 그 값을 초기화한 뒤 리턴하고 있다. 리턴된 str 객체는 프로그램의 다른 부분에서 사용될 것이다. 그렇다면 이 str을 사용한 뒤 release는 언제 어디에서 해주어야 하는가. 이러한 문제는 str 객체에 대하여 autorelease 선언을 해줌으로써 해결할 수 있다. 즉 위 코드의 마지막 줄을
return [str autorelease];
NSMutableArray* array = [[NSMutableArray alloc] init];
/* use the array */
[array release];
NSMutableArray* array = [NSMutableArray arrayWithCapacity: 17];
/* use the array */
- (void) doStuff
{
// array is an instance variable
array = [NSMutableArray new];
}
- (void) dealloc
{
[array release];
[super release];
}
- (void) doStuff
{
// array is an instance variable
array = [NSMutableArray arrayWithCapacity: 17];
[array retain];
}
- (void) dealloc
{
[array release];
[super release];
}
textbox 글자수에 따른 height 가져오기 (0) | 2010.11.26 |
---|---|
HIG (0) | 2010.11.07 |
StanFord Lecture PDF (0) | 2010.10.29 |
테이블뷰 정렬 (0) | 2010.10.23 |
키보드 사이즈 이벤트 (0) | 2010.10.23 |
HIG (0) | 2010.11.07 |
---|---|
Memory Management (0) | 2010.11.02 |
테이블뷰 정렬 (0) | 2010.10.23 |
키보드 사이즈 이벤트 (0) | 2010.10.23 |
트위터 posting (0) | 2010.10.22 |
Memory Management (0) | 2010.11.02 |
---|---|
StanFord Lecture PDF (0) | 2010.10.29 |
키보드 사이즈 이벤트 (0) | 2010.10.23 |
트위터 posting (0) | 2010.10.22 |
valueForKey vs objectForKey (0) | 2010.10.22 |
StanFord Lecture PDF (0) | 2010.10.29 |
---|---|
테이블뷰 정렬 (0) | 2010.10.23 |
트위터 posting (0) | 2010.10.22 |
valueForKey vs objectForKey (0) | 2010.10.22 |
키보드 사라지게 하기 (0) | 2010.10.22 |
테이블뷰 정렬 (0) | 2010.10.23 |
---|---|
키보드 사이즈 이벤트 (0) | 2010.10.23 |
valueForKey vs objectForKey (0) | 2010.10.22 |
키보드 사라지게 하기 (0) | 2010.10.22 |
NSNotificationCenter (0) | 2010.10.10 |
키보드 사이즈 이벤트 (0) | 2010.10.23 |
---|---|
트위터 posting (0) | 2010.10.22 |
키보드 사라지게 하기 (0) | 2010.10.22 |
NSNotificationCenter (0) | 2010.10.10 |
MoviePlayer (0) | 2010.10.09 |
트위터 posting (0) | 2010.10.22 |
---|---|
valueForKey vs objectForKey (0) | 2010.10.22 |
NSNotificationCenter (0) | 2010.10.10 |
MoviePlayer (0) | 2010.10.09 |
MapView (0) | 2010.10.09 |
단축키 (0) | 2017.02.05 |
---|---|
logcat (0) | 2012.02.04 |
map api key (0) | 2011.02.05 |
http://maps.google.co.kr/ 현재위치 (0) | 2011.02.05 |
설치순서 (0) | 2010.10.19 |
단축키 (0) | 2017.02.05 |
---|---|
logcat (0) | 2012.02.04 |
map api key (0) | 2011.02.05 |
http://maps.google.co.kr/ 현재위치 (0) | 2011.02.05 |
Android_exam (0) | 2010.10.21 |
valueForKey vs objectForKey (0) | 2010.10.22 |
---|---|
키보드 사라지게 하기 (0) | 2010.10.22 |
MoviePlayer (0) | 2010.10.09 |
MapView (0) | 2010.10.09 |
XML (0) | 2010.10.09 |
- (IBAction)btnFilePress:(id)sender {
NSString *path = [[NSBundle mainBundle] pathForResource:@"Moviecountdownwithsound" ofType:@"mp4"];
if (path) {
MovieURL = [NSURL fileURLWithPath:path];
}
//MPMoviePlayerController *thePlayer = [[MPMoviePlayerController alloc] initWithContentURL:MovieURL]; //ver 3.x
MPMoviePlayerViewController *thePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:MovieURL];
//thePlayer.scalingMode = MPMovieScalingModeAspectFit; //ver 3.x
thePlayer.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
thePlayer.moviePlayer.shouldAutoplay = YES;
[thePlayer shouldAutorotateToInterfaceOrientation:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:thePlayer];
//[thePlayer play]; //ver 3.x
[self.navigationController presentModalViewController:thePlayer animated:NO];
}
- (void)myMovieFinishedCallback:(NSNotification *)aNotification {
MPMoviePlayerController *thePlayer = [aNotification object];
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:thePlayer];
[thePlayer release];
}
- (IBAction)btnStreamPress:(id)sender {
NSString *path = @"http://movies.apple.com/media/us/iphone/2010/tours/apple-iphone4-design_video-us-20100607_r848-9cie.mov";
if (path) {
MovieURL = [NSURL URLWithString:path];
}
//MPMoviePlayerController *thePlayer = [[MPMoviePlayerController alloc] initWithContentURL:MovieURL]; //ver 3.x
MPMoviePlayerViewController *thePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:MovieURL];
//thePlayer.scalingMode = MPMovieScalingModeAspectFit; //ver 3.x
thePlayer.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
thePlayer.moviePlayer.shouldAutoplay = YES;
[thePlayer shouldAutorotateToInterfaceOrientation:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:thePlayer];
//[thePlayer play]; //ver 3.x
[self.navigationController presentModalViewController:thePlayer animated:NO];
}
키보드 사라지게 하기 (0) | 2010.10.22 |
---|---|
NSNotificationCenter (0) | 2010.10.10 |
MapView (0) | 2010.10.09 |
XML (0) | 2010.10.09 |
SQLITE (0) | 2010.10.08 |
UIViewController <MKMapViewDelegate, MKReverseGeocoderDelegate> {
...
}
- (void)viewDidLoad {
MKCoordinateRegion seoulRegion;
CLLocationCoordinate2D center;
center.latitude = 37.47783;
center.longitude = 127.044060;
MKCoordinateSpan span;
span.latitudeDelta = 0.005;
span.longitudeDelta = 0.005;
seoulRegion.center = center;
seoulRegion.span = span;
mapView.region = seoulRegion;
NSMutableArray *annotations = [[NSMutableArray alloc] init];
CLLocationCoordinate2D coord2d = {37.47783,127.044060};
MyAnnotation *anno = [[MyAnnotation alloc] initWithCoords:coord2d name:@"name1"];
anno.title = @"title1";
anno.subtitle = @"subtitle1";
[annotations addObject:anno];
[anno release];
CLLocationCoordinate2D coord2d1 = {37.480783,127.046060};
MyAnnotation *anno1 = [[MyAnnotation alloc] initWithCoords:coord2d1 name:@"name2"];
anno1.title = @"title2";
anno1.subtitle = @"subtitle2";
[annotations addObject:anno1];
[anno1 release];
[mapView addAnnotations:annotations];
[annotations release];
[super viewDidLoad];
}
-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>) annotation
{
MKPinAnnotationView *annoView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:[annotation title]];
annoView.animatesDrop = YES;
UIButton *addButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
annoView.rightCalloutAccessoryView = addButton;
[annoView setCanShowCallout:YES];
[annoView setSelected:YES animated:YES];
[annoView release];
return annoView;
}
NSNotificationCenter (0) | 2010.10.10 |
---|---|
MoviePlayer (0) | 2010.10.09 |
XML (0) | 2010.10.09 |
SQLITE (0) | 2010.10.08 |
CoreData (0) | 2010.10.07 |
@synthesize xmlView, xmlData, xmlList, currentItem, xmlValue;
- (void)viewDidLoad {
self.xmlData = [[NSData alloc] init];
self.xmlList = [[NSMutableArray alloc] init];
self.xmlValue = [[NSMutableString alloc] init];
self.currentItem = [[NSMutableDictionary alloc] init];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"xml"];
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
self.xmlData = data;
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:self.xmlData];
[parser setDelegate:self];
[parser parse];
[parser release];
[xmlView reloadData];
[super viewDidLoad];
}
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict
{
if ([elementName isEqualToString:@"d:entry"]) {
elementType = etItem;
}
[self.xmlValue setString:@""];
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
if(elementType == etItem){
[xmlValue appendString:string];
}
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
if(elementType != etItem)
return;
if([elementName isEqualToString:@"d:entry"]){
[self.xmlList addObject:[NSDictionary dictionaryWithDictionary:self.currentItem]];
}
else if([elementName isEqualToString:@"d:index"]){
[self.currentItem setValue:[NSString stringWithString:self.xmlValue] forKey:elementName];
}
else if([elementName isEqualToString:@"h1"]){
[self.currentItem setValue:[NSString stringWithString:self.xmlValue] forKey:elementName];
}
else if([elementName isEqualToString:@"p"]){
[self.currentItem setValue:[NSString stringWithString:self.xmlValue] forKey:elementName];
}
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
NSUInteger row = [indexPath row];
NSDictionary *dt = [self.xmlList objectAtIndex:row];
cell.textLabel.text = [NSString stringWithFormat:@"%@-%@", [dt objectForKey:@"h1"], [dt objectForKey:@"p"]];
return cell;
}
데이타베이스 | 코어데이타 | |
데이타베이스 자체 | 관리객체 컨텍스트(Managed Object Context) | 관리객체를 담는 그릇 |
테이블 구조(스키마) | 엔티티 (NSEntityDescription) | |
테이블 구조를 이루는 세부컬럼 정보 | 프로퍼티 (Property) | |
테이블 내의 하나의 레코드 | 관리객체 (Managed Object) | |
SQL문 (예: select * from) | 갬색 요청(Fetch Request) | |
SQL 조건문 (where age > 20) | 조건 서술(Predicate) | |
저장소 관리자 | 저장소 관리자 (Persistent Store Coordinator) | 컨텍스트 내용을 파일이나 DB에 저장하는 객체 |
XML (0) | 2010.10.09 |
---|---|
SQLITE (0) | 2010.10.08 |
archiving (0) | 2010.10.07 |
pickerView (0) | 2010.10.07 |
imagePicker (0) | 2010.10.07 |