我試圖在scrollview
內觸摸屏幕時顯示ActionSheet
。動作表在第一頁內彈出。但在隨後的頁面中,屏幕變暗並且不顯示任何內容,就好像實際的按鈕在屏幕上顯示一樣。我已經測試了UIActionSheet
的不同幀定位,但它似乎不起作用。ScrollView中的UIActionSheet定位問題
self.view.frame.origin.x似乎有正確的ScrollView位置。
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Jump to First Page", @"Browse Pages",nil];
CGRect frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, 480.0f, 320.0f);
[actionSheet setFrame:frame];
[actionSheet showInView:self.view];
謝謝我最終使用* UIWindow作爲ScrollView的根控制器的根視圖是UIWindow ...現在,我的應用程序處於橫向模式。我所有的ScrollView都以橫向模式顯示(我做了ShouldAutoRotate ...&Transformation),但是UIActionSheet以縱向顯示...任何想法?提前致謝! – anthony 2010-08-23 04:45:04