我對iOS很新,我試圖在我的視圖控制器中添加UIActivityIndicator,但它顯示錯誤「沒有可見的@interface for'UIView '聲明選擇器'addSubView:'「。我將自己的reference.can任何代碼提示我怎麼能糾正這個問題沒有可見@interface爲'UIView'聲明選擇器'addSubView:'
-(void)viewDidLoad
{
[super viewDidLoad];
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.center = CGPointMake([[UIScreen mainScreen]bounds].size.width/2, [[UIScreen mainScreen]bounds].size.height/2);
[_bcview addSubView:spinner];//bcview is the outlet connection for my viewcontroller
}
它的'addSubview:' –
嘿OP,請考慮標誌着我的回答是 '接受',如果它幫助。謝謝! – LinusGeffarth