objective-c combine string

-- iOS (iPhone) 2012. 10. 15. 13:16
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
스트링을 조합하여 하나의 스트링으로 만들 때 아래의 방법들로 사용할 수 있다.

// formating combine
NSString *str = [NSString stringWithFormat:@"%@%@", @"Hello", @"World"];

// append combine
NSString *s1 = @"Hello";
NSString *s2 = @"World";
NSString *str = [s1 stringByAppendingString:s2];

// literal string combine
NSString *str = @"Hello"@"World";
NSString *str = @"Hello" @"World";

'-- iOS (iPhone)' 카테고리의 다른 글

add right button (exit button) on navigator bar  (0) 2012.10.15
make hyperlink  (0) 2012.10.15
get app version from info.plist  (0) 2012.10.15
iphone string 관리  (0) 2012.10.15
How To Create A Simple iPhone App on iOS 5 Tutorial  (0) 2012.10.12
posted by 어린왕자악꿍