iOS 两个页面间传值的问题?
collectionView的headView里面有个textFiled和button,点击button后跳入另一个界面,现在界面上的值能传到viewController...
collectionView的headView里面有个textFiled和button,点击button 后跳入另一个界面,现在界面上的值能传到viewController了,但是textFiled这个跳回来后值没有传进去,代码如下:
-(void)passValue:(TranslatePassValue *)value
{
TranslatePassValue *aa=value;
NSIndexPath *indexPath=[[NSIndexPath alloc]initWithIndex:0];
UICollectionReusableView *headview = [self->collectionView dequeueReusableSupplementaryViewOfKind :@"UICollectionElementKindSectionHeader" withReuseIdentifier:kheaderIdentifier forIndexPath:indexPath];
UITextField *textfiled=[headview.subviews objectAtIndex:2];
textfiled.text=aa.value;
}
请问该换哪种办法实现? 展开
-(void)passValue:(TranslatePassValue *)value
{
TranslatePassValue *aa=value;
NSIndexPath *indexPath=[[NSIndexPath alloc]initWithIndex:0];
UICollectionReusableView *headview = [self->collectionView dequeueReusableSupplementaryViewOfKind :@"UICollectionElementKindSectionHeader" withReuseIdentifier:kheaderIdentifier forIndexPath:indexPath];
UITextField *textfiled=[headview.subviews objectAtIndex:2];
textfiled.text=aa.value;
}
请问该换哪种办法实现? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询