3

UICollectionView の上に UIButton を配置しようと必死です。目標は、新しい foursquare アプリのチェックイン ボタンのようなものです。

私のコードは現在次のようになっています。

UIButton *floatingButton = [[UIButton alloc] init];
[floatingButton setFrame:CGRectMake(320, 150, 50, 50)];
[floatingButton setBackgroundColor:[UIColor blackColor]];
[self.collectionView addSubview:floatingButton];
[self.collectionView bringSubviewToFront:floatingButton];

問題は、ボタンがどこにもないことです。

4

2 に答える 2