我試圖添加使用此代碼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