2014-03-31 30 views
-2

我想下面的代碼但沒有任何工程:如何改變UICollectionView框架上的按鈕觸摸

CGRect frame = collectionview.frame; 
collectionview.frame = CGRectMake (frame.origin.x, frame.origin.y+100, frame.size, frame.size-100); 

自動版式設置爲true的項目。

+0

你重裝的CollectionView後更改它的框架? – Rushabh

+1

也許你的收藏視圖有限制 – SAKrisT

+0

是Rushabh。我重新加載收藏視圖。 –

回答

0

試試這個:下面的代碼

CGRect frame = collectionview.frame; 
frame = CGRectMake (frame.origin.x, frame.origin.y+100, frame.size, frame.size-100); 
collectionview.frame=frame; 
+0

沒有。不工作.. –

2

嘗試:

CGRect frame = collectionview.frame; 
collectionview.frame = CGRectMake (frame.origin.x, frame.origin.y+100, frame.size.width, frame.size.height-100);