我是iphone开发的新手.我想在导航栏中设置一个活动指示器.我在导航栏下面看到我的活动指示器.我的代码在这里
- (IBAction) gomethod : (id) sender {
xxMapSubviewcontroller = [[XxMapSubviewcontroller alloc] init];
[self.navigationController pushViewController:xxMapSubviewcontroller animated:YES];
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
activityIndicator.frame = CGRectMake(0.0, 0.0, 20.0, 20.0);
[activityIndicator startAnimating];
[xxMapSubviewcontroller.view addSubview:activityIndicator];
}
Run Code Online (Sandbox Code Playgroud)
如何在导航栏中设置我的活动指示器?请帮帮我.谢谢.