的我有,我希望返回不同类型是否有可能返回不同类型的对象
-(UIButton *)returnObject1 ;
{
//dosomething
return aUIButton;
}
-(UIView *)returnObject2 ;
{
//dosomething
return aUIView;
}
我希望这两个功能合并成一个,并返回不同的NSObject(的UIButton,UIView的)功能 是有可能吗?
欢迎任何评论
其实是的,你的意思是返回2个对象或返回对象取决于你接受的类型? – Pochi