我试图添加使用此代码WebView
到AlertView
:如何在UIAlertView中放置一个UIWebView?
- (void)viewDidLoad {
search = [[UIAlertView alloc] initWithTitle:@"title" message:@"iGoogle" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Search", nil];
[search addSubview:googleView];
googleView = [[UIWebView alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[search show];
[search release];
[super viewDidLoad]; }
不过,只有AlertView显示出来,没有的WebView。另外,我可以在哪里获得有关添加CGRectMakes之类的更多细节?
你能看看这篇文章吗? http://www.iphonedevsdk.com/forum/iphone-sdk-development/1704-uitextfield-inside-uialertview.html#post10643 – 2011-05-31 11:31:52