2013-02-27 100 views
1

在我的另一個問題中,如jjv360所示,爲scrollView定製分頁寬度的一種方法是使scrollView成爲分頁的大小,然後在其上覆蓋一個透明的UIView並執行[overlayView addGestureRecognizer:scrollView.panGestureRecognizer ]用於觸摸事件。如何覆蓋另一個視圖上方的視圖?

這聽起來像一個偉大的想法,這是我的快問:

是覆蓋只是[view addsubview OLvier]?什麼是視圖疊加方法?

回答

0

燁...設置使用CGRectMake和覆蓋使用

[滾動視圖addsubview:廠景]視圖幀

0
UIView *yourView = [UIView alloc]init]; 
yourView.frame = CGRectMake(x,y,width,height)//whatever values work for you 
[self.view addSubview: yourView];