查看 Apple 示例代码iPhoneCoreDataRecipes
,我对以下代码段有疑问RecipeDetailViewController.m
:
case TYPE_SECTION:
nextViewController = [[TypeSelectionViewController alloc]
initWithStyle:UITableViewStyleGrouped];
((TypeSelectionViewController *)nextViewController).recipe = recipe;
break;
在这一行((TypeSelectionViewController *)nextViewController).recipe = recipe
中,我知道内括号是将视图控制器类型转换为 a TypeSelectionViewController
,但是外括号有什么作用?