UILabel
첫로드시 업데이트되지 않지만 이후로드시 올바르게로드됩니다.iPhone UILabel이 처음로드시 업데이트되지 않습니다.
다음은 코드 스 니펫입니다. 다시 말했듯이 첫 번째로드에서만 xib의 라벨에 지정된 내용 (예 : label
)이 표시되고 두 번째로 label.text= @"Glass, Paper, Cans, Textiles, Card, Shoes and Books";
문자열이로드됩니다.
-(IBAction)showDetails:(id)sender{
NSLog(@"Annotation Click");
self.userProfileVC.title=((UIButton*)sender).currentTitle;
if([((UIButton*)sender).currentTitle isEqualToString:@"Asda"])
self.userProfileVC.label.text= @"Glass, Paper, Cans, Textiles, Card, Shoes and Books";
[UIView beginAnimations:@"Curl Page Down" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown
forView:self.view cache:YES];
//Adjust the Subview by butting up to status bar
self.userProfileVC.view.frame = CGRectMake(0, 0, 320, 480);
//Add userProfileVC as a subview
[self.view addSubview:userProfileVC.view];
[UIView commitAnimations];
}
당신이 내게 단서를 주신 덕분에 나는 방금 처음으로보기를 옮겼습니다! –