만약 내가이iPhone SDK. NSString을 UILabel 텍스트에 할당하는 방법은 무엇입니까?
#import <Foundation/Foundation.h>
@interface anObject : NSObject {
NSString *aProp;
}
@property NSString aProp;
@end
추천하고 나는 tableviewcell의 UILabel의에 해당 속성의 문자열 값 중 하나를 할당 할 cellForRowAtIndexPath 방법, 내가 그것을 어떻게해야합니까의 클래스/객체?
내가 이것을 시도했지만이
[[cell topLabel] setText:(NSString *)anObject.aProp];
위의 줄에 중단 점을 퍼팅과 검사 작동하지 않습니다, 디버거 변수에 속성을 캐스팅 CFString
아니다 "라고 CFString 나던 작업 클래스를 수정하고 CFStringRef 나던 작품으로 속성을 선언 중 하나
을 참조 해주십시오 : http://stackoverflow.com/questions/387959/nsstring-property-copy-or-retain –