값을 다른보기에서 UIlable로 전달하려는 NSobject 내부에 NSString을 설정하고 있습니까? label1
의 텍스트를 변경하면 작동다른 개체에서 UItextlabel 텍스트를 설정하는 방법
//inside tableview/forRowAtIndexPath
//load VehicleSearchObjects
VehicleSearchObject *vehicleSearchObject = [[VehicleSearchObject alloc] init];
if(indexPath.section == 0)
{
if(indexPath.row == 0)
{
UILabel *label1;
label1 = (UILabel *)[cell viewWithTag:1];
label1.text = @"Manufacture";
UILabel *label2;
label2 = (UILabel *)[cell viewWithTag:2];
label2.text = [vehicleSearchObject manufacturerString]; //this is where I try to set the text... but nothing is happening, am I doing it right or should I be doing something else?
당신은 uilabel – Robin
좀 더 많은 코드를 게시 .... ....이 manufacturerString 어떻게합니까? 무슨 일이 태그 1과 2로 지정 되었습니까? – mayuur
태그 1과 두 개의 UIlabel이 정의됩니다. 레이블이있는 사용자 정의 tableviewcell을 만들면 인터페이스 작성기에서 태그 값을 설정할 수 있습니다.이 값은 올바른 UILabel로 전달되도록 참조하는 것입니다. 제조 문자열은 나중에 상위 뷰에서 사용하기 위해 NSObject에 전달하는 문자열입니다. 기본적으로 전체 목표는 큰 데이터베이스를 검색하는 데 사용할 값들을 묶는 객체에 대한 것입니다. –